@alphafi/alphafi-sdk 0.0.9 → 0.0.11
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/.envrc +1 -0
- package/.eslintrc.json +21 -0
- package/.github/workflows/static.yml +51 -0
- package/.prettierrc.json +27 -0
- package/.prettierrc.json~ +30 -0
- package/__tests__/getAprs.test.ts~ +9 -0
- package/__tests__/getRebalanceHistory.test.ts~ +19 -0
- package/apr.org +11 -0
- package/babel.config.json +11 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +42 -22
- package/dist/index.js.map +1 -1
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1448 -0
- package/docs/functions/alphaLpBreakdown.html +1 -0
- package/docs/functions/cetusLpBreakdown.html +1 -0
- package/docs/functions/collectRewards.html +1 -0
- package/docs/functions/deposit.html +1 -0
- package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -0
- package/docs/functions/fetchCetusPools.html +1 -0
- package/docs/functions/fetchChainIdentifier.html +1 -0
- package/docs/functions/fetchNftHolders.html +1 -0
- package/docs/functions/fetchPools.html +1 -0
- package/docs/functions/fetchPortfolioData.html +1 -0
- package/docs/functions/fetchProtocolData.html +1 -0
- package/docs/functions/fetchUserVaultBalances.html +1 -0
- package/docs/functions/fetchUserVaults.html +1 -0
- package/docs/functions/fetchUserWalletData.html +1 -0
- package/docs/functions/getAirdropShare.html +1 -0
- package/docs/functions/getAllDoubleAssetVaults.html +1 -0
- package/docs/functions/getAllSingleAssetVaults.html +1 -0
- package/docs/functions/getAllVaults.html +1 -0
- package/docs/functions/getAlphaVaultBalance.html +1 -0
- package/docs/functions/getApr.html +1 -0
- package/docs/functions/getAprs.html +1 -0
- package/docs/functions/getApy.html +1 -0
- package/docs/functions/getApys.html +1 -0
- package/docs/functions/getDoubleAssetVaultBalance.html +1 -0
- package/docs/functions/getDoubleAssetVaults.html +1 -0
- package/docs/functions/getRebalanceHistories.html +1 -0
- package/docs/functions/getRebalanceHistory.html +1 -0
- package/docs/functions/getSingleAssetVaultBalance.html +1 -0
- package/docs/functions/getSingleAssetVaults.html +1 -0
- package/docs/functions/getVaultBalance.html +1 -0
- package/docs/functions/getVaults.html +1 -0
- package/docs/functions/lastAutocompoundTime.html +1 -0
- package/docs/functions/parseUserWalletData.html +1 -0
- package/docs/functions/withdraw.html +1 -0
- package/docs/index.html +40 -0
- package/docs/interfaces/Coin.html +5 -0
- package/docs/interfaces/CoinPair.html +3 -0
- package/docs/interfaces/RebalanceHistoryType.html +5 -0
- package/docs/modules.html +66 -0
- package/docs/types/AlphaFiDoubleAssetVault.html +1 -0
- package/docs/types/AlphaFiSingleAssetVault.html +1 -0
- package/docs/types/AlphaFiVault.html +1 -0
- package/docs/types/AlphaFiVaultBalance.html +1 -0
- package/docs/types/AlphaPoolType.html +1 -0
- package/docs/types/AlphaReceipt.html +1 -0
- package/docs/types/AlphaVaultBalance.html +1 -0
- package/docs/types/AutoCompoundingEventNode.html +1 -0
- package/docs/types/CetusInvestor.html +1 -0
- package/docs/types/CetusPoolType.html +1 -0
- package/docs/types/CetusSwapOptions.html +1 -0
- package/docs/types/CoinAmounts.html +1 -0
- package/docs/types/CoinName.html +1 -0
- package/docs/types/CoinType.html +1 -0
- package/docs/types/CreatePoolOptions.html +1 -0
- package/docs/types/DoubleAssetVaultBalance.html +1 -0
- package/docs/types/Icon.html +1 -0
- package/docs/types/LpBreakdownType.html +1 -0
- package/docs/types/ParentProtocolName.html +1 -0
- package/docs/types/PoolName.html +1 -0
- package/docs/types/PoolReceipt.html +1 -0
- package/docs/types/PoolType.html +1 -0
- package/docs/types/Receipt.html +1 -0
- package/docs/types/SingleAssetVaultBalance.html +1 -0
- package/docs/types/SuiNetwork.html +1 -0
- package/docs/types/SwapOptions.html +1 -0
- package/docs/types/TickSpacing.html +1 -0
- package/docs/types/TransactionBlockType.html +1 -0
- package/events.csv +61 -0
- package/events.csv~ +71 -0
- package/jest.config.js +5 -0
- package/package.json +30 -29
- package/package.json~ +56 -0
- package/tsconfig.json~ +16 -0
- package/tsconfig.test.json~ +17 -0
- package/typedoc.json +8 -0
- package/webpack.config.cjs~ +63 -0
- package/webpack.config.js +54 -0
- package/webpack.config.js~ +50 -0
- package/webpack.config.ts~ +64 -0
- package/dist/common/alphaTypes.d.ts +0 -110
- package/dist/common/alphaTypes.d.ts.map +0 -1
- package/dist/common/cetus_mainnet_config.d.ts +0 -3
- package/dist/common/cetus_mainnet_config.d.ts.map +0 -1
- package/dist/common/coins.d.ts +0 -5
- package/dist/common/coins.d.ts.map +0 -1
- package/dist/common/constants.d.ts +0 -294
- package/dist/common/constants.d.ts.map +0 -1
- package/dist/common/maps.d.ts +0 -32
- package/dist/common/maps.d.ts.map +0 -1
- package/dist/common/pyth.d.ts +0 -7
- package/dist/common/pyth.d.ts.map +0 -1
- package/dist/common/types.d.ts +0 -391
- package/dist/common/types.d.ts.map +0 -1
- package/dist/functions.d.ts +0 -26
- package/dist/functions.d.ts.map +0 -1
- package/dist/getAirdropShare.d.ts +0 -5
- package/dist/getAirdropShare.d.ts.map +0 -1
- package/dist/getAllVaults.d.ts +0 -4
- package/dist/getAllVaults.d.ts.map +0 -1
- package/dist/getVaultBalances.d.ts +0 -5
- package/dist/getVaultBalances.d.ts.map +0 -1
- package/dist/getVaults.d.ts +0 -5
- package/dist/getVaults.d.ts.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/portfolioAmount.d.ts +0 -36
- package/dist/portfolioAmount.d.ts.map +0 -1
- package/dist/price.d.ts +0 -19
- package/dist/price.d.ts.map +0 -1
- package/dist/vaultFunctions.d.ts +0 -15
- package/dist/vaultFunctions.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphafi/alphafi-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "AlphaFi SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
+
"buildNoPrettier": "npm run lint && webpack && npm link",
|
|
9
|
+
"build": "npm run prettier && npm run lint && webpack && npm link",
|
|
8
10
|
"test": "jest",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
+
"lint": "eslint 'src/**/*.ts' --fix",
|
|
12
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
13
|
+
"docs": "typedoc"
|
|
11
14
|
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
|
|
14
|
-
"blockchain",
|
|
15
|
-
"defi"
|
|
16
|
-
],
|
|
17
|
-
"author": "AlphaFi Team <hello@alphafi.xyz> (https://alphafi.xyz/)",
|
|
15
|
+
"keywords": [],
|
|
16
|
+
"author": "",
|
|
18
17
|
"license": "ISC",
|
|
19
18
|
"devDependencies": {
|
|
20
|
-
"@babel/
|
|
21
|
-
"@babel/
|
|
19
|
+
"@babel/cli": "7.24.8",
|
|
20
|
+
"@babel/core": "7.25.2",
|
|
21
|
+
"@babel/preset-env": "7.25.3",
|
|
22
|
+
"@babel/preset-typescript": "7.24.7",
|
|
22
23
|
"@types/bn.js": "^5.1.5",
|
|
23
24
|
"@types/jest": "^29.5.12",
|
|
24
|
-
"@types/node": "
|
|
25
|
-
"@
|
|
26
|
-
"@typescript-eslint/
|
|
27
|
-
"
|
|
28
|
-
"babel-jest": "^29.7.0",
|
|
25
|
+
"@types/node": "20.14.9",
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
|
27
|
+
"@typescript-eslint/parser": "^7.14.1",
|
|
28
|
+
"babel-loader": "^9.1.3",
|
|
29
29
|
"clean-webpack-plugin": "^4.0.0",
|
|
30
30
|
"eslint": "^8.57.0",
|
|
31
31
|
"eslint-config-prettier": "^9.1.0",
|
|
32
32
|
"eslint-plugin-import": "^2.29.1",
|
|
33
|
-
"eslint-plugin-prettier": "^5.
|
|
33
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
34
34
|
"jest": "^29.7.0",
|
|
35
|
-
"prettier": "^3.3.
|
|
35
|
+
"prettier": "^3.3.2",
|
|
36
36
|
"source-map-loader": "^5.0.0",
|
|
37
|
-
"ts-jest": "^29.2.
|
|
37
|
+
"ts-jest": "^29.2.1",
|
|
38
38
|
"ts-loader": "^9.5.1",
|
|
39
|
+
"ts-node": "^10.9.2",
|
|
40
|
+
"typedoc": "^0.26.6",
|
|
39
41
|
"typescript": "^5.5.3",
|
|
40
|
-
"webpack": "^5.
|
|
42
|
+
"webpack": "^5.92.1",
|
|
41
43
|
"webpack-cli": "^5.1.4"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
+
"@apollo/client": "^3.11.4",
|
|
47
|
+
"@cetusprotocol/cetus-sui-clmm-sdk": "^5.1.3",
|
|
48
|
+
"@mysten/sui": "1.6.0",
|
|
49
|
+
"bignumber.js": "^9.1.2",
|
|
46
50
|
"bn.js": "^5.2.1",
|
|
47
51
|
"decimal.js": "^10.4.3",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
}
|
|
51
|
-
"files": [
|
|
52
|
-
"dist"
|
|
53
|
-
]
|
|
52
|
+
"graphql": "^16.9.0",
|
|
53
|
+
"react": "^18.3.1"
|
|
54
|
+
}
|
|
54
55
|
}
|
package/package.json~
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sui-alpha-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "npm run prettier && npm run lint && tsc -p tsconfig.build.json && webpack --config webpack.config.js",
|
|
9
|
+
"lint": "eslint 'src/**/*.ts' --fix",
|
|
10
|
+
"prettier": "prettier --write 'src/**/*.ts'",
|
|
11
|
+
"test": "jest"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"author": "",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@babel/cli": "7.24.8",
|
|
18
|
+
"@babel/core": "7.25.2",
|
|
19
|
+
"@babel/preset-env": "7.25.3",
|
|
20
|
+
"@babel/preset-typescript": "7.24.7",
|
|
21
|
+
"@types/bn.js": "^5.1.5",
|
|
22
|
+
"@types/jest": "^29.5.12",
|
|
23
|
+
"@types/node": "20.14.9",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
|
25
|
+
"@typescript-eslint/parser": "^7.14.1",
|
|
26
|
+
"babel-loader": "^9.1.3",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
|
+
"eslint-config-prettier": "^9.1.0",
|
|
29
|
+
"eslint-plugin-import": "^2.29.1",
|
|
30
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
31
|
+
"jest": "^29.7.0",
|
|
32
|
+
"prettier": "^3.3.2",
|
|
33
|
+
"source-map-loader": "^5.0.0",
|
|
34
|
+
"ts-jest": "^29.2.1",
|
|
35
|
+
"ts-loader": "^9.5.1",
|
|
36
|
+
"ts-node": "^10.9.2",
|
|
37
|
+
"typescript": "^5.5.3",
|
|
38
|
+
"webpack": "^5.92.1",
|
|
39
|
+
"webpack-cli": "^5.1.4"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@7kprotocol/sdk-ts": "^2.1.0",
|
|
43
|
+
"@aws-sdk/client-dynamodb": "^3.609.0",
|
|
44
|
+
"@cetusprotocol/cetus-sui-clmm-sdk": "5.1.2",
|
|
45
|
+
"@hop.ag/sdk": "^3.1.6",
|
|
46
|
+
"@mysten/dapp-kit": "0.14.16",
|
|
47
|
+
"@mysten/sui": "1.6.0",
|
|
48
|
+
"@mysten/wallet-standard": "0.13.1",
|
|
49
|
+
"@pythnetwork/pyth-sui-js": "^2.0.0",
|
|
50
|
+
"@types/node": "^20.14.10",
|
|
51
|
+
"bech32": "^2.0.0",
|
|
52
|
+
"dotenv": "^16.4.5",
|
|
53
|
+
"fs": "^0.0.1-security",
|
|
54
|
+
"readline": "^1.3.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/tsconfig.json~
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"declaration": true,
|
|
11
|
+
"declarationDir": "./dist",
|
|
12
|
+
"types": ["jest", "node"]
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"],
|
|
15
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"declarationDir": "./dist",
|
|
13
|
+
"types": ["jest", "node"]
|
|
14
|
+
},
|
|
15
|
+
"include": ["src"],
|
|
16
|
+
"exclude": ["node_modules", "**/*.spec.ts"]
|
|
17
|
+
}
|
package/typedoc.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as path from "path";
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
entry: "./src/index.ts",
|
|
5
|
+
target: "web",
|
|
6
|
+
mode: "production", // or 'development' depending on your needs
|
|
7
|
+
module: {
|
|
8
|
+
rules: [
|
|
9
|
+
{
|
|
10
|
+
test: /\.ts$/,
|
|
11
|
+
use: [
|
|
12
|
+
{
|
|
13
|
+
loader: "babel-loader",
|
|
14
|
+
options: {
|
|
15
|
+
presets: ["@babel/preset-env", "@babel/preset-typescript"],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
"ts-loader",
|
|
19
|
+
],
|
|
20
|
+
exclude: /node_modules/,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
test: /\.js$/,
|
|
24
|
+
use: ["source-map-loader"],
|
|
25
|
+
enforce: "pre",
|
|
26
|
+
exclude: /node_modules/,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
resolve: {
|
|
31
|
+
extensions: [".ts", ".js"],
|
|
32
|
+
fallback: {
|
|
33
|
+
fs: false,
|
|
34
|
+
path: require.resolve("path-browserify"),
|
|
35
|
+
crypto: require.resolve("crypto-browserify"),
|
|
36
|
+
stream: require.resolve("stream-browserify"),
|
|
37
|
+
assert: require.resolve("assert/"),
|
|
38
|
+
http: require.resolve("stream-http"),
|
|
39
|
+
https: require.resolve("https-browserify"),
|
|
40
|
+
os: require.resolve("os-browserify/browser"),
|
|
41
|
+
url: require.resolve("url/"),
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
output: {
|
|
45
|
+
filename: "[name].bundle.js",
|
|
46
|
+
path: path.resolve(__dirname, "dist"),
|
|
47
|
+
libraryTarget: "umd",
|
|
48
|
+
globalObject: "this",
|
|
49
|
+
},
|
|
50
|
+
optimization: {
|
|
51
|
+
splitChunks: {
|
|
52
|
+
chunks: "all",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
devtool: "source-map", // Generate source maps
|
|
56
|
+
performance: {
|
|
57
|
+
hints: "warning",
|
|
58
|
+
maxAssetSize: 1024000, // Set size in bytes (1 MiB)
|
|
59
|
+
maxEntrypointSize: 1048576, // Set size in bytes (1 MiB)
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default config;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
entry: "./src/index.ts",
|
|
6
|
+
target: "web",
|
|
7
|
+
mode: "production", // or 'development' depending on your needs
|
|
8
|
+
module: {
|
|
9
|
+
rules: [
|
|
10
|
+
{
|
|
11
|
+
test: /\.graphql$/,
|
|
12
|
+
exclude: /node_modules/,
|
|
13
|
+
loader: "graphql-tag/loader",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
test: /\.ts$/,
|
|
17
|
+
use: [
|
|
18
|
+
{
|
|
19
|
+
loader: "babel-loader",
|
|
20
|
+
options: {
|
|
21
|
+
presets: ["@babel/preset-env", "@babel/preset-typescript"],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
"ts-loader",
|
|
25
|
+
],
|
|
26
|
+
exclude: /node_modules/,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
test: /\.js$/,
|
|
30
|
+
use: ["source-map-loader"],
|
|
31
|
+
enforce: "pre",
|
|
32
|
+
exclude: /node_modules/,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
resolve: {
|
|
37
|
+
extensions: [".ts", ".js"],
|
|
38
|
+
},
|
|
39
|
+
output: {
|
|
40
|
+
filename: "index.js",
|
|
41
|
+
path: path.resolve(__dirname, "dist"),
|
|
42
|
+
libraryTarget: "umd",
|
|
43
|
+
globalObject: "this",
|
|
44
|
+
},
|
|
45
|
+
devtool: "source-map", // Generate source maps
|
|
46
|
+
performance: {
|
|
47
|
+
hints: "warning",
|
|
48
|
+
maxAssetSize: 1024000, // Set size in bytes (1 MiB)
|
|
49
|
+
maxEntrypointSize: 1048576, // Set size in bytes (1 MiB)
|
|
50
|
+
},
|
|
51
|
+
plugins: [
|
|
52
|
+
new CleanWebpackPlugin(), // Clean output directory before build
|
|
53
|
+
],
|
|
54
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: "./src/index.ts",
|
|
5
|
+
target: "web",
|
|
6
|
+
mode: "production", // or 'development' depending on your needs
|
|
7
|
+
module: {
|
|
8
|
+
rules: [
|
|
9
|
+
{
|
|
10
|
+
test: /\.ts$/,
|
|
11
|
+
use: [
|
|
12
|
+
{
|
|
13
|
+
loader: "babel-loader",
|
|
14
|
+
options: {
|
|
15
|
+
presets: ["@babel/preset-env", "@babel/preset-typescript"],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
"ts-loader",
|
|
19
|
+
],
|
|
20
|
+
exclude: /node_modules/,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
test: /\.js$/,
|
|
24
|
+
use: ["source-map-loader"],
|
|
25
|
+
enforce: "pre",
|
|
26
|
+
exclude: /node_modules/,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
resolve: {
|
|
31
|
+
extensions: [".ts", ".js"],
|
|
32
|
+
},
|
|
33
|
+
output: {
|
|
34
|
+
filename: "[name].bundle.js",
|
|
35
|
+
path: path.resolve(__dirname, "dist"),
|
|
36
|
+
libraryTarget: "umd",
|
|
37
|
+
globalObject: "this",
|
|
38
|
+
},
|
|
39
|
+
optimization: {
|
|
40
|
+
splitChunks: {
|
|
41
|
+
chunks: "all",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
devtool: "source-map", // Generate source maps
|
|
45
|
+
performance: {
|
|
46
|
+
hints: "warning",
|
|
47
|
+
maxAssetSize: 1024000, // Set size in bytes (1 MiB)
|
|
48
|
+
maxEntrypointSize: 1048576, // Set size in bytes (1 MiB)
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import webpack from "webpack";
|
|
3
|
+
|
|
4
|
+
const config: webpack.Configuration = {
|
|
5
|
+
entry: "./src/index.ts",
|
|
6
|
+
target: "web",
|
|
7
|
+
mode: "production", // or 'development' depending on your needs
|
|
8
|
+
module: {
|
|
9
|
+
rules: [
|
|
10
|
+
{
|
|
11
|
+
test: /\.ts$/,
|
|
12
|
+
use: [
|
|
13
|
+
{
|
|
14
|
+
loader: "babel-loader",
|
|
15
|
+
options: {
|
|
16
|
+
presets: ["@babel/preset-env", "@babel/preset-typescript"],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
"ts-loader",
|
|
20
|
+
],
|
|
21
|
+
exclude: /node_modules/,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
test: /\.js$/,
|
|
25
|
+
use: ["source-map-loader"],
|
|
26
|
+
enforce: "pre",
|
|
27
|
+
exclude: /node_modules/,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
resolve: {
|
|
32
|
+
extensions: [".ts", ".js"],
|
|
33
|
+
fallback: {
|
|
34
|
+
fs: false,
|
|
35
|
+
path: require.resolve("path-browserify"),
|
|
36
|
+
crypto: require.resolve("crypto-browserify"),
|
|
37
|
+
stream: require.resolve("stream-browserify"),
|
|
38
|
+
assert: require.resolve("assert/"),
|
|
39
|
+
http: require.resolve("stream-http"),
|
|
40
|
+
https: require.resolve("https-browserify"),
|
|
41
|
+
os: require.resolve("os-browserify/browser"),
|
|
42
|
+
url: require.resolve("url/"),
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
output: {
|
|
46
|
+
filename: "[name].bundle.js",
|
|
47
|
+
path: path.resolve(__dirname, "dist"),
|
|
48
|
+
libraryTarget: "umd",
|
|
49
|
+
globalObject: "this",
|
|
50
|
+
},
|
|
51
|
+
optimization: {
|
|
52
|
+
splitChunks: {
|
|
53
|
+
chunks: "all",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
devtool: "source-map", // Generate source maps
|
|
57
|
+
performance: {
|
|
58
|
+
hints: "warning",
|
|
59
|
+
maxAssetSize: 1024000, // Set size in bytes (1 MiB)
|
|
60
|
+
maxEntrypointSize: 1048576, // Set size in bytes (1 MiB)
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default config;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
export type Distributor = {
|
|
2
|
-
objectId: string;
|
|
3
|
-
version: string;
|
|
4
|
-
digest: string;
|
|
5
|
-
type: string;
|
|
6
|
-
content: {
|
|
7
|
-
dataType: string;
|
|
8
|
-
type: string;
|
|
9
|
-
hasPublicTransfer: boolean;
|
|
10
|
-
fields: {
|
|
11
|
-
airdrop_wallet: string;
|
|
12
|
-
airdrop_wallet_balance: string;
|
|
13
|
-
dust_wallet_address: string;
|
|
14
|
-
fee_wallet: string;
|
|
15
|
-
id: {
|
|
16
|
-
id: string;
|
|
17
|
-
};
|
|
18
|
-
next_halving_timestamp: string;
|
|
19
|
-
pool_allocator: Allocator;
|
|
20
|
-
reward_unlock: {
|
|
21
|
-
fields: {
|
|
22
|
-
contents: [];
|
|
23
|
-
};
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
start_timestamp: string;
|
|
27
|
-
target: string;
|
|
28
|
-
team_wallet_address: string;
|
|
29
|
-
team_wallet_balance: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export type Allocator = {
|
|
34
|
-
fields: {
|
|
35
|
-
id: {
|
|
36
|
-
id: string;
|
|
37
|
-
};
|
|
38
|
-
members: {
|
|
39
|
-
fields: {
|
|
40
|
-
contents: MemberType[];
|
|
41
|
-
};
|
|
42
|
-
type: string;
|
|
43
|
-
};
|
|
44
|
-
rewards: {
|
|
45
|
-
fields: {
|
|
46
|
-
id: {
|
|
47
|
-
id: string;
|
|
48
|
-
};
|
|
49
|
-
size: string;
|
|
50
|
-
};
|
|
51
|
-
type: string;
|
|
52
|
-
};
|
|
53
|
-
total_weights: {
|
|
54
|
-
fields: {
|
|
55
|
-
contents: TotalWeightType[];
|
|
56
|
-
};
|
|
57
|
-
type: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
type: string;
|
|
61
|
-
};
|
|
62
|
-
export type TotalWeightType = {
|
|
63
|
-
fields: {
|
|
64
|
-
key: {
|
|
65
|
-
fields: {
|
|
66
|
-
name: string;
|
|
67
|
-
};
|
|
68
|
-
type: string;
|
|
69
|
-
};
|
|
70
|
-
value: string;
|
|
71
|
-
};
|
|
72
|
-
type: string;
|
|
73
|
-
};
|
|
74
|
-
export type MemberPoolDataType = {
|
|
75
|
-
fields: {
|
|
76
|
-
key: {
|
|
77
|
-
fields: {
|
|
78
|
-
name: string;
|
|
79
|
-
};
|
|
80
|
-
type: string;
|
|
81
|
-
};
|
|
82
|
-
value: {
|
|
83
|
-
fields: {
|
|
84
|
-
last_update_time: string;
|
|
85
|
-
pending_rewards: string;
|
|
86
|
-
weight: string;
|
|
87
|
-
};
|
|
88
|
-
type: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
type: string;
|
|
92
|
-
};
|
|
93
|
-
export type MemberType = {
|
|
94
|
-
fields: {
|
|
95
|
-
key: string;
|
|
96
|
-
value: {
|
|
97
|
-
fields: {
|
|
98
|
-
pool_data: {
|
|
99
|
-
fields: {
|
|
100
|
-
contents: MemberPoolDataType[];
|
|
101
|
-
};
|
|
102
|
-
type: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
type: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
type: string;
|
|
109
|
-
};
|
|
110
|
-
//# sourceMappingURL=alphaTypes.d.ts.map
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AAM,CAAC;CACd,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cetus_mainnet_config.d.ts","sourceRoot":"","sources":["../../src/common/cetus_mainnet_config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D,eAAO,MAAM,sBAAsB,EAAE,UAoEpC,CAAC"}
|
package/dist/common/coins.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../src/common/coins.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAEnD,eAAO,MAAM,KAAK,EAAE;KAAG,GAAG,IAAI,QAAQ,GAAG,IAAI;CAmH5C,CAAC"}
|