@alphafi/alphafi-sdk 0.0.20 → 0.0.21
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/package.json +2 -2
- package/dist/cjs/graphql/queries/autoCompoundEvents.graphql +0 -14
- package/dist/cjs/graphql/queries/cetusPools.graphql +0 -48
- package/dist/cjs/graphql/queries/investors.graphql +0 -48
- package/dist/cjs/graphql/queries/lockedTableData.graphql +0 -25
- package/dist/cjs/graphql/queries/lockedTableDataFragment.graphql +0 -19
- package/dist/cjs/graphql/queries/nftHolders.graphql +0 -18
- package/dist/cjs/graphql/queries/pools.graphql +0 -78
- package/dist/cjs/graphql/queries/receiptData.graphql +0 -16
- package/dist/cjs/graphql/queries/userVaultBalances.graphql +0 -57
- package/dist/cjs/graphql/queries/userVaults.graphql +0 -57
- package/dist/esm/graphql/queries/autoCompoundEvents.graphql +0 -14
- package/dist/esm/graphql/queries/cetusPools.graphql +0 -48
- package/dist/esm/graphql/queries/investors.graphql +0 -48
- package/dist/esm/graphql/queries/lockedTableData.graphql +0 -25
- package/dist/esm/graphql/queries/lockedTableDataFragment.graphql +0 -19
- package/dist/esm/graphql/queries/nftHolders.graphql +0 -18
- package/dist/esm/graphql/queries/pools.graphql +0 -78
- package/dist/esm/graphql/queries/receiptData.graphql +0 -16
- package/dist/esm/graphql/queries/userVaultBalances.graphql +0 -57
- package/dist/esm/graphql/queries/userVaults.graphql +0 -57
- package/embed-graphql.js +0 -95
- package/jest.config.cjs.js +0 -14
- package/jest.config.esm.js +0 -15
- package/tsconfig.cjs.json +0 -18
- package/tsconfig.esm.json +0 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphafi/alphafi-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "Official AlphaFi SDK to access AlphaFi data",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "npm run build:cjs && npm run build:esm",
|
|
18
18
|
"build:esm": "tsc --project tsconfig.esm.json && echo '{\"type\":\"module\"}' > dist/esm/package.json",
|
|
19
19
|
"build:cjs": "tsc --project tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
|
|
20
|
-
"postbuild": "npm
|
|
20
|
+
"postbuild": "npm link",
|
|
21
21
|
"pretty": "prettier . --write",
|
|
22
22
|
"lint": "eslint 'src/**/*.ts' --fix",
|
|
23
23
|
"cpx": "cpx 'src/**/*.graphql' dist/cjs && cpx 'src/**/*.graphql' dist/esm",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
query GetCetusPools {
|
|
2
|
-
alphaSuiCetusPool: object(
|
|
3
|
-
address: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720"
|
|
4
|
-
) {
|
|
5
|
-
...PoolFields
|
|
6
|
-
}
|
|
7
|
-
usdcUsdtCetusPool: object(
|
|
8
|
-
address: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20"
|
|
9
|
-
) {
|
|
10
|
-
...PoolFields
|
|
11
|
-
}
|
|
12
|
-
usdyUsdcCetusPool: object(
|
|
13
|
-
address: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d"
|
|
14
|
-
) {
|
|
15
|
-
...PoolFields
|
|
16
|
-
}
|
|
17
|
-
suiUsdcCetusPool: object(
|
|
18
|
-
address: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630"
|
|
19
|
-
) {
|
|
20
|
-
...PoolFields
|
|
21
|
-
}
|
|
22
|
-
wethUsdcCetusPool: object(
|
|
23
|
-
address: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df"
|
|
24
|
-
) {
|
|
25
|
-
...PoolFields
|
|
26
|
-
}
|
|
27
|
-
wbtcUsdcCetusPool: object(
|
|
28
|
-
address: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042"
|
|
29
|
-
) {
|
|
30
|
-
...PoolFields
|
|
31
|
-
}
|
|
32
|
-
navxSuiCetusPool: object(
|
|
33
|
-
address: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703"
|
|
34
|
-
) {
|
|
35
|
-
...PoolFields
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fragment PoolFields on Object {
|
|
40
|
-
asMoveObject {
|
|
41
|
-
contents {
|
|
42
|
-
type {
|
|
43
|
-
repr
|
|
44
|
-
}
|
|
45
|
-
json
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
query GetInvestors {
|
|
2
|
-
alphaSuiInvestor: object(
|
|
3
|
-
address: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88"
|
|
4
|
-
) {
|
|
5
|
-
...InvestorFields
|
|
6
|
-
}
|
|
7
|
-
usdcUsdtInvestor: object(
|
|
8
|
-
address: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5"
|
|
9
|
-
) {
|
|
10
|
-
...InvestorFields
|
|
11
|
-
}
|
|
12
|
-
usdyUsdcInvestor: object(
|
|
13
|
-
address: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1"
|
|
14
|
-
) {
|
|
15
|
-
...InvestorFields
|
|
16
|
-
}
|
|
17
|
-
suiUsdcInvestor: object(
|
|
18
|
-
address: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55"
|
|
19
|
-
) {
|
|
20
|
-
...InvestorFields
|
|
21
|
-
}
|
|
22
|
-
wethUsdcInvestor: object(
|
|
23
|
-
address: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43"
|
|
24
|
-
) {
|
|
25
|
-
...InvestorFields
|
|
26
|
-
}
|
|
27
|
-
wbtcUsdcInvestor: object(
|
|
28
|
-
address: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc"
|
|
29
|
-
) {
|
|
30
|
-
...InvestorFields
|
|
31
|
-
}
|
|
32
|
-
navxSuiInvestor: object(
|
|
33
|
-
address: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c"
|
|
34
|
-
) {
|
|
35
|
-
...InvestorFields
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fragment InvestorFields on Object {
|
|
40
|
-
asMoveObject {
|
|
41
|
-
contents {
|
|
42
|
-
type {
|
|
43
|
-
repr
|
|
44
|
-
}
|
|
45
|
-
json
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
query GetLockedTableData(
|
|
2
|
-
$limit: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$lockedTableId: SuiAddress!
|
|
5
|
-
) {
|
|
6
|
-
owner(address: $lockedTableId) {
|
|
7
|
-
dynamicFields(first: $limit, after: $after) {
|
|
8
|
-
pageInfo {
|
|
9
|
-
hasNextPage
|
|
10
|
-
endCursor
|
|
11
|
-
}
|
|
12
|
-
nodes {
|
|
13
|
-
name {
|
|
14
|
-
json
|
|
15
|
-
}
|
|
16
|
-
value {
|
|
17
|
-
__typename
|
|
18
|
-
... on MoveValue {
|
|
19
|
-
json
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
query GetNftHolders($before: String, $receipt: String!) {
|
|
2
|
-
objects(last: 10, before: $before, filter: { type: $receipt }) {
|
|
3
|
-
pageInfo {
|
|
4
|
-
hasNextPage
|
|
5
|
-
hasPreviousPage
|
|
6
|
-
endCursor
|
|
7
|
-
startCursor
|
|
8
|
-
}
|
|
9
|
-
nodes {
|
|
10
|
-
asMoveObject {
|
|
11
|
-
status
|
|
12
|
-
contents {
|
|
13
|
-
json
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
query GetPools {
|
|
2
|
-
alphaPool: object(
|
|
3
|
-
address: "0x6ee8f60226edf48772f81e5986994745dae249c2605a5b12de6602ef1b05b0c1"
|
|
4
|
-
) {
|
|
5
|
-
...PoolFields
|
|
6
|
-
}
|
|
7
|
-
alphaSuiPool: object(
|
|
8
|
-
address: "0x594f13b8f287003fd48e4264e7056e274b84709ada31e3657f00eeedc1547e37"
|
|
9
|
-
) {
|
|
10
|
-
...PoolFields
|
|
11
|
-
}
|
|
12
|
-
usdcUsdtPool: object(
|
|
13
|
-
address: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5"
|
|
14
|
-
) {
|
|
15
|
-
...PoolFields
|
|
16
|
-
}
|
|
17
|
-
usdyUsdcPool: object(
|
|
18
|
-
address: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437"
|
|
19
|
-
) {
|
|
20
|
-
...PoolFields
|
|
21
|
-
}
|
|
22
|
-
suiUsdcPool: object(
|
|
23
|
-
address: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab"
|
|
24
|
-
) {
|
|
25
|
-
...PoolFields
|
|
26
|
-
}
|
|
27
|
-
wethUsdcPool: object(
|
|
28
|
-
address: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6"
|
|
29
|
-
) {
|
|
30
|
-
...PoolFields
|
|
31
|
-
}
|
|
32
|
-
wbtcUsdcPool: object(
|
|
33
|
-
address: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a"
|
|
34
|
-
) {
|
|
35
|
-
...PoolFields
|
|
36
|
-
}
|
|
37
|
-
navxSuiPool: object(
|
|
38
|
-
address: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0"
|
|
39
|
-
) {
|
|
40
|
-
...PoolFields
|
|
41
|
-
}
|
|
42
|
-
usdtPool: object(
|
|
43
|
-
address: "0xc696ca5b8f21a1f8fcd62cff16bbe5a396a4bed6f67909cfec8269eb16e60757"
|
|
44
|
-
) {
|
|
45
|
-
...PoolFields
|
|
46
|
-
}
|
|
47
|
-
suiPool: object(
|
|
48
|
-
address: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3"
|
|
49
|
-
) {
|
|
50
|
-
...PoolFields
|
|
51
|
-
}
|
|
52
|
-
vsuiPool: object(
|
|
53
|
-
address: "0x0d9598006d37077b4935400f6525d7f1070784e2d6f04765d76ae0a4880f7d0a"
|
|
54
|
-
) {
|
|
55
|
-
...PoolFields
|
|
56
|
-
}
|
|
57
|
-
usdcPool: object(
|
|
58
|
-
address: "0x01493446093dfcdcfc6c16dc31ffe40ba9ac2e99a3f6c16a0d285bff861944ae"
|
|
59
|
-
) {
|
|
60
|
-
...PoolFields
|
|
61
|
-
}
|
|
62
|
-
wethPool: object(
|
|
63
|
-
address: "0xe4eef7d4d8cafa3ef90ea486ff7d1eec347718375e63f1f778005ae646439aad"
|
|
64
|
-
) {
|
|
65
|
-
...PoolFields
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
fragment PoolFields on Object {
|
|
70
|
-
asMoveObject {
|
|
71
|
-
contents {
|
|
72
|
-
type {
|
|
73
|
-
repr
|
|
74
|
-
}
|
|
75
|
-
json
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
query GetReceiptData($limit: Int, $receiptType: String!, $after: String) {
|
|
2
|
-
objects(first: $limit, after: $after, filter: { type: $receiptType }) {
|
|
3
|
-
nodes {
|
|
4
|
-
asMoveObject {
|
|
5
|
-
status
|
|
6
|
-
contents {
|
|
7
|
-
json
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
pageInfo {
|
|
12
|
-
hasNextPage
|
|
13
|
-
endCursor
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
query GetUserVaultBalances($address: SuiAddress!) {
|
|
2
|
-
owner(address: $address) {
|
|
3
|
-
alphaPoolReceipts: objects(
|
|
4
|
-
filter: {
|
|
5
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphapool::Receipt"
|
|
6
|
-
}
|
|
7
|
-
) {
|
|
8
|
-
...ReceiptFields
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
cetusSuiPoolReceipts: objects(
|
|
12
|
-
filter: {
|
|
13
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_sui_pool::Receipt"
|
|
14
|
-
}
|
|
15
|
-
) {
|
|
16
|
-
...ReceiptFields
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
cetusPoolReceipts: objects(
|
|
20
|
-
filter: {
|
|
21
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_pool::Receipt"
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
...ReceiptFields
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
cetusPoolBaseAReceipts: objects(
|
|
28
|
-
filter: {
|
|
29
|
-
type: "0x2793db7aa0e0209afc84f0adb1b258973cf1c9da55c35ee85c18f2ed4912bb6f::alphafi_cetus_pool_base_a::Receipt"
|
|
30
|
-
}
|
|
31
|
-
) {
|
|
32
|
-
...ReceiptFields
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
naviPoolReceipts: objects(
|
|
36
|
-
filter: {
|
|
37
|
-
type: "0x8f7d2c35e19c65213bc2153086969a55ec207b5a25ebdee303a6d9edd9c053e3::alphafi_navi_pool::Receipt"
|
|
38
|
-
}
|
|
39
|
-
) {
|
|
40
|
-
...ReceiptFields
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
fragment ReceiptFields on MoveObjectConnection {
|
|
46
|
-
pageInfo {
|
|
47
|
-
hasNextPage
|
|
48
|
-
}
|
|
49
|
-
nodes {
|
|
50
|
-
contents {
|
|
51
|
-
type {
|
|
52
|
-
repr
|
|
53
|
-
}
|
|
54
|
-
json
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
query GetUserVaults($address: SuiAddress!) {
|
|
2
|
-
owner(address: $address) {
|
|
3
|
-
alphaObjects: objects(
|
|
4
|
-
filter: {
|
|
5
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphapool::Receipt"
|
|
6
|
-
}
|
|
7
|
-
) {
|
|
8
|
-
...ReceiptFields
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
alphaSuiObjects: objects(
|
|
12
|
-
filter: {
|
|
13
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_sui_pool::Receipt"
|
|
14
|
-
}
|
|
15
|
-
) {
|
|
16
|
-
...ReceiptFields
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
usdtUsdcObjects: objects(
|
|
20
|
-
filter: {
|
|
21
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_pool::Receipt"
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
...ReceiptFields
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
usdcWbtcObjects: objects(
|
|
28
|
-
filter: {
|
|
29
|
-
type: "0x2793db7aa0e0209afc84f0adb1b258973cf1c9da55c35ee85c18f2ed4912bb6f::alphafi_cetus_pool_base_a::Receipt"
|
|
30
|
-
}
|
|
31
|
-
) {
|
|
32
|
-
...ReceiptFields
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
naviObjects: objects(
|
|
36
|
-
filter: {
|
|
37
|
-
type: "0x8f7d2c35e19c65213bc2153086969a55ec207b5a25ebdee303a6d9edd9c053e3::alphafi_navi_pool::Receipt"
|
|
38
|
-
}
|
|
39
|
-
) {
|
|
40
|
-
...ReceiptFields
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
fragment ReceiptFields on MoveObjectConnection {
|
|
46
|
-
pageInfo {
|
|
47
|
-
hasNextPage
|
|
48
|
-
}
|
|
49
|
-
nodes {
|
|
50
|
-
contents {
|
|
51
|
-
type {
|
|
52
|
-
repr
|
|
53
|
-
}
|
|
54
|
-
json
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
query GetCetusPools {
|
|
2
|
-
alphaSuiCetusPool: object(
|
|
3
|
-
address: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720"
|
|
4
|
-
) {
|
|
5
|
-
...PoolFields
|
|
6
|
-
}
|
|
7
|
-
usdcUsdtCetusPool: object(
|
|
8
|
-
address: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20"
|
|
9
|
-
) {
|
|
10
|
-
...PoolFields
|
|
11
|
-
}
|
|
12
|
-
usdyUsdcCetusPool: object(
|
|
13
|
-
address: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d"
|
|
14
|
-
) {
|
|
15
|
-
...PoolFields
|
|
16
|
-
}
|
|
17
|
-
suiUsdcCetusPool: object(
|
|
18
|
-
address: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630"
|
|
19
|
-
) {
|
|
20
|
-
...PoolFields
|
|
21
|
-
}
|
|
22
|
-
wethUsdcCetusPool: object(
|
|
23
|
-
address: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df"
|
|
24
|
-
) {
|
|
25
|
-
...PoolFields
|
|
26
|
-
}
|
|
27
|
-
wbtcUsdcCetusPool: object(
|
|
28
|
-
address: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042"
|
|
29
|
-
) {
|
|
30
|
-
...PoolFields
|
|
31
|
-
}
|
|
32
|
-
navxSuiCetusPool: object(
|
|
33
|
-
address: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703"
|
|
34
|
-
) {
|
|
35
|
-
...PoolFields
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fragment PoolFields on Object {
|
|
40
|
-
asMoveObject {
|
|
41
|
-
contents {
|
|
42
|
-
type {
|
|
43
|
-
repr
|
|
44
|
-
}
|
|
45
|
-
json
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
query GetInvestors {
|
|
2
|
-
alphaSuiInvestor: object(
|
|
3
|
-
address: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88"
|
|
4
|
-
) {
|
|
5
|
-
...InvestorFields
|
|
6
|
-
}
|
|
7
|
-
usdcUsdtInvestor: object(
|
|
8
|
-
address: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5"
|
|
9
|
-
) {
|
|
10
|
-
...InvestorFields
|
|
11
|
-
}
|
|
12
|
-
usdyUsdcInvestor: object(
|
|
13
|
-
address: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1"
|
|
14
|
-
) {
|
|
15
|
-
...InvestorFields
|
|
16
|
-
}
|
|
17
|
-
suiUsdcInvestor: object(
|
|
18
|
-
address: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55"
|
|
19
|
-
) {
|
|
20
|
-
...InvestorFields
|
|
21
|
-
}
|
|
22
|
-
wethUsdcInvestor: object(
|
|
23
|
-
address: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43"
|
|
24
|
-
) {
|
|
25
|
-
...InvestorFields
|
|
26
|
-
}
|
|
27
|
-
wbtcUsdcInvestor: object(
|
|
28
|
-
address: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc"
|
|
29
|
-
) {
|
|
30
|
-
...InvestorFields
|
|
31
|
-
}
|
|
32
|
-
navxSuiInvestor: object(
|
|
33
|
-
address: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c"
|
|
34
|
-
) {
|
|
35
|
-
...InvestorFields
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
fragment InvestorFields on Object {
|
|
40
|
-
asMoveObject {
|
|
41
|
-
contents {
|
|
42
|
-
type {
|
|
43
|
-
repr
|
|
44
|
-
}
|
|
45
|
-
json
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
query GetLockedTableData(
|
|
2
|
-
$limit: Int
|
|
3
|
-
$after: String
|
|
4
|
-
$lockedTableId: SuiAddress!
|
|
5
|
-
) {
|
|
6
|
-
owner(address: $lockedTableId) {
|
|
7
|
-
dynamicFields(first: $limit, after: $after) {
|
|
8
|
-
pageInfo {
|
|
9
|
-
hasNextPage
|
|
10
|
-
endCursor
|
|
11
|
-
}
|
|
12
|
-
nodes {
|
|
13
|
-
name {
|
|
14
|
-
json
|
|
15
|
-
}
|
|
16
|
-
value {
|
|
17
|
-
__typename
|
|
18
|
-
... on MoveValue {
|
|
19
|
-
json
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
query GetNftHolders($before: String, $receipt: String!) {
|
|
2
|
-
objects(last: 10, before: $before, filter: { type: $receipt }) {
|
|
3
|
-
pageInfo {
|
|
4
|
-
hasNextPage
|
|
5
|
-
hasPreviousPage
|
|
6
|
-
endCursor
|
|
7
|
-
startCursor
|
|
8
|
-
}
|
|
9
|
-
nodes {
|
|
10
|
-
asMoveObject {
|
|
11
|
-
status
|
|
12
|
-
contents {
|
|
13
|
-
json
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
query GetPools {
|
|
2
|
-
alphaPool: object(
|
|
3
|
-
address: "0x6ee8f60226edf48772f81e5986994745dae249c2605a5b12de6602ef1b05b0c1"
|
|
4
|
-
) {
|
|
5
|
-
...PoolFields
|
|
6
|
-
}
|
|
7
|
-
alphaSuiPool: object(
|
|
8
|
-
address: "0x594f13b8f287003fd48e4264e7056e274b84709ada31e3657f00eeedc1547e37"
|
|
9
|
-
) {
|
|
10
|
-
...PoolFields
|
|
11
|
-
}
|
|
12
|
-
usdcUsdtPool: object(
|
|
13
|
-
address: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5"
|
|
14
|
-
) {
|
|
15
|
-
...PoolFields
|
|
16
|
-
}
|
|
17
|
-
usdyUsdcPool: object(
|
|
18
|
-
address: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437"
|
|
19
|
-
) {
|
|
20
|
-
...PoolFields
|
|
21
|
-
}
|
|
22
|
-
suiUsdcPool: object(
|
|
23
|
-
address: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab"
|
|
24
|
-
) {
|
|
25
|
-
...PoolFields
|
|
26
|
-
}
|
|
27
|
-
wethUsdcPool: object(
|
|
28
|
-
address: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6"
|
|
29
|
-
) {
|
|
30
|
-
...PoolFields
|
|
31
|
-
}
|
|
32
|
-
wbtcUsdcPool: object(
|
|
33
|
-
address: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a"
|
|
34
|
-
) {
|
|
35
|
-
...PoolFields
|
|
36
|
-
}
|
|
37
|
-
navxSuiPool: object(
|
|
38
|
-
address: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0"
|
|
39
|
-
) {
|
|
40
|
-
...PoolFields
|
|
41
|
-
}
|
|
42
|
-
usdtPool: object(
|
|
43
|
-
address: "0xc696ca5b8f21a1f8fcd62cff16bbe5a396a4bed6f67909cfec8269eb16e60757"
|
|
44
|
-
) {
|
|
45
|
-
...PoolFields
|
|
46
|
-
}
|
|
47
|
-
suiPool: object(
|
|
48
|
-
address: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3"
|
|
49
|
-
) {
|
|
50
|
-
...PoolFields
|
|
51
|
-
}
|
|
52
|
-
vsuiPool: object(
|
|
53
|
-
address: "0x0d9598006d37077b4935400f6525d7f1070784e2d6f04765d76ae0a4880f7d0a"
|
|
54
|
-
) {
|
|
55
|
-
...PoolFields
|
|
56
|
-
}
|
|
57
|
-
usdcPool: object(
|
|
58
|
-
address: "0x01493446093dfcdcfc6c16dc31ffe40ba9ac2e99a3f6c16a0d285bff861944ae"
|
|
59
|
-
) {
|
|
60
|
-
...PoolFields
|
|
61
|
-
}
|
|
62
|
-
wethPool: object(
|
|
63
|
-
address: "0xe4eef7d4d8cafa3ef90ea486ff7d1eec347718375e63f1f778005ae646439aad"
|
|
64
|
-
) {
|
|
65
|
-
...PoolFields
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
fragment PoolFields on Object {
|
|
70
|
-
asMoveObject {
|
|
71
|
-
contents {
|
|
72
|
-
type {
|
|
73
|
-
repr
|
|
74
|
-
}
|
|
75
|
-
json
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
query GetReceiptData($limit: Int, $receiptType: String!, $after: String) {
|
|
2
|
-
objects(first: $limit, after: $after, filter: { type: $receiptType }) {
|
|
3
|
-
nodes {
|
|
4
|
-
asMoveObject {
|
|
5
|
-
status
|
|
6
|
-
contents {
|
|
7
|
-
json
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
pageInfo {
|
|
12
|
-
hasNextPage
|
|
13
|
-
endCursor
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
query GetUserVaultBalances($address: SuiAddress!) {
|
|
2
|
-
owner(address: $address) {
|
|
3
|
-
alphaPoolReceipts: objects(
|
|
4
|
-
filter: {
|
|
5
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphapool::Receipt"
|
|
6
|
-
}
|
|
7
|
-
) {
|
|
8
|
-
...ReceiptFields
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
cetusSuiPoolReceipts: objects(
|
|
12
|
-
filter: {
|
|
13
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_sui_pool::Receipt"
|
|
14
|
-
}
|
|
15
|
-
) {
|
|
16
|
-
...ReceiptFields
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
cetusPoolReceipts: objects(
|
|
20
|
-
filter: {
|
|
21
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_pool::Receipt"
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
...ReceiptFields
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
cetusPoolBaseAReceipts: objects(
|
|
28
|
-
filter: {
|
|
29
|
-
type: "0x2793db7aa0e0209afc84f0adb1b258973cf1c9da55c35ee85c18f2ed4912bb6f::alphafi_cetus_pool_base_a::Receipt"
|
|
30
|
-
}
|
|
31
|
-
) {
|
|
32
|
-
...ReceiptFields
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
naviPoolReceipts: objects(
|
|
36
|
-
filter: {
|
|
37
|
-
type: "0x8f7d2c35e19c65213bc2153086969a55ec207b5a25ebdee303a6d9edd9c053e3::alphafi_navi_pool::Receipt"
|
|
38
|
-
}
|
|
39
|
-
) {
|
|
40
|
-
...ReceiptFields
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
fragment ReceiptFields on MoveObjectConnection {
|
|
46
|
-
pageInfo {
|
|
47
|
-
hasNextPage
|
|
48
|
-
}
|
|
49
|
-
nodes {
|
|
50
|
-
contents {
|
|
51
|
-
type {
|
|
52
|
-
repr
|
|
53
|
-
}
|
|
54
|
-
json
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
query GetUserVaults($address: SuiAddress!) {
|
|
2
|
-
owner(address: $address) {
|
|
3
|
-
alphaObjects: objects(
|
|
4
|
-
filter: {
|
|
5
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphapool::Receipt"
|
|
6
|
-
}
|
|
7
|
-
) {
|
|
8
|
-
...ReceiptFields
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
alphaSuiObjects: objects(
|
|
12
|
-
filter: {
|
|
13
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_sui_pool::Receipt"
|
|
14
|
-
}
|
|
15
|
-
) {
|
|
16
|
-
...ReceiptFields
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
usdtUsdcObjects: objects(
|
|
20
|
-
filter: {
|
|
21
|
-
type: "0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphafi_cetus_pool::Receipt"
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
...ReceiptFields
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
usdcWbtcObjects: objects(
|
|
28
|
-
filter: {
|
|
29
|
-
type: "0x2793db7aa0e0209afc84f0adb1b258973cf1c9da55c35ee85c18f2ed4912bb6f::alphafi_cetus_pool_base_a::Receipt"
|
|
30
|
-
}
|
|
31
|
-
) {
|
|
32
|
-
...ReceiptFields
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
naviObjects: objects(
|
|
36
|
-
filter: {
|
|
37
|
-
type: "0x8f7d2c35e19c65213bc2153086969a55ec207b5a25ebdee303a6d9edd9c053e3::alphafi_navi_pool::Receipt"
|
|
38
|
-
}
|
|
39
|
-
) {
|
|
40
|
-
...ReceiptFields
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
fragment ReceiptFields on MoveObjectConnection {
|
|
46
|
-
pageInfo {
|
|
47
|
-
hasNextPage
|
|
48
|
-
}
|
|
49
|
-
nodes {
|
|
50
|
-
contents {
|
|
51
|
-
type {
|
|
52
|
-
repr
|
|
53
|
-
}
|
|
54
|
-
json
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
package/embed-graphql.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
//const chokidar = require("chokidar");
|
|
4
|
-
|
|
5
|
-
const filesToEmbed = [
|
|
6
|
-
{
|
|
7
|
-
source: path.resolve(__dirname, "./src/graphql/queries/userVaults.graphql"),
|
|
8
|
-
target: path.resolve(__dirname, "./src/graphql/queries/userVaults.ts"),
|
|
9
|
-
variableName: "userVaults",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
source: path.resolve(
|
|
13
|
-
__dirname,
|
|
14
|
-
"./src/graphql/queries/userVaultBalances.graphql",
|
|
15
|
-
),
|
|
16
|
-
target: path.resolve(
|
|
17
|
-
__dirname,
|
|
18
|
-
"./src/graphql/queries/userVaultBalances.ts",
|
|
19
|
-
),
|
|
20
|
-
variableName: "userVaultBalances",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
source: path.resolve(__dirname, "./src/graphql/queries/pools.graphql"),
|
|
24
|
-
target: path.resolve(__dirname, "./src/graphql/queries/pools.ts"),
|
|
25
|
-
variableName: "pools",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
source: path.resolve(__dirname, "./src/graphql/queries/investors.graphql"),
|
|
29
|
-
target: path.resolve(__dirname, "./src/graphql/queries/investors.ts"),
|
|
30
|
-
variableName: "investors",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
source: path.resolve(__dirname, "./src/graphql/queries/cetusPools.graphql"),
|
|
34
|
-
target: path.resolve(__dirname, "./src/graphql/queries/cetusPools.ts"),
|
|
35
|
-
variableName: "cetusPools",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
source: path.resolve(
|
|
39
|
-
__dirname,
|
|
40
|
-
"./src/graphql/queries/autoCompoundEvents.graphql",
|
|
41
|
-
),
|
|
42
|
-
target: path.resolve(
|
|
43
|
-
__dirname,
|
|
44
|
-
"./src/graphql/queries/autoCompoundEvents.ts",
|
|
45
|
-
),
|
|
46
|
-
variableName: "autoCompoundEvents",
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
source: path.resolve(__dirname, "./src/graphql/queries/nftHolders.graphql"),
|
|
50
|
-
target: path.resolve(__dirname, "./src/graphql/queries/nftHolders.ts"),
|
|
51
|
-
variableName: "nftHolders",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
source: path.resolve(
|
|
55
|
-
__dirname,
|
|
56
|
-
"./src/graphql/queries/receiptData.graphql",
|
|
57
|
-
),
|
|
58
|
-
target: path.resolve(__dirname, "./src/graphql/queries/receiptData.ts"),
|
|
59
|
-
variableName: "receiptData",
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
source: path.resolve(
|
|
63
|
-
__dirname,
|
|
64
|
-
"./src/graphql/queries/lockedTableDataFragment.graphql",
|
|
65
|
-
),
|
|
66
|
-
target: path.resolve(
|
|
67
|
-
__dirname,
|
|
68
|
-
"./src/graphql/queries/lockedTableDataFragment.ts",
|
|
69
|
-
),
|
|
70
|
-
variableName: "lockedTableDataFragment",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
source: path.resolve(
|
|
74
|
-
__dirname,
|
|
75
|
-
"./src/graphql/queries/lockedTableData.graphql",
|
|
76
|
-
),
|
|
77
|
-
target: path.resolve(__dirname, "./src/graphql/queries/lockedTableData.ts"),
|
|
78
|
-
variableName: "lockedTableData",
|
|
79
|
-
},
|
|
80
|
-
];
|
|
81
|
-
|
|
82
|
-
function embedGraphQL() {
|
|
83
|
-
filesToEmbed.forEach(({ source, target, variableName }) => {
|
|
84
|
-
const content = fs.readFileSync(source, "utf-8");
|
|
85
|
-
const tsContent = `export const ${variableName} = \`${content}\`;`;
|
|
86
|
-
fs.writeFileSync(target, tsContent);
|
|
87
|
-
console.log(`Embedded ${path.basename(source)} into ${target}`);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Run initially
|
|
92
|
-
embedGraphQL();
|
|
93
|
-
|
|
94
|
-
// Watch for changes in GraphQL files and re-embed
|
|
95
|
-
// chokidar.watch(filesToEmbed.map((f) => f.source)).on("change", embedGraphQL);
|
package/jest.config.cjs.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
preset: "ts-jest",
|
|
3
|
-
testEnvironment: "node",
|
|
4
|
-
rootDir: "__tests__", // root directory for Jest
|
|
5
|
-
transform: {
|
|
6
|
-
"^.+\\.ts$": [
|
|
7
|
-
"ts-jest",
|
|
8
|
-
{
|
|
9
|
-
useESM: false, // Do not treat files as ESM
|
|
10
|
-
tsconfig: "tsconfig.cjs.json", // Path to your TypeScript config for CJS
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
};
|
package/jest.config.esm.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
preset: "ts-jest/presets/default-esm",
|
|
3
|
-
testEnvironment: "node",
|
|
4
|
-
rootDir: "__tests__", // root directory for Jest
|
|
5
|
-
extensionsToTreatAsEsm: [".ts"], // Treat TypeScript files as ESM
|
|
6
|
-
transform: {
|
|
7
|
-
"^.+\\.ts$": [
|
|
8
|
-
"ts-jest",
|
|
9
|
-
{
|
|
10
|
-
useESM: true, // ts-jest ESM support
|
|
11
|
-
tsconfig: "tsconfig.esm.json", // Path to your TypeScript config for ESM
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
};
|
package/tsconfig.cjs.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.esm.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"moduleResolution": "Node",
|
|
6
|
-
"target": "es2020",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"outDir": "./dist/cjs",
|
|
9
|
-
"rootDir": "./src",
|
|
10
|
-
// Add the baseUrl option
|
|
11
|
-
"baseUrl": "./", // Specifies the base directory for non-relative module names
|
|
12
|
-
"paths": {
|
|
13
|
-
"@mysten/sui/*": ["node_modules/@mysten/sui/dist/cjs/*"]
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"include": ["src/**/*"],
|
|
17
|
-
"exclude": ["src/__tests__"]
|
|
18
|
-
}
|
package/tsconfig.esm.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "NodeNext",
|
|
4
|
-
"moduleResolution": "NodeNext",
|
|
5
|
-
"target": "ES2022",
|
|
6
|
-
"outDir": "./dist/esm",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
|
|
9
|
-
// build
|
|
10
|
-
"types": ["node", "jest"],
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"preserveConstEnums": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"importHelpers": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"allowJs": true,
|
|
17
|
-
"checkJs": true,
|
|
18
|
-
|
|
19
|
-
// linting
|
|
20
|
-
"strict": true,
|
|
21
|
-
|
|
22
|
-
// sources
|
|
23
|
-
"sourceMap": true,
|
|
24
|
-
"declaration": true,
|
|
25
|
-
"declarationMap": true,
|
|
26
|
-
"inlineSources": true,
|
|
27
|
-
// Add the baseUrl option
|
|
28
|
-
"baseUrl": "./", // Specifies the base directory for non-relative module names
|
|
29
|
-
"paths": {
|
|
30
|
-
"@mysten/sui/*": ["node_modules/@mysten/sui/dist/esm/*"]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"include": ["src/**/*"],
|
|
34
|
-
"exclude": ["src/__tests__"]
|
|
35
|
-
}
|