@ichidao/ichi-vaults-sdk 0.0.1
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/README.md +420 -0
- package/dist/abis/types/DepositGuard.d.ts +114 -0
- package/dist/abis/types/DepositGuard.js +3 -0
- package/dist/abis/types/DepositGuard.js.map +1 -0
- package/dist/abis/types/ERC20.d.ts +168 -0
- package/dist/abis/types/ERC20.js +3 -0
- package/dist/abis/types/ERC20.js.map +1 -0
- package/dist/abis/types/IchiVault.d.ts +828 -0
- package/dist/abis/types/IchiVault.js +3 -0
- package/dist/abis/types/IchiVault.js.map +1 -0
- package/dist/abis/types/common.d.ts +22 -0
- package/dist/abis/types/common.js +3 -0
- package/dist/abis/types/common.js.map +1 -0
- package/dist/abis/types/factories/DepositGuard__factory.d.ts +139 -0
- package/dist/abis/types/factories/DepositGuard__factory.js +191 -0
- package/dist/abis/types/factories/DepositGuard__factory.js.map +1 -0
- package/dist/abis/types/factories/ERC20__factory.d.ts +175 -0
- package/dist/abis/types/factories/ERC20__factory.js +243 -0
- package/dist/abis/types/factories/ERC20__factory.js.map +1 -0
- package/dist/abis/types/factories/IchiVault__factory.d.ts +899 -0
- package/dist/abis/types/factories/IchiVault__factory.js +1168 -0
- package/dist/abis/types/factories/IchiVault__factory.js.map +1 -0
- package/dist/abis/types/factories/index.d.ts +3 -0
- package/dist/abis/types/factories/index.js +13 -0
- package/dist/abis/types/factories/index.js.map +1 -0
- package/dist/abis/types/index.d.ts +7 -0
- package/dist/abis/types/index.js +34 -0
- package/dist/abis/types/index.js.map +1 -0
- package/dist/src/__tests__/index.test.d.ts +1 -0
- package/dist/src/__tests__/index.test.js +238 -0
- package/dist/src/__tests__/index.test.js.map +1 -0
- package/dist/src/abis/IchiVault.json +1147 -0
- package/dist/src/abis/types/DepositGuard.d.ts +114 -0
- package/dist/src/abis/types/ERC20.d.ts +168 -0
- package/dist/src/abis/types/IchiVault.d.ts +828 -0
- package/dist/src/abis/types/common.d.ts +22 -0
- package/dist/src/abis/types/factories/DepositGuard__factory.d.ts +139 -0
- package/dist/src/abis/types/factories/ERC20__factory.d.ts +175 -0
- package/dist/src/abis/types/factories/IchiVault__factory.d.ts +899 -0
- package/dist/src/abis/types/factories/index.d.ts +3 -0
- package/dist/src/abis/types/index.d.ts +7 -0
- package/dist/src/contracts/index.d.ts +6 -0
- package/dist/src/contracts/index.js +22 -0
- package/dist/src/contracts/index.js.map +1 -0
- package/dist/src/functions/balances.d.ts +12 -0
- package/dist/src/functions/balances.js +227 -0
- package/dist/src/functions/balances.js.map +1 -0
- package/dist/src/functions/deposit.d.ts +9 -0
- package/dist/src/functions/deposit.js +260 -0
- package/dist/src/functions/deposit.js.map +1 -0
- package/dist/src/functions/vault.d.ts +3 -0
- package/dist/src/functions/vault.js +96 -0
- package/dist/src/functions/vault.js.map +1 -0
- package/dist/src/functions/withdraw.d.ts +5 -0
- package/dist/src/functions/withdraw.js +102 -0
- package/dist/src/functions/withdraw.js.map +1 -0
- package/dist/src/index.cjs.js +18 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.esm.js +16 -0
- package/dist/src/index.js +23 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/src/__tests__/index.test.d.ts +1 -0
- package/dist/src/src/contracts/index.d.ts +6 -0
- package/dist/src/src/functions/balances.d.ts +12 -0
- package/dist/src/src/functions/deposit.d.ts +9 -0
- package/dist/src/src/functions/vault.d.ts +3 -0
- package/dist/src/src/functions/withdraw.d.ts +5 -0
- package/dist/src/src/index.d.ts +5 -0
- package/dist/src/src/types/calculateGasMargin.d.ts +2 -0
- package/dist/src/src/types/index.d.ts +32 -0
- package/dist/src/src/types/vaultQueryData.d.ts +10 -0
- package/dist/src/src/utils/config/addresses.d.ts +14 -0
- package/dist/src/src/utils/formatBigInt.d.ts +2 -0
- package/dist/src/src/utils/parseBigInt.d.ts +2 -0
- package/dist/src/src/utils/positionKey.d.ts +2 -0
- package/dist/src/types/calculateGasMargin.d.ts +2 -0
- package/dist/src/types/calculateGasMargin.js +8 -0
- package/dist/src/types/calculateGasMargin.js.map +1 -0
- package/dist/src/types/index.d.ts +32 -0
- package/dist/src/types/index.js +18 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/vaultQueryData.d.ts +10 -0
- package/dist/src/types/vaultQueryData.js +3 -0
- package/dist/src/types/vaultQueryData.js.map +1 -0
- package/dist/src/utils/config/addresses.d.ts +14 -0
- package/dist/src/utils/config/addresses.js +41 -0
- package/dist/src/utils/config/addresses.js.map +1 -0
- package/dist/src/utils/formatBigInt.d.ts +2 -0
- package/dist/src/utils/formatBigInt.js +12 -0
- package/dist/src/utils/formatBigInt.js.map +1 -0
- package/dist/src/utils/parseBigInt.d.ts +2 -0
- package/dist/src/utils/parseBigInt.js +12 -0
- package/dist/src/utils/parseBigInt.js.map +1 -0
- package/dist/src/utils/positionKey.d.ts +2 -0
- package/dist/src/utils/positionKey.js +8 -0
- package/dist/src/utils/positionKey.js.map +1 -0
- package/package.json +98 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var ethers_1 = require("ethers");
|
4
|
+
var getPositionKey = function (address, lowerTick, upperTick) {
|
5
|
+
return ethers_1.utils.keccak256(ethers_1.utils.solidityPack(['address', 'int24', 'int24'], [address, lowerTick, upperTick]));
|
6
|
+
};
|
7
|
+
exports.default = getPositionKey;
|
8
|
+
//# sourceMappingURL=positionKey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionKey.js","sourceRoot":"","sources":["../../../src/utils/positionKey.ts"],"names":[],"mappings":";;AAAA,iCAA+B;AAE/B,IAAM,cAAc,GAAG,UAAC,OAAe,EAAE,SAAiB,EAAE,SAAiB;IAC3E,OAAA,cAAK,CAAC,SAAS,CAAC,cAAK,CAAC,YAAY,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAAnG,CAAmG,CAAC;AAEtG,kBAAe,cAAc,CAAC"}
|
package/package.json
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
{
|
2
|
+
"name": "@ichidao/ichi-vaults-sdk",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"description": "The ICHI Vaults SDK",
|
5
|
+
"main": "dist/src/index.cjs.js",
|
6
|
+
"module": "dist/src/index.esm.js",
|
7
|
+
"types": "dist/src/index.d.ts",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"publishConfig": {
|
12
|
+
"access": "public",
|
13
|
+
"registry": "https://registry.npmjs.org"
|
14
|
+
},
|
15
|
+
"scripts": {
|
16
|
+
"build": "yarn generate && rollup -c && tsc -d",
|
17
|
+
"coverage": "jest --runInBand",
|
18
|
+
"dev": "rollup -c -w",
|
19
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
20
|
+
"generate": "rm-cli -r ./abis && typechain --target=ethers-v5 \"src/abis/**/*.json\" --out-dir \"abis/types\"",
|
21
|
+
"lint:ts": "eslint --ext .js,.ts --ignore-path .gitignore . --fix",
|
22
|
+
"lint": "npm run lint:ts",
|
23
|
+
"postversion": "git push && git push --tags",
|
24
|
+
"prebuild": "rm-cli -r ./dist",
|
25
|
+
"prepare": "npm run build",
|
26
|
+
"prepublishOnly": "npm test && npm run lint & yarn build",
|
27
|
+
"preversion": "npm run lint",
|
28
|
+
"test": "jest --runInBand --forceExit",
|
29
|
+
"version": "npm run format && git add -A src"
|
30
|
+
},
|
31
|
+
"repository": {
|
32
|
+
"type": "git",
|
33
|
+
"url": "git+https://github.com/ichidao/ichi-vaults-sdk.git"
|
34
|
+
},
|
35
|
+
"keywords": [
|
36
|
+
"ichi",
|
37
|
+
"ichivaults",
|
38
|
+
"sdk"
|
39
|
+
],
|
40
|
+
"author": "ICHI DAO <core@ichi.org>",
|
41
|
+
"license": "MIT",
|
42
|
+
"bugs": {
|
43
|
+
"url": "https://github.com/ichidao/ichi-vaults-sdk/issues"
|
44
|
+
},
|
45
|
+
"homepage": "https://github.com/ichidao/ichi-vaults-sdk#readme",
|
46
|
+
"dependencies": {
|
47
|
+
"@ethersproject/abstract-signer": "^5.6.2",
|
48
|
+
"@ethersproject/address": "^5.6.0",
|
49
|
+
"@ethersproject/bignumber": "^5.6.0",
|
50
|
+
"@ethersproject/bytes": "^5.6.1",
|
51
|
+
"@ethersproject/constants": "^5.6.0",
|
52
|
+
"@ethersproject/contracts": "^5.6.2",
|
53
|
+
"@ethersproject/providers": "^5.6.5",
|
54
|
+
"@ethersproject/units": "^5.6.1",
|
55
|
+
"@ethersproject/wallet": "^5.6.2",
|
56
|
+
"@typechain/ethers-v5": "^10.0.0",
|
57
|
+
"bignumber.js": "^9.0.1",
|
58
|
+
"ethereumjs-util": "^7.1.4",
|
59
|
+
"ethers": "^5.6.8",
|
60
|
+
"global": "^4.4.0",
|
61
|
+
"graphql": "^16.6.0",
|
62
|
+
"graphql-request": "^6.0.0",
|
63
|
+
"jsbi": "^3.1.5",
|
64
|
+
"typechain": "^8.0.0"
|
65
|
+
},
|
66
|
+
"devDependencies": {
|
67
|
+
"@babel/core": "^7.17.10",
|
68
|
+
"@babel/preset-env": "^7.17.10",
|
69
|
+
"@jest/globals": "^29.5.0",
|
70
|
+
"@rollup/plugin-babel": "^5.3.1",
|
71
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
72
|
+
"@rollup/plugin-json": "^4.1.0",
|
73
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
74
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
75
|
+
"@truffle/hdwallet-provider": "2.0.10-alpha.2",
|
76
|
+
"@types/jest": "^27.5.0",
|
77
|
+
"@typescript-eslint/eslint-plugin": "^5.27.1",
|
78
|
+
"@typescript-eslint/parser": "^5.27.1",
|
79
|
+
"dotenv": "^16.0.1",
|
80
|
+
"eslint": "^6.8.0",
|
81
|
+
"eslint-config-airbnb-base": "^14.0.0",
|
82
|
+
"eslint-config-prettier": "^6.3.0",
|
83
|
+
"eslint-plugin-import": "^2.26.0",
|
84
|
+
"eslint-plugin-prettier": "^3.1.0",
|
85
|
+
"ethereum-protocol": "^1.0.1",
|
86
|
+
"jest": "^29.1.0",
|
87
|
+
"prettier": "^2.8.7",
|
88
|
+
"rm-cli": "^1.4.2",
|
89
|
+
"rollup": "^2.72.1",
|
90
|
+
"rollup-plugin-terser": "^7.0.2",
|
91
|
+
"ts-jest": "^29.1.0",
|
92
|
+
"tslib": "^2.4.0",
|
93
|
+
"tslint": "^6.1.3",
|
94
|
+
"tslint-config-prettier": "^1.18.0",
|
95
|
+
"typescript": "^4.7.3",
|
96
|
+
"web3-provider-engine": "^16.0.5"
|
97
|
+
}
|
98
|
+
}
|