hedge-web3 0.1.2 → 0.1.8
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 +44 -0
- package/lib/index.js +385 -73
- package/lib/index.js.map +1 -1
- package/lib/types/src/Constants.d.ts +3 -3
- package/lib/types/src/Constants.d.ts.map +1 -1
- package/lib/types/src/StakingPools.d.ts +4 -0
- package/lib/types/src/StakingPools.d.ts.map +1 -0
- package/lib/types/src/Vaults.d.ts +9 -0
- package/lib/types/src/Vaults.d.ts.map +1 -0
- package/lib/types/src/index.d.ts +12 -2
- package/lib/types/src/index.d.ts.map +1 -1
- package/lib/types/src/instructions/createStakingPool.d.ts +5 -0
- package/lib/types/src/instructions/createStakingPool.d.ts.map +1 -0
- package/lib/types/src/instructions/createVault.d.ts +4 -3
- package/lib/types/src/instructions/createVault.d.ts.map +1 -1
- package/lib/types/src/instructions/depositStakingPool.d.ts +5 -0
- package/lib/types/src/instructions/depositStakingPool.d.ts.map +1 -0
- package/lib/types/src/instructions/depositVault.d.ts +4 -3
- package/lib/types/src/instructions/depositVault.d.ts.map +1 -1
- package/lib/types/src/instructions/liquidateVault.d.ts +5 -0
- package/lib/types/src/instructions/liquidateVault.d.ts.map +1 -0
- package/lib/types/src/instructions/loanVault.d.ts +4 -3
- package/lib/types/src/instructions/loanVault.d.ts.map +1 -1
- package/lib/types/src/instructions/redeemVault.d.ts +4 -3
- package/lib/types/src/instructions/redeemVault.d.ts.map +1 -1
- package/lib/types/src/instructions/repayVault.d.ts +4 -3
- package/lib/types/src/instructions/repayVault.d.ts.map +1 -1
- package/lib/types/src/instructions/withdrawStakingPool.d.ts +5 -0
- package/lib/types/src/instructions/withdrawStakingPool.d.ts.map +1 -0
- package/lib/types/src/instructions/withdrawVault.d.ts +4 -3
- package/lib/types/src/instructions/withdrawVault.d.ts.map +1 -1
- package/lib/types/src/state/LiquidationPoolEra.d.ts.map +1 -1
- package/lib/types/src/state/LiquidationPosition.d.ts +1 -0
- package/lib/types/src/state/LiquidationPosition.d.ts.map +1 -1
- package/lib/types/src/state/StakingPool.d.ts +1 -2
- package/lib/types/src/state/StakingPool.d.ts.map +1 -1
- package/lib/types/src/state/StakingPoolPosition.d.ts +1 -0
- package/lib/types/src/state/StakingPoolPosition.d.ts.map +1 -1
- package/lib/types/src/state/VaultAccount.d.ts.map +1 -1
- package/lib/types/src/utils/Errors.d.ts +2 -0
- package/lib/types/src/utils/Errors.d.ts.map +1 -0
- package/lib/types/tsconfig.base.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Constants.ts +3 -3
- package/src/StakingPools.ts +3 -0
- package/src/Vaults.ts +8 -0
- package/src/index.ts +14 -5
- package/src/instructions/createStakingPool.ts +64 -0
- package/src/instructions/createVault.ts +10 -11
- package/src/instructions/depositStakingPool.ts +60 -0
- package/src/instructions/depositVault.ts +10 -11
- package/src/instructions/liquidateVault.ts +66 -0
- package/src/instructions/loanVault.ts +10 -11
- package/src/instructions/redeemVault.ts +10 -11
- package/src/instructions/repayVault.ts +10 -11
- package/src/instructions/withdrawStakingPool.ts +69 -0
- package/src/instructions/withdrawVault.ts +10 -11
- package/src/state/LiquidationPoolEra.ts +5 -5
- package/src/state/LiquidationPosition.ts +26 -18
- package/src/state/StakingPool.ts +4 -5
- package/src/state/StakingPoolPosition.ts +4 -5
- package/src/state/VaultAccount.ts +0 -1
- package/src/state/VaultHistoryEvent.ts +1 -1
- package/src/types/buffer-layout/index.d.ts +88 -0
- package/src/utils/Errors.ts +11 -0
- package/typedoc.json +1 -2
@@ -1 +1 @@
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.es2019.full.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@solana/spl-token/node_modules/buffer/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@solana/web3.js/lib/index.d.ts","../../node_modules/@types/bn.js/index.d.ts","../../node_modules/@solana/spl-token/lib/index.d.ts","../../src/Constants.ts","../../node_modules/decimal.js/decimal.d.ts","../../src/HedgeDecimal.ts","../../node_modules/@project-serum/anchor/dist/cjs/provider.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/idl.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/instruction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/accounts.d.ts","../../node_modules/eventemitter3/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/common.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/context.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/event.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/event.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/state.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/common.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/error.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/sha256.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/rpc.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/token.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/features.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/index.d.ts","../../src/idl/idl.ts","../../src/instructions/createVault.ts","../../src/instructions/depositVault.ts","../../src/instructions/withdrawVault.ts","../../src/instructions/loanVault.ts","../../src/instructions/repayVault.ts","../../src/instructions/redeemVault.ts","../../src/state/VaultAccount.ts","../../src/index.ts","../../src/state/LiquidationPoolEra.ts","../../src/state/LiquidationPoolState.ts","../../src/state/LiquidationPosition.ts","../../src/state/StakingPool.ts","../../src/state/StakingPoolPosition.ts","../../src/state/VaultHistoryEvent.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/ws/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f","4576b4e61049f5ffd7c9e935cf88832e089265bdb15ffc35077310042cbbbeea","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"2a801b0322994c3dd7f0ef30265d19b3dd3bae6d793596879166ed6219c3da68","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","bcc8caf03ee65fe8610d258752f255fbdddbb2e4de7b6c5628956a5a0d859ec8","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"c28e5baab1b53377c90d12970e207a2644bc3627840066449e37e2a59125d07e","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","b3e30823f22a2185f7278f37e31358d5e2e69bd336d1035d2f5b8946928debf3","4ed10283814bb014a9d95959c5e1b5cd7a05c419dab36e28574bf2e0ca3e014c","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"9f2edefec1509d5707b2de3a4d1f2af064ccfef02d050897d60adb5eead0c604","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","7185660ba7fe7c4221dcd443ffa32d1a786192548735692d98a40a90fa2867a4","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7","1835259a20b9fa6b1882931375b69ae5978195f2b139b4e0db51ec8319261649","b52cd693219a63dd21282ac99a7bf55f77cbe8a91f097968856419cc2e05f017","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"267af67ea520cabd16402522756b19ac63d9e2c1c86e7c4d1ddeb991c32e12c9","8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","3249dece06e3f39e8887543172351d2a52fc3c4d7101280f0ed199f1bb3a9ad2","bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5","3ba32d8f95afee3533bd255b90de8c7f7dfa85cd0c8963cc7513aca83e2cc2b1","7f2514107fdb04bfcfc41c7f0d8956f5a7271454112391f8b1fa76243020826e","54b9967c3f368000c0d96688884facaedaf660b861a5b6afd1902ebbe811ce5b","9259b178368b75d8553a7d0a97507d5e51af5004dc57cf6f7463b1dd54e07109","974102905caa6608e7842d749bb2a4922f8e2267de305bc25580173974ee4cdb","a6baf46d64032c534d761d128f82c8e37cbf6df56f658a4b9c2fb96da531443d","ce423291d1a4701149f825d76baab5b009daeeef70c6ce7c31363e27dc4a75c8","0b55dae91ed721a0932f5fa0bd1b339a37bd39244c3102ba33c0b2c5dd2d67b5","b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968","9c01a5cd8ed8a68fd2a05b4775388bf5398942b08b10dfe90dec84784cc48cbb","2b5fe3253ecc77ba7f4211cc84600435dad654d9478dfbd37ebea6f8f0ae3d90","5c2d8d3d277ef9cb78ad47036727da97c51beec1e5b9cd6b9858fa6f77c73391","14c91dbd4bb7fd9a9bb5a651a61007cd2e29341989b3c4ef75b3bb3fd548be59","9eca7f7811e1b73181fde6ed0b87993c6105e0a239ea893731f139a8bfcf43ea","1f3e2970478dfe05b2976d14f892e34bef7305b3cb006c569b31756e9694fdae","9375a92ad6982b53ce82255d26f6cab3de3c7e13319732ac0380dbc80780123a","1e66e17f9db34fc6b1e122459a3a8d38d9d55a666f5bac728fbdfcf3b4b43001","534070d39bfe28fbced16d3fc93ef41d0b7a07c77684310bc466954214315578","847ccc20490110124a2252c5a705dfe1355921470d2bd6da9af1d4943e54346b","bb14bd7ec42a3b7a65421f529795ee2bbe308387ff274561e128f4797d2503c0","655bff5c020fac6765570f881c689a3b162202b9b8d13b2c35ec0c69b3ec3521","dae492af52685ae68e6f6f90ff2a42422fe8a8fd99acd9b40705a9470c4f7bfd","139db12276e11f90df65778f7513bc3f85957d74fd0d1bbeb19e4a1dace4f662","2884fcc91f5d42a3288a75a558b036923e3d926354fa0c3fa0251c2c3d4b54e8","cc486017c03c0eb004237288602477ef2c636eed71d7ef0911da01c856b52ad6","4cb9df3ea8035d85480096a5ff94dbbcf941efb38c5c1ea77f1dc164d4342728","1a33fe7fba89d4ede6eeba8239dd1288df1b00314aa537c461f9a84d69395f3a","291b47b629e4c15e96bacb8d1f707573e72fedbb0fcab43f729e5f9d73560c3c","2b4c473686e1d6fc043a9db5afa517f19998a9d09972601a3fc077bd502aa59e","dcb4c621cc9951c8938bf035551b2a4503d77eeb054b99731cc181c3e8d7f529","2e2da62d0c8291a079b03bffc4b7288c925aa878367ef8eaceb37eaadf0910db","6f3b6750d038e578b1cabf6598d5e7a0c7b5b235132e9c0d76f6f6bb7dc7bc14","a680c84205139381ccddf3f7f26bc1a27066b15db04d76a72dee15fbe1ea5cda","21f450637f704c7947724bfc0aaed4c27dea9c09649d853e60a16b04941b7464","4080dc1aad52acb3805160da8b7854c214907ce46bb101d9e22fcea7d02345a1","6bb1262991371115912868118a90069252f54baee42d28c53495155dd9b235c8","d294a43cadce8b25f16871a046884c215c7db8777d00405cc1efd3d58bffb503","56a4f1ab7e166244f1a3bb2ca59b448e853c549db5f157fc2de76dc4e918b524","b5ac88779d72700e99e8ba21e221b1da8e5701e39f06de981b30d7a4c843c161","15a899663c728e592323a4c464ead0e0471676726c749f4bbea57050875bfe36","7749c31a664436aec688e84f89dc998ee2c66c4c03088fbf1cd7f7cc97e80edb","45f702e4fbb8dd0d8466d274de023a400094c6b74291666b0b5e64b40ac312ab","f35891024bc8a48dd19745913669fd2825bd95ed5c5baad86c26b358cde98484","93d46bd3c720166bfee2d1119fd2602bc0715a1829966fb31a620130826abe80","05961892e270dac0cafa53ef4001a85cf93cde797498c0215f5596aea1eef94e","e163cae41493bd9518489b1363b0fe951ecd0ec3ce4b342d7c1a0b61136aaae4","2cf703b330795c0d317226b6e05d5867de91bbc8143bf4a9bb92c605c5a76200","838c8e17e091687a192c4f3180e1cd33fd5b3c91c9b443c80ece2ccd4412aae3","7c04e9f85c6471fa3363de9fe63dd5bfa76191edb9f8c499f21ac26c209aa8bf","0725591354576c9589cbbef04bfb61ea6a4ea136e2e2b3c0ef384223e27f9a3b","010d77d18ed6fe29fdbe3d37412466c0794abbbd1427a8a433c565149cd7eeb2","4afe148c73be90fc4f10fcb0496c2ff4cfa07933b0fa94b04ae5cb8851c5691b","34b6713e23a4f1034ceb87b258777589006b8835679b34c4f2b968d2aec8f9e3","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",{"version":"548311a7ece846e4b9c70c3cb5ac0776559957ff6fcedfde938ebe2774439509","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":99,"noEmitHelpers":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"target":6},"fileIdsList":[[89,96,105],[89,96,105,112],[89,96,105,106,107,113,114,115],[89,96,98,105],[89],[89,96,98],[89,98,99,104,105,106,116,117,128,136],[89,98,105,108,110],[89,98,105,109],[89,98,104,105,111,116],[89,98,104,105,109,110,112,116,135],[89,96,98,104,105,108,109,111,116],[89,98,104,105,111,116,129,130,131,132,133,134],[89,96,98,105,110,111],[89,98,104,105,111,131],[89,98,104,105,111,112,116,131],[89,98,104,105,108,111,116,135],[89,98,105,111,130],[89,98,99,105,110,137],[89,98],[89,96],[89,121,122,123,124],[89,118,119,120,125,126,127],[89,96,98,109],[89,96,98,104,109],[50,89,98,99],[50,89,96],[64,89,96],[61,64,89,96,155,156],[89,160,162,163,164,165,166,167,168,169,170,171,172],[89,160,161,163,164,165,166,167,168,169,170,171,172],[89,161,162,163,164,165,166,167,168,169,170,171,172],[89,160,161,162,164,165,166,167,168,169,170,171,172],[89,160,161,162,163,165,166,167,168,169,170,171,172],[89,160,161,162,163,164,166,167,168,169,170,171,172],[89,160,161,162,163,164,165,167,168,169,170,171,172],[89,160,161,162,163,164,165,166,168,169,170,171,172],[89,160,161,162,163,164,165,166,167,169,170,171,172],[89,160,161,162,163,164,165,166,167,168,170,171,172],[89,160,161,162,163,164,165,166,167,168,169,171,172],[89,160,161,162,163,164,165,166,167,168,169,170,172],[89,160,161,162,163,164,165,166,167,168,169,170,171],[46,89],[49,89],[50,55,89],[51,61,62,69,78,88,89],[51,52,61,69,89],[53,89],[54,55,62,70,89],[55,78,85,89],[56,58,61,69,89],[57,89],[58,59,89],[60,61,89],[61,89],[61,62,63,78,88,89],[61,62,63,78,89],[64,69,78,88,89],[61,62,64,65,69,78,85,88,89],[64,66,78,85,88,89],[46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],[61,67,89],[68,88,89],[58,61,69,78,89],[70,89],[71,89],[49,72,89],[73,87,89,93],[74,89],[75,89],[61,76,89],[76,77,89,91],[61,78,79,80,89],[78,80,89],[78,79,89],[81,89],[82,89],[61,83,84,89],[83,84,89],[55,69,78,85,89],[86,89],[69,87,89],[50,64,75,88,89],[55,89],[78,89,90],[89,91],[89,92],[50,55,61,63,72,78,88,89,91,93],[78,89,94],[61,64,66,69,78,85,88,89,94,96],[44,89,98,100],[44,89,102],[44,89,137],[44,89,103,139,140,141,142,143,144,145],[44,89,98,100,101,137,138],[44,89,102,146],[44,89],[44,89,98,102,146,147,148],[44,89,98,102,146],[44,89,98,102,146,150],[44,89,98,102,103]],"referencedMap":[[107,1],[115,1],[113,2],[116,3],[106,4],[114,1],[117,5],[105,6],[137,7],[109,8],[110,9],[112,10],[136,11],[133,12],[135,13],[130,14],[132,15],[134,16],[129,17],[131,18],[111,19],[104,20],[124,21],[123,21],[121,21],[125,22],[122,5],[127,5],[128,23],[120,24],[119,25],[118,5],[126,20],[100,26],[45,5],[98,27],[99,21],[153,28],[154,5],[157,29],[158,5],[159,5],[161,30],[162,31],[160,32],[163,33],[164,34],[165,35],[166,36],[167,37],[168,38],[169,39],[170,40],[171,41],[172,42],[46,43],[47,43],[49,44],[50,45],[51,46],[52,47],[53,48],[54,49],[55,50],[56,51],[57,52],[58,53],[59,53],[60,54],[61,55],[62,56],[63,57],[48,5],[95,5],[64,58],[65,59],[66,60],[96,61],[67,62],[68,63],[69,64],[70,65],[71,66],[72,67],[73,68],[74,69],[75,70],[76,71],[77,72],[78,73],[80,74],[79,75],[81,76],[82,77],[83,78],[84,79],[85,80],[86,81],[87,82],[88,83],[89,84],[90,85],[91,86],[92,87],[93,88],[94,89],[156,5],[155,5],[173,90],[97,5],[102,5],[108,5],[44,5],[8,5],[9,5],[13,5],[12,5],[2,5],[14,5],[15,5],[16,5],[17,5],[18,5],[19,5],[20,5],[21,5],[3,5],[4,5],[25,5],[22,5],[23,5],[24,5],[26,5],[27,5],[28,5],[5,5],[29,5],[30,5],[31,5],[32,5],[6,5],[43,5],[33,5],[34,5],[35,5],[36,5],[7,5],[41,5],[37,5],[38,5],[39,5],[40,5],[1,5],[42,5],[11,5],[10,5],[101,91],[103,92],[138,93],[146,94],[139,95],[140,95],[142,95],[144,95],[143,95],[141,95],[147,96],[148,97],[149,98],[150,99],[151,100],[145,101],[152,99]],"exportedModulesMap":[[107,1],[115,1],[113,2],[116,3],[106,4],[114,1],[117,5],[105,6],[137,7],[109,8],[110,9],[112,10],[136,11],[133,12],[135,13],[130,14],[132,15],[134,16],[129,17],[131,18],[111,19],[104,20],[124,21],[123,21],[121,21],[125,22],[122,5],[127,5],[128,23],[120,24],[119,25],[118,5],[126,20],[100,26],[45,5],[98,27],[99,21],[153,28],[154,5],[157,29],[158,5],[159,5],[161,30],[162,31],[160,32],[163,33],[164,34],[165,35],[166,36],[167,37],[168,38],[169,39],[170,40],[171,41],[172,42],[46,43],[47,43],[49,44],[50,45],[51,46],[52,47],[53,48],[54,49],[55,50],[56,51],[57,52],[58,53],[59,53],[60,54],[61,55],[62,56],[63,57],[48,5],[95,5],[64,58],[65,59],[66,60],[96,61],[67,62],[68,63],[69,64],[70,65],[71,66],[72,67],[73,68],[74,69],[75,70],[76,71],[77,72],[78,73],[80,74],[79,75],[81,76],[82,77],[83,78],[84,79],[85,80],[86,81],[87,82],[88,83],[89,84],[90,85],[91,86],[92,87],[93,88],[94,89],[156,5],[155,5],[173,90],[97,5],[102,5],[108,5],[44,5],[8,5],[9,5],[13,5],[12,5],[2,5],[14,5],[15,5],[16,5],[17,5],[18,5],[19,5],[20,5],[21,5],[3,5],[4,5],[25,5],[22,5],[23,5],[24,5],[26,5],[27,5],[28,5],[5,5],[29,5],[30,5],[31,5],[32,5],[6,5],[43,5],[33,5],[34,5],[35,5],[36,5],[7,5],[41,5],[37,5],[38,5],[39,5],[40,5],[1,5],[42,5],[11,5],[10,5],[101,91],[103,92],[138,93],[146,94],[139,95],[140,95],[142,95],[144,95],[143,95],[141,95],[147,96],[148,97],[149,98],[150,99],[151,100],[145,101],[152,99]],"semanticDiagnosticsPerFile":[107,115,113,116,106,114,117,105,137,109,110,112,136,133,135,130,132,134,129,131,111,104,124,123,121,125,122,127,128,120,119,118,126,100,45,98,99,153,154,157,158,159,161,162,160,163,164,165,166,167,168,169,170,171,172,46,47,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,48,95,64,65,66,96,67,68,69,70,71,72,73,74,75,76,77,78,80,79,81,82,83,84,85,86,87,88,89,90,91,92,93,94,156,155,173,97,102,108,44,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,43,33,34,35,36,7,41,37,38,39,40,1,42,11,10,101,103,138,146,139,140,142,144,143,141,147,148,149,150,151,145,152]},"version":"4.5.4"}
|
1
|
+
{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.es2019.full.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@solana/spl-token/node_modules/buffer/index.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts","../../node_modules/buffer/index.d.ts","../../node_modules/@solana/web3.js/lib/index.d.ts","../../node_modules/@types/bn.js/index.d.ts","../../node_modules/@solana/spl-token/lib/index.d.ts","../../src/Constants.ts","../../node_modules/decimal.js/decimal.d.ts","../../src/HedgeDecimal.ts","../../node_modules/@project-serum/anchor/dist/cjs/provider.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/idl.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/instruction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/accounts.d.ts","../../node_modules/eventemitter3/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/common.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/context.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/types.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/event.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/event.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/state.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/common.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/coder/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/error.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/sha256.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/rpc.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/pubkey.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/hex.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/utf8.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/bs58.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/base64.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/bytes/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/token.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/features.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/utils/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/state.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/instruction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/transaction.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/account.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/simulate.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/namespace/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/program/index.d.ts","../../node_modules/@project-serum/anchor/dist/cjs/index.d.ts","../../src/idl/idl.ts","../../src/utils/Errors.ts","../../src/instructions/createStakingPool.ts","../../src/instructions/depositStakingPool.ts","../../src/instructions/withdrawStakingPool.ts","../../src/StakingPools.ts","../../src/instructions/createVault.ts","../../src/instructions/depositVault.ts","../../src/instructions/withdrawVault.ts","../../src/instructions/loanVault.ts","../../src/instructions/repayVault.ts","../../src/instructions/redeemVault.ts","../../src/instructions/liquidateVault.ts","../../src/state/VaultAccount.ts","../../src/Vaults.ts","../../src/state/VaultHistoryEvent.ts","../../src/state/StakingPool.ts","../../src/state/StakingPoolPosition.ts","../../src/state/LiquidationPoolEra.ts","../../src/state/LiquidationPoolState.ts","../../src/state/LiquidationPosition.ts","../../src/index.ts","../../src/types/buffer-layout/index.d.ts","../../node_modules/@types/connect/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/range-parser/index.d.ts","../../node_modules/@types/qs/index.d.ts","../../node_modules/@types/express-serve-static-core/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/json5/index.d.ts","../../node_modules/@types/lodash/common/common.d.ts","../../node_modules/@types/lodash/common/array.d.ts","../../node_modules/@types/lodash/common/collection.d.ts","../../node_modules/@types/lodash/common/date.d.ts","../../node_modules/@types/lodash/common/function.d.ts","../../node_modules/@types/lodash/common/lang.d.ts","../../node_modules/@types/lodash/common/math.d.ts","../../node_modules/@types/lodash/common/number.d.ts","../../node_modules/@types/lodash/common/object.d.ts","../../node_modules/@types/lodash/common/seq.d.ts","../../node_modules/@types/lodash/common/string.d.ts","../../node_modules/@types/lodash/common/util.d.ts","../../node_modules/@types/lodash/index.d.ts","../../node_modules/@types/ws/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"927cb2b60048e1395b183bf74b2b80a75bdb1dbe384e1d9fac654313ea2fb136","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f","4576b4e61049f5ffd7c9e935cf88832e089265bdb15ffc35077310042cbbbeea","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"2a801b0322994c3dd7f0ef30265d19b3dd3bae6d793596879166ed6219c3da68","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","bcc8caf03ee65fe8610d258752f255fbdddbb2e4de7b6c5628956a5a0d859ec8","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"c28e5baab1b53377c90d12970e207a2644bc3627840066449e37e2a59125d07e","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","b3e30823f22a2185f7278f37e31358d5e2e69bd336d1035d2f5b8946928debf3","4ed10283814bb014a9d95959c5e1b5cd7a05c419dab36e28574bf2e0ca3e014c","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"9f2edefec1509d5707b2de3a4d1f2af064ccfef02d050897d60adb5eead0c604","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","7185660ba7fe7c4221dcd443ffa32d1a786192548735692d98a40a90fa2867a4","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7","1835259a20b9fa6b1882931375b69ae5978195f2b139b4e0db51ec8319261649","b52cd693219a63dd21282ac99a7bf55f77cbe8a91f097968856419cc2e05f017","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"267af67ea520cabd16402522756b19ac63d9e2c1c86e7c4d1ddeb991c32e12c9","8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","3249dece06e3f39e8887543172351d2a52fc3c4d7101280f0ed199f1bb3a9ad2","bc6dd50ac2fc9a7ca6488811b116bd0ddd606338db0bb97852c8fcf757e2d7f5","3ba32d8f95afee3533bd255b90de8c7f7dfa85cd0c8963cc7513aca83e2cc2b1","225644fa17af410e69bdca2d73b104da08fb07e5649a2881140bc2d4f4383d93","54b9967c3f368000c0d96688884facaedaf660b861a5b6afd1902ebbe811ce5b","9259b178368b75d8553a7d0a97507d5e51af5004dc57cf6f7463b1dd54e07109","974102905caa6608e7842d749bb2a4922f8e2267de305bc25580173974ee4cdb","a6baf46d64032c534d761d128f82c8e37cbf6df56f658a4b9c2fb96da531443d","ce423291d1a4701149f825d76baab5b009daeeef70c6ce7c31363e27dc4a75c8","0b55dae91ed721a0932f5fa0bd1b339a37bd39244c3102ba33c0b2c5dd2d67b5","b80c780c52524beb13488942543972c8b0e54400e8b59cee0169f38d0fabb968","9c01a5cd8ed8a68fd2a05b4775388bf5398942b08b10dfe90dec84784cc48cbb","2b5fe3253ecc77ba7f4211cc84600435dad654d9478dfbd37ebea6f8f0ae3d90","5c2d8d3d277ef9cb78ad47036727da97c51beec1e5b9cd6b9858fa6f77c73391","14c91dbd4bb7fd9a9bb5a651a61007cd2e29341989b3c4ef75b3bb3fd548be59","9eca7f7811e1b73181fde6ed0b87993c6105e0a239ea893731f139a8bfcf43ea","1f3e2970478dfe05b2976d14f892e34bef7305b3cb006c569b31756e9694fdae","9375a92ad6982b53ce82255d26f6cab3de3c7e13319732ac0380dbc80780123a","1e66e17f9db34fc6b1e122459a3a8d38d9d55a666f5bac728fbdfcf3b4b43001","534070d39bfe28fbced16d3fc93ef41d0b7a07c77684310bc466954214315578","847ccc20490110124a2252c5a705dfe1355921470d2bd6da9af1d4943e54346b","bb14bd7ec42a3b7a65421f529795ee2bbe308387ff274561e128f4797d2503c0","655bff5c020fac6765570f881c689a3b162202b9b8d13b2c35ec0c69b3ec3521","dae492af52685ae68e6f6f90ff2a42422fe8a8fd99acd9b40705a9470c4f7bfd","139db12276e11f90df65778f7513bc3f85957d74fd0d1bbeb19e4a1dace4f662","2884fcc91f5d42a3288a75a558b036923e3d926354fa0c3fa0251c2c3d4b54e8","cc486017c03c0eb004237288602477ef2c636eed71d7ef0911da01c856b52ad6","4cb9df3ea8035d85480096a5ff94dbbcf941efb38c5c1ea77f1dc164d4342728","1a33fe7fba89d4ede6eeba8239dd1288df1b00314aa537c461f9a84d69395f3a","291b47b629e4c15e96bacb8d1f707573e72fedbb0fcab43f729e5f9d73560c3c","2b4c473686e1d6fc043a9db5afa517f19998a9d09972601a3fc077bd502aa59e","dcb4c621cc9951c8938bf035551b2a4503d77eeb054b99731cc181c3e8d7f529","2e2da62d0c8291a079b03bffc4b7288c925aa878367ef8eaceb37eaadf0910db","6f3b6750d038e578b1cabf6598d5e7a0c7b5b235132e9c0d76f6f6bb7dc7bc14","a680c84205139381ccddf3f7f26bc1a27066b15db04d76a72dee15fbe1ea5cda","21f450637f704c7947724bfc0aaed4c27dea9c09649d853e60a16b04941b7464","4080dc1aad52acb3805160da8b7854c214907ce46bb101d9e22fcea7d02345a1","6bb1262991371115912868118a90069252f54baee42d28c53495155dd9b235c8","d294a43cadce8b25f16871a046884c215c7db8777d00405cc1efd3d58bffb503","56a4f1ab7e166244f1a3bb2ca59b448e853c549db5f157fc2de76dc4e918b524","b5ac88779d72700e99e8ba21e221b1da8e5701e39f06de981b30d7a4c843c161","44fc237546d5d60fd46b618cc7d279a708b1e6a9d002d66d4ec7d03fd0746533","97f6c15bc88dded76061c130175f2d1c1bfb0c32dc570886725ae8d5eedd87c2","d9b95b3796320c464186d5dfaf4463a532688c95a97e9baf77e52268a4e2938b","b54791fd40f531a048e3c88ba4ab46a837d17f2efb0b8faedd001fba83b94d39","7a61418e74ab91794ecf32881d1a393ea26d975e6eff645c4f6b4cbaa7149a03","58abba49446091284da2c95bea2ebdde9806f0243963da55b1815d3b3b57a976","4e6f538614410e369c1b67db64f303ed0a36db85cdb75231dc25f047b785c069","39801cdc2b4a7a7b78b38b58ea07e0694438db94ae1a8f2d394c2d3886ada1d6","7677f446e5a960d1eb1c24e1ba23f40f47bf01475d59219fc11df3c0ab289bf3","99530c38a2e323855b73316de63dec9f58d8e6ad66d5bc9a1784605aa5c4817d","667bedb75d2088c96f858bb2dd784e5231ba7c481317385230f025d0873b8b70","7b60de4ef5d6e2302b4af71c8e38600affbc81bb2e39bd57fb39f653d392e293","e03270b68fd55cd00e84b9160578a73abc6b5e40cd637bdc8ad0072d0cb133c0","61c22fc4cf2b51c4fcdb8f161707270534999a297eb996e1f2425c900ea46965","2ed06d83bd6d54990d658ef6d7982d2c11c8063fa8f4aba7fa1591a0e10c43d7","bc17b95b4c7d8ba4ec1ab302c0337dde9da20ad6e97970eb9c0f688aa09be848","ebf7b80156363129a6edf0013d854a8838889b62f51490f771ea35b5997a00ca","b9f92bf797adec5fd750ae470ae124ab4754421e2965f4adf28ca179140e3859","7c04e9f85c6471fa3363de9fe63dd5bfa76191edb9f8c499f21ac26c209aa8bf","dfc855467fb0b91f0166f20c3c4a730def8ebb3e528cf4be13884d458d7fdac3","aae6b9ed656124a929ec0214ca24c1a881116cc3c5715461be12ca3bb63a125c","93b58dc60fa4888f4a25db9120c8d194709c598a8d1564494d507a86d1a35e78","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",{"version":"548311a7ece846e4b9c70c3cb5ac0776559957ff6fcedfde938ebe2774439509","affectsGlobalScope":true},"0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"bc81aff061c53a7140270555f4b22da4ecfe8601e8027cf5aa175fbdc7927c31"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":false,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"module":99,"noEmitHelpers":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strictNullChecks":true,"target":6},"fileIdsList":[[89,96,105],[89,96,105,112],[89,96,105,106,107,113,114,115],[89,96,98,105],[89],[89,96,98],[89,98,99,104,105,106,116,117,128,136],[89,98,105,108,110],[89,98,105,109],[89,98,104,105,111,116],[89,98,104,105,109,110,112,116,135],[89,96,98,104,105,108,109,111,116],[89,98,104,105,111,116,129,130,131,132,133,134],[89,96,98,105,110,111],[89,98,104,105,111,131],[89,98,104,105,111,112,116,131],[89,98,104,105,108,111,116,135],[89,98,105,111,130],[89,98,99,105,110,137],[89,98],[89,96],[89,121,122,123,124],[89,118,119,120,125,126,127],[89,96,98,109],[89,96,98,104,109],[50,89,98,99,160],[50,89,96],[64,89,96],[61,64,89,96,163,164],[89,168,170,171,172,173,174,175,176,177,178,179,180],[89,168,169,171,172,173,174,175,176,177,178,179,180],[89,169,170,171,172,173,174,175,176,177,178,179,180],[89,168,169,170,172,173,174,175,176,177,178,179,180],[89,168,169,170,171,173,174,175,176,177,178,179,180],[89,168,169,170,171,172,174,175,176,177,178,179,180],[89,168,169,170,171,172,173,175,176,177,178,179,180],[89,168,169,170,171,172,173,174,176,177,178,179,180],[89,168,169,170,171,172,173,174,175,177,178,179,180],[89,168,169,170,171,172,173,174,175,176,178,179,180],[89,168,169,170,171,172,173,174,175,176,177,179,180],[89,168,169,170,171,172,173,174,175,176,177,178,180],[89,168,169,170,171,172,173,174,175,176,177,178,179],[46,89],[49,89],[50,55,89],[51,61,62,69,78,88,89],[51,52,61,69,89],[53,89],[54,55,62,70,89],[55,78,85,89],[56,58,61,69,89],[57,89],[58,59,89],[60,61,89],[61,89],[61,62,63,78,88,89],[61,62,63,78,89],[64,69,78,88,89],[61,62,64,65,69,78,85,88,89],[64,66,78,85,88,89],[46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],[61,67,89],[68,88,89],[58,61,69,78,89],[70,89],[71,89],[49,72,89],[73,87,89,93],[74,89],[75,89],[61,76,89],[76,77,89,91],[61,78,79,80,89],[78,80,89],[78,79,89],[81,89],[82,89],[61,83,84,89],[83,84,89],[55,69,78,85,89],[86,89],[69,87,89],[50,64,75,88,89],[55,89],[78,89,90],[89,91],[89,92],[50,55,61,63,72,78,88,89,91,93],[78,89,94],[61,64,66,69,78,85,88,89,94,96],[44,89,98,100],[44,89,102],[44,89,140,141,142],[44,89,144,145,146,147,148,149,150,151],[44,89,137],[44,89,101,103,140,141,142,144,145,146,147,148,149,150,151,153,154,155,156,157,158],[44,89,98,100,101,137,139],[44,89,98,100,101,137],[44,89,102,103],[44,89],[44,89,98,102,103,156,157],[44,89,98,102,103],[44,89,98,102,103,154],[44,89,137,138]],"referencedMap":[[107,1],[115,1],[113,2],[116,3],[106,4],[114,1],[117,5],[105,6],[137,7],[109,8],[110,9],[112,10],[136,11],[133,12],[135,13],[130,14],[132,15],[134,16],[129,17],[131,18],[111,19],[104,20],[124,21],[123,21],[121,21],[125,22],[122,5],[127,5],[128,23],[120,24],[119,25],[118,5],[126,20],[100,26],[45,5],[98,27],[99,21],[161,28],[162,5],[165,29],[166,5],[167,5],[169,30],[170,31],[168,32],[171,33],[172,34],[173,35],[174,36],[175,37],[176,38],[177,39],[178,40],[179,41],[180,42],[46,43],[47,43],[49,44],[50,45],[51,46],[52,47],[53,48],[54,49],[55,50],[56,51],[57,52],[58,53],[59,53],[60,54],[61,55],[62,56],[63,57],[48,5],[95,5],[64,58],[65,59],[66,60],[96,61],[67,62],[68,63],[69,64],[70,65],[71,66],[72,67],[73,68],[74,69],[75,70],[76,71],[77,72],[78,73],[80,74],[79,75],[81,76],[82,77],[83,78],[84,79],[85,80],[86,81],[87,82],[88,83],[89,84],[90,85],[91,86],[92,87],[93,88],[94,89],[164,5],[163,5],[181,90],[97,5],[102,5],[108,5],[44,5],[8,5],[9,5],[13,5],[12,5],[2,5],[14,5],[15,5],[16,5],[17,5],[18,5],[19,5],[20,5],[21,5],[3,5],[4,5],[25,5],[22,5],[23,5],[24,5],[26,5],[27,5],[28,5],[5,5],[29,5],[30,5],[31,5],[32,5],[6,5],[43,5],[33,5],[34,5],[35,5],[36,5],[7,5],[41,5],[37,5],[38,5],[39,5],[40,5],[1,5],[42,5],[11,5],[10,5],[101,91],[103,92],[143,93],[152,94],[138,95],[159,96],[140,97],[144,98],[141,97],[145,98],[150,98],[147,98],[149,98],[148,98],[142,97],[146,98],[156,99],[157,100],[158,101],[154,102],[155,103],[151,102],[153,102],[160,5],[139,104]],"exportedModulesMap":[[107,1],[115,1],[113,2],[116,3],[106,4],[114,1],[117,5],[105,6],[137,7],[109,8],[110,9],[112,10],[136,11],[133,12],[135,13],[130,14],[132,15],[134,16],[129,17],[131,18],[111,19],[104,20],[124,21],[123,21],[121,21],[125,22],[122,5],[127,5],[128,23],[120,24],[119,25],[118,5],[126,20],[100,26],[45,5],[98,27],[99,21],[161,28],[162,5],[165,29],[166,5],[167,5],[169,30],[170,31],[168,32],[171,33],[172,34],[173,35],[174,36],[175,37],[176,38],[177,39],[178,40],[179,41],[180,42],[46,43],[47,43],[49,44],[50,45],[51,46],[52,47],[53,48],[54,49],[55,50],[56,51],[57,52],[58,53],[59,53],[60,54],[61,55],[62,56],[63,57],[48,5],[95,5],[64,58],[65,59],[66,60],[96,61],[67,62],[68,63],[69,64],[70,65],[71,66],[72,67],[73,68],[74,69],[75,70],[76,71],[77,72],[78,73],[80,74],[79,75],[81,76],[82,77],[83,78],[84,79],[85,80],[86,81],[87,82],[88,83],[89,84],[90,85],[91,86],[92,87],[93,88],[94,89],[164,5],[163,5],[181,90],[97,5],[102,5],[108,5],[44,5],[8,5],[9,5],[13,5],[12,5],[2,5],[14,5],[15,5],[16,5],[17,5],[18,5],[19,5],[20,5],[21,5],[3,5],[4,5],[25,5],[22,5],[23,5],[24,5],[26,5],[27,5],[28,5],[5,5],[29,5],[30,5],[31,5],[32,5],[6,5],[43,5],[33,5],[34,5],[35,5],[36,5],[7,5],[41,5],[37,5],[38,5],[39,5],[40,5],[1,5],[42,5],[11,5],[10,5],[101,91],[103,92],[143,93],[152,94],[138,95],[159,96],[140,97],[144,98],[141,97],[145,98],[150,98],[147,98],[149,98],[148,98],[142,97],[146,98],[156,99],[157,100],[158,101],[154,102],[155,103],[151,102],[153,102],[160,5],[139,104]],"semanticDiagnosticsPerFile":[107,115,113,116,106,114,117,105,137,109,110,112,136,133,135,130,132,134,129,131,111,104,124,123,121,125,122,127,128,120,119,118,126,100,45,98,99,161,162,165,166,167,169,170,168,171,172,173,174,175,176,177,178,179,180,46,47,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,48,95,64,65,66,96,67,68,69,70,71,72,73,74,75,76,77,78,80,79,81,82,83,84,85,86,87,88,89,90,91,92,93,94,164,163,181,97,102,108,44,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,43,33,34,35,36,7,41,37,38,39,40,1,42,11,10,101,103,143,152,138,159,140,144,141,145,150,147,149,148,142,146,156,157,158,154,155,151,153,160,139]},"version":"4.5.4"}
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "hedge-web3",
|
3
|
-
"version": "0.1.
|
4
|
-
"description": "Hedge Javascript API",
|
3
|
+
"version": "0.1.8",
|
4
|
+
"description": "Hedge Javascript Web3 API",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"scripts": {
|
7
7
|
"build": "npm run clean; rollup -c",
|
8
8
|
"clean": "rimraf ./lib",
|
9
9
|
"dev": "rollup -c -w",
|
10
|
-
"docs": "set -ex; typedoc --
|
10
|
+
"docs": "set -ex; typedoc --includeVersion",
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1"
|
12
12
|
},
|
13
13
|
"author": "Chris Coudron <coudron@gmail.com>",
|
package/src/Constants.ts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
2
2
|
import { PublicKey } from '@solana/web3.js'
|
3
3
|
|
4
|
-
export const HEDGE_PROGRAM_ID = '
|
4
|
+
export const HEDGE_PROGRAM_ID = 'hhhJmQPMmb2sNoTQK1ip7ZRGpRdGfskEEgjacf9XFWv'
|
5
5
|
export const HEDGE_PROGRAM_PUBLICKEY = new PublicKey(HEDGE_PROGRAM_ID)
|
6
6
|
|
7
7
|
export const CHAINLINK_SOL_USD_ID = 'FmAmfoyPXiA8Vhhe6MZTr3U6rZfEZ1ctEHay1ysqCqcf'
|
8
8
|
export const CHAINLINK_SOL_USD_PUBLICKEY = new PublicKey(CHAINLINK_SOL_USD_ID)
|
9
9
|
|
10
|
-
export async function
|
10
|
+
export async function getLiquidationPoolStatePublicKey (): Promise<[PublicKey, number]> {
|
11
11
|
const enc = new TextEncoder()
|
12
12
|
const [poolPublicKey, bump] = await PublicKey.findProgramAddress([enc.encode('LiquidationPoolStateV1')], HEDGE_PROGRAM_PUBLICKEY)
|
13
13
|
return [poolPublicKey, bump]
|
14
14
|
}
|
15
15
|
|
16
|
-
export async function
|
16
|
+
export async function getLiquidationPoolUsdhAccountPublicKey (): Promise<[PublicKey, number]> {
|
17
17
|
const enc = new TextEncoder()
|
18
18
|
const [poolPublicKey, bump] = await PublicKey.findProgramAddress([enc.encode('LiquidationPoolUSDHAccountV1')], HEDGE_PROGRAM_PUBLICKEY)
|
19
19
|
return [poolPublicKey, bump]
|
package/src/Vaults.ts
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
export * from './instructions/createVault'
|
2
|
+
export * from './instructions/depositVault'
|
3
|
+
export * from './instructions/withdrawVault'
|
4
|
+
export * from './instructions/loanVault'
|
5
|
+
export * from './instructions/repayVault'
|
6
|
+
export * from './instructions/redeemVault'
|
7
|
+
export * from './instructions/liquidateVault'
|
8
|
+
export * from './state/VaultAccount'
|
package/src/index.ts
CHANGED
@@ -1,13 +1,22 @@
|
|
1
1
|
|
2
|
-
export
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
export * from './instructions/createStakingPool'
|
3
|
+
export * from './instructions/depositStakingPool'
|
4
|
+
export * from './instructions/withdrawStakingPool'
|
6
5
|
export * from './instructions/createVault'
|
7
6
|
export * from './instructions/depositVault'
|
8
7
|
export * from './instructions/withdrawVault'
|
9
8
|
export * from './instructions/loanVault'
|
10
9
|
export * from './instructions/repayVault'
|
11
10
|
export * from './instructions/redeemVault'
|
12
|
-
export * from './
|
11
|
+
export * from './instructions/liquidateVault'
|
12
|
+
|
13
13
|
export * from './HedgeDecimal'
|
14
|
+
export * from './Constants'
|
15
|
+
|
16
|
+
export * from './state/VaultAccount'
|
17
|
+
export * from './state/VaultHistoryEvent'
|
18
|
+
export * from './state/StakingPool'
|
19
|
+
export * from './state/StakingPoolPosition'
|
20
|
+
export * from './state/LiquidationPoolEra'
|
21
|
+
export * from './state/LiquidationPoolState'
|
22
|
+
export * from './state/LiquidationPosition'
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
|
+
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
+
import { PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { parseAnchorErrors } from '../utils/Errors'
|
5
|
+
import { findAssociatedTokenAddress, getPoolPublicKeyForMint, getUsdhMintPublicKey, getVaultSystemStatePublicKey } from '../Constants'
|
6
|
+
|
7
|
+
export async function createStakingPool (
|
8
|
+
program: Program,
|
9
|
+
provider: Provider,
|
10
|
+
payer: Signer,
|
11
|
+
mintPublicKey: PublicKey,
|
12
|
+
hedgeTokensToBeMinted: number,
|
13
|
+
overrideStartTime?: number
|
14
|
+
): Promise<PublicKey> {
|
15
|
+
const transaction = new Transaction().add(
|
16
|
+
await createStakingPoolInstruction(
|
17
|
+
program,
|
18
|
+
payer.publicKey,
|
19
|
+
mintPublicKey,
|
20
|
+
hedgeTokensToBeMinted,
|
21
|
+
overrideStartTime
|
22
|
+
)
|
23
|
+
)
|
24
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer], provider.opts).catch(parseAnchorErrors)
|
25
|
+
const [poolPublickey] = await getPoolPublicKeyForMint(mintPublicKey)
|
26
|
+
return poolPublickey
|
27
|
+
}
|
28
|
+
|
29
|
+
export async function createStakingPoolInstruction (
|
30
|
+
program: Program,
|
31
|
+
payerPublicKey: PublicKey,
|
32
|
+
mintPublicKey: PublicKey,
|
33
|
+
hedgeTokensToBeMinted: number,
|
34
|
+
overrideStartTime?: number
|
35
|
+
): Promise<TransactionInstruction> {
|
36
|
+
const [vaultSystemStatePublicKey] = await getVaultSystemStatePublicKey()
|
37
|
+
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
38
|
+
const [poolPublickey, poolBump, poolSeedPhrase] = await getPoolPublicKeyForMint(mintPublicKey)
|
39
|
+
|
40
|
+
const poolAssociatedStakedTokenAccount = await findAssociatedTokenAddress(poolPublickey, mintPublicKey)
|
41
|
+
const poolAssociatedUsdhTokenAccount = await findAssociatedTokenAddress(poolPublickey, usdhMintPublickey)
|
42
|
+
|
43
|
+
return program.instruction.createStakingPool(
|
44
|
+
poolBump,
|
45
|
+
poolSeedPhrase,
|
46
|
+
new BN(hedgeTokensToBeMinted),
|
47
|
+
new BN(overrideStartTime ?? Date.now() / 1000),
|
48
|
+
{
|
49
|
+
accounts: {
|
50
|
+
signer: payerPublicKey,
|
51
|
+
vaultSystemState: vaultSystemStatePublicKey,
|
52
|
+
pool: poolPublickey,
|
53
|
+
stakedTokenMintInfo: mintPublicKey,
|
54
|
+
usdhMint: usdhMintPublickey,
|
55
|
+
poolAssociatedStakedTokenAccount: poolAssociatedStakedTokenAccount,
|
56
|
+
poolAssociatedUsdhTokenAccount: poolAssociatedUsdhTokenAccount,
|
57
|
+
rent: SYSVAR_RENT_PUBKEY,
|
58
|
+
splTokenProgramInfo: TOKEN_PROGRAM_ID,
|
59
|
+
splAssociatedTokenProgramInfo: ASSOCIATED_TOKEN_PROGRAM_ID,
|
60
|
+
systemProgram: SystemProgram.programId
|
61
|
+
},
|
62
|
+
signers: []
|
63
|
+
})
|
64
|
+
}
|
@@ -1,20 +1,18 @@
|
|
1
|
-
import { BN, Program } from '@project-serum/anchor'
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
2
|
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
-
import {
|
4
|
-
import { getUsdhMintPublicKey, getVaultSystemStatePublicKey
|
5
|
-
|
6
|
-
import { vaultIdl } from '../idl/idl'
|
3
|
+
import { Keypair, PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { getUsdhMintPublicKey, getVaultSystemStatePublicKey } from '../Constants'
|
7
5
|
|
8
6
|
export async function createVault (
|
9
|
-
|
7
|
+
program: Program,
|
8
|
+
provider: Provider,
|
10
9
|
payer: Signer,
|
11
10
|
depositAmount: number,
|
12
|
-
collateralRatio: number
|
13
|
-
confirmOptions?: ConfirmOptions
|
11
|
+
collateralRatio: number
|
14
12
|
): Promise<PublicKey> {
|
15
13
|
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
16
14
|
const USDH = new Token(
|
17
|
-
connection,
|
15
|
+
provider.connection,
|
18
16
|
usdhMintPublickey,
|
19
17
|
TOKEN_PROGRAM_ID,
|
20
18
|
payer
|
@@ -28,6 +26,7 @@ export async function createVault (
|
|
28
26
|
const [vaultSystemStatePublicKey] = await getVaultSystemStatePublicKey()
|
29
27
|
const transaction = new Transaction().add(
|
30
28
|
createVaultInstruction(
|
29
|
+
program,
|
31
30
|
vaultSystemStatePublicKey,
|
32
31
|
payer.publicKey,
|
33
32
|
newVault.publicKey,
|
@@ -36,11 +35,12 @@ export async function createVault (
|
|
36
35
|
collateralRatio
|
37
36
|
)
|
38
37
|
)
|
39
|
-
await sendAndConfirmTransaction(connection, transaction, [payer, newVault, history],
|
38
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, newVault, history], provider?.opts)
|
40
39
|
return newVault.publicKey
|
41
40
|
}
|
42
41
|
|
43
42
|
export function createVaultInstruction (
|
43
|
+
program: Program,
|
44
44
|
vaultSystemStatePublicKey: PublicKey,
|
45
45
|
payerPublicKey: PublicKey,
|
46
46
|
vaultPublicKey: PublicKey,
|
@@ -48,7 +48,6 @@ export function createVaultInstruction (
|
|
48
48
|
depositAmount: number,
|
49
49
|
collateralRatio: number
|
50
50
|
): TransactionInstruction {
|
51
|
-
const program = new Program(vaultIdl, HEDGE_PROGRAM_ID)
|
52
51
|
const ix = program.instruction.createVault(
|
53
52
|
new BN(depositAmount),
|
54
53
|
new BN(collateralRatio)
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
|
+
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
+
import { Keypair, PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { parseAnchorErrors } from '../utils/Errors'
|
5
|
+
import { findAssociatedTokenAddress, getPoolPublicKeyForMint } from '../Constants'
|
6
|
+
|
7
|
+
export async function depositStakingPool (
|
8
|
+
program: Program,
|
9
|
+
provider: Provider,
|
10
|
+
payer: Signer,
|
11
|
+
mintPublicKey: PublicKey,
|
12
|
+
depositAmount: number,
|
13
|
+
overrideStartTime?: number
|
14
|
+
): Promise<PublicKey> {
|
15
|
+
const poolPosition = Keypair.generate()
|
16
|
+
const transaction = new Transaction().add(
|
17
|
+
await depositStakingPoolInstruction(
|
18
|
+
program,
|
19
|
+
payer.publicKey,
|
20
|
+
poolPosition.publicKey,
|
21
|
+
mintPublicKey,
|
22
|
+
depositAmount,
|
23
|
+
overrideStartTime
|
24
|
+
)
|
25
|
+
)
|
26
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, poolPosition], provider.opts).catch(parseAnchorErrors)
|
27
|
+
return poolPosition.publicKey
|
28
|
+
}
|
29
|
+
|
30
|
+
export async function depositStakingPoolInstruction (
|
31
|
+
program: Program,
|
32
|
+
payerPublicKey: PublicKey,
|
33
|
+
poolPositionPublicKey: PublicKey,
|
34
|
+
stakedTokenMintPublicKey: PublicKey,
|
35
|
+
depositAmount: number,
|
36
|
+
overrideStartTime?: number
|
37
|
+
): Promise<TransactionInstruction> {
|
38
|
+
const [poolPublickey] = await getPoolPublicKeyForMint(stakedTokenMintPublicKey)
|
39
|
+
const poolAssociatedStakedTokenAccount = await findAssociatedTokenAddress(poolPublickey, stakedTokenMintPublicKey)
|
40
|
+
const payersArbitraryTokenAccount = await findAssociatedTokenAddress(payerPublicKey, stakedTokenMintPublicKey)
|
41
|
+
|
42
|
+
return program.instruction.depositStakingPool(
|
43
|
+
new BN(depositAmount),
|
44
|
+
new BN(overrideStartTime ?? Date.now() / 1000), // override current time
|
45
|
+
{
|
46
|
+
accounts: {
|
47
|
+
payer: payerPublicKey,
|
48
|
+
pool: poolPublickey,
|
49
|
+
poolPosition: poolPositionPublicKey,
|
50
|
+
stakedTokenMintInfo: stakedTokenMintPublicKey,
|
51
|
+
poolAssociatedStakedTokenAccount: poolAssociatedStakedTokenAccount,
|
52
|
+
payerAssociatedStakedTokenAccount: payersArbitraryTokenAccount,
|
53
|
+
rent: SYSVAR_RENT_PUBKEY,
|
54
|
+
splTokenProgramInfo: TOKEN_PROGRAM_ID,
|
55
|
+
splAssociatedTokenProgramInfo: ASSOCIATED_TOKEN_PROGRAM_ID,
|
56
|
+
systemProgram: SystemProgram.programId
|
57
|
+
},
|
58
|
+
signers: []
|
59
|
+
})
|
60
|
+
}
|
@@ -1,20 +1,18 @@
|
|
1
|
-
import { BN, Program } from '@project-serum/anchor'
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
2
|
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
-
import {
|
4
|
-
import { getUsdhMintPublicKey, getVaultSystemStatePublicKey
|
5
|
-
|
6
|
-
import { vaultIdl } from '../idl/idl'
|
3
|
+
import { Keypair, PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { getUsdhMintPublicKey, getVaultSystemStatePublicKey } from '../Constants'
|
7
5
|
|
8
6
|
export async function depositVault (
|
9
|
-
|
7
|
+
program: Program,
|
8
|
+
provider: Provider,
|
10
9
|
payer: Signer,
|
11
10
|
vaultPublicKey: PublicKey,
|
12
|
-
depositAmount: number
|
13
|
-
confirmOptions?: ConfirmOptions
|
11
|
+
depositAmount: number
|
14
12
|
): Promise<PublicKey> {
|
15
13
|
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
16
14
|
const USDH = new Token(
|
17
|
-
connection,
|
15
|
+
provider.connection,
|
18
16
|
usdhMintPublickey,
|
19
17
|
TOKEN_PROGRAM_ID,
|
20
18
|
payer
|
@@ -27,6 +25,7 @@ export async function depositVault (
|
|
27
25
|
const [vaultSystemStatePublicKey] = await getVaultSystemStatePublicKey()
|
28
26
|
const transaction = new Transaction().add(
|
29
27
|
depositVaultInstruction(
|
28
|
+
program,
|
30
29
|
vaultSystemStatePublicKey,
|
31
30
|
payer.publicKey,
|
32
31
|
vaultPublicKey,
|
@@ -34,18 +33,18 @@ export async function depositVault (
|
|
34
33
|
depositAmount
|
35
34
|
)
|
36
35
|
)
|
37
|
-
await sendAndConfirmTransaction(connection, transaction, [payer, history],
|
36
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, history], provider.opts)
|
38
37
|
return vaultPublicKey
|
39
38
|
}
|
40
39
|
|
41
40
|
export function depositVaultInstruction (
|
41
|
+
program: Program,
|
42
42
|
vaultSystemStatePublicKey: PublicKey,
|
43
43
|
payerPublicKey: PublicKey,
|
44
44
|
vaultPublicKey: PublicKey,
|
45
45
|
historyPublicKey: PublicKey,
|
46
46
|
depositAmount: number
|
47
47
|
): TransactionInstruction {
|
48
|
-
const program = new Program(vaultIdl, HEDGE_PROGRAM_ID)
|
49
48
|
return program.instruction.depositVault(
|
50
49
|
new BN(depositAmount)
|
51
50
|
, {
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
|
+
import { TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
+
import { Keypair, LAMPORTS_PER_SOL, PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { CHAINLINK_SOL_USD_PUBLICKEY, getHedgeMintPublicKey, getLiquidationPoolStatePublicKey, getLiquidationPoolUsdhAccountPublicKey, getPoolPublicKeyForMint, getUsdhMintPublicKey, getVaultSystemStatePublicKey } from '../Constants'
|
5
|
+
|
6
|
+
export async function liquidateVault (
|
7
|
+
program: Program,
|
8
|
+
provider: Provider,
|
9
|
+
payer: Signer,
|
10
|
+
vaultPublicKey: PublicKey,
|
11
|
+
chainlinkOverridePrice?: number
|
12
|
+
): Promise<PublicKey> {
|
13
|
+
const history = Keypair.generate()
|
14
|
+
const newEra = Keypair.generate()
|
15
|
+
const transaction = new Transaction().add(
|
16
|
+
await liquidateVaultInstruction(
|
17
|
+
program,
|
18
|
+
payer.publicKey,
|
19
|
+
vaultPublicKey,
|
20
|
+
history.publicKey,
|
21
|
+
newEra.publicKey,
|
22
|
+
chainlinkOverridePrice
|
23
|
+
)
|
24
|
+
)
|
25
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, history, newEra], provider.opts)
|
26
|
+
return vaultPublicKey
|
27
|
+
}
|
28
|
+
|
29
|
+
export async function liquidateVaultInstruction (
|
30
|
+
program: Program,
|
31
|
+
payerPublicKey: PublicKey,
|
32
|
+
vaultPublickey: PublicKey,
|
33
|
+
historyPublicKey: PublicKey,
|
34
|
+
newEraPublicKey: PublicKey,
|
35
|
+
chainlinkOverridePrice?: number
|
36
|
+
): Promise<TransactionInstruction> {
|
37
|
+
const [vaultSystemStatePublicKey] = await getVaultSystemStatePublicKey()
|
38
|
+
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
39
|
+
const [hedgeMintPublickey] = await getHedgeMintPublicKey()
|
40
|
+
const [hedgeStakingPoolPublicKey] = await getPoolPublicKeyForMint(hedgeMintPublickey)
|
41
|
+
const [liquidationPoolStatePublicKey] = await getLiquidationPoolStatePublicKey()
|
42
|
+
const [liquidationPoolUsdhAccountPublickey] = await getLiquidationPoolUsdhAccountPublicKey()
|
43
|
+
|
44
|
+
const poolStateInfo = await program.account.liquidationPoolState.fetch(liquidationPoolStatePublicKey)
|
45
|
+
|
46
|
+
return program.instruction.liquidateVault(
|
47
|
+
new BN(chainlinkOverridePrice ?? LAMPORTS_PER_SOL * 150), // override usd/sol price
|
48
|
+
{
|
49
|
+
accounts: {
|
50
|
+
vaultSystemState: vaultSystemStatePublicKey,
|
51
|
+
poolEra: poolStateInfo.currentEra,
|
52
|
+
vaultAccount: vaultPublickey,
|
53
|
+
poolState: liquidationPoolStatePublicKey,
|
54
|
+
usdhMint: usdhMintPublickey,
|
55
|
+
chainlinkFeedAccount: CHAINLINK_SOL_USD_PUBLICKEY,
|
56
|
+
history: historyPublicKey,
|
57
|
+
payer: payerPublicKey,
|
58
|
+
splTokenProgramInfo: TOKEN_PROGRAM_ID,
|
59
|
+
systemProgram: SystemProgram.programId,
|
60
|
+
feePool: hedgeStakingPoolPublicKey,
|
61
|
+
liquidationPoolUsdhAccount: liquidationPoolUsdhAccountPublickey,
|
62
|
+
newEra: newEraPublicKey
|
63
|
+
},
|
64
|
+
signers: []
|
65
|
+
})
|
66
|
+
}
|
@@ -1,21 +1,19 @@
|
|
1
|
-
import { BN, Program } from '@project-serum/anchor'
|
1
|
+
import { BN, Program, Provider } from '@project-serum/anchor'
|
2
2
|
import { Token, TOKEN_PROGRAM_ID } from '@solana/spl-token'
|
3
|
-
import {
|
4
|
-
import { CHAINLINK_SOL_USD_PUBLICKEY, findAssociatedTokenAddress, getHedgeMintPublicKey, getPoolPublicKeyForMint, getUsdhMintPublicKey, getVaultSystemStatePublicKey
|
5
|
-
|
6
|
-
import { vaultIdl } from '../idl/idl'
|
3
|
+
import { Keypair, LAMPORTS_PER_SOL, PublicKey, sendAndConfirmTransaction, Signer, SystemProgram, Transaction, TransactionInstruction } from '@solana/web3.js'
|
4
|
+
import { CHAINLINK_SOL_USD_PUBLICKEY, findAssociatedTokenAddress, getHedgeMintPublicKey, getPoolPublicKeyForMint, getUsdhMintPublicKey, getVaultSystemStatePublicKey } from '../Constants'
|
7
5
|
|
8
6
|
export async function loanVault (
|
9
|
-
|
7
|
+
program: Program,
|
8
|
+
provider: Provider,
|
10
9
|
payer: Signer,
|
11
10
|
vaultPublicKey: PublicKey,
|
12
11
|
loanAmount: number,
|
13
|
-
chainlinkOverridePrice?: number
|
14
|
-
confirmOptions?: ConfirmOptions
|
12
|
+
chainlinkOverridePrice?: number
|
15
13
|
): Promise<PublicKey> {
|
16
14
|
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
17
15
|
const USDH = new Token(
|
18
|
-
connection,
|
16
|
+
provider.connection,
|
19
17
|
usdhMintPublickey,
|
20
18
|
TOKEN_PROGRAM_ID,
|
21
19
|
payer
|
@@ -27,6 +25,7 @@ export async function loanVault (
|
|
27
25
|
const history = Keypair.generate()
|
28
26
|
const transaction = new Transaction().add(
|
29
27
|
await loanVaultInstruction(
|
28
|
+
program,
|
30
29
|
payer.publicKey,
|
31
30
|
payerUsdhAccount.address,
|
32
31
|
vaultPublicKey,
|
@@ -35,11 +34,12 @@ export async function loanVault (
|
|
35
34
|
chainlinkOverridePrice
|
36
35
|
)
|
37
36
|
)
|
38
|
-
await sendAndConfirmTransaction(connection, transaction, [payer, history],
|
37
|
+
await sendAndConfirmTransaction(provider.connection, transaction, [payer, history], provider.opts)
|
39
38
|
return vaultPublicKey
|
40
39
|
}
|
41
40
|
|
42
41
|
export async function loanVaultInstruction (
|
42
|
+
program: Program,
|
43
43
|
payerPublicKey: PublicKey,
|
44
44
|
ownerUsdhAccount: PublicKey,
|
45
45
|
vaultPublickey: PublicKey,
|
@@ -47,7 +47,6 @@ export async function loanVaultInstruction (
|
|
47
47
|
loanAmount: number,
|
48
48
|
chainlinkOverridePrice?: number
|
49
49
|
): Promise<TransactionInstruction> {
|
50
|
-
const program = new Program(vaultIdl, HEDGE_PROGRAM_ID)
|
51
50
|
const [vaultSystemStatePublicKey] = await getVaultSystemStatePublicKey()
|
52
51
|
const [usdhMintPublickey] = await getUsdhMintPublicKey()
|
53
52
|
const [hedgeMintPublickey] = await getHedgeMintPublicKey()
|