@pickhooks/sdk 0.0.0-stage → 0.2.0

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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +309 -3
  3. package/dist/abis/any3.d.ts +2123 -0
  4. package/dist/abis/any3.js +3 -0
  5. package/dist/abis/anytax.d.ts +1786 -0
  6. package/dist/abis/anytax.js +3 -0
  7. package/dist/abis/calls.d.ts +2515 -0
  8. package/dist/abis/calls.js +4 -0
  9. package/dist/abis/common.d.ts +449 -0
  10. package/dist/abis/common.js +91 -0
  11. package/dist/abis/dips.d.ts +897 -0
  12. package/dist/abis/dips.js +2 -0
  13. package/dist/abis/index.d.ts +12 -0
  14. package/dist/abis/index.js +12 -0
  15. package/dist/abis/infra.d.ts +701 -0
  16. package/dist/abis/infra.js +4 -0
  17. package/dist/abis/lever.d.ts +1710 -0
  18. package/dist/abis/lever.js +5 -0
  19. package/dist/abis/lever2.d.ts +2710 -0
  20. package/dist/abis/lever2.js +5 -0
  21. package/dist/abis/pools.d.ts +1898 -0
  22. package/dist/abis/pools.js +4 -0
  23. package/dist/abis/sticky.d.ts +953 -0
  24. package/dist/abis/sticky.js +4 -0
  25. package/dist/abis/v1.d.ts +1627 -0
  26. package/dist/abis/v1.js +5 -0
  27. package/dist/abis/v2.d.ts +3264 -0
  28. package/dist/abis/v2.js +8 -0
  29. package/dist/addresses.d.ts +87 -0
  30. package/dist/addresses.js +62 -0
  31. package/dist/any.d.ts +447 -0
  32. package/dist/any.js +729 -0
  33. package/dist/api.d.ts +62 -0
  34. package/dist/api.js +30 -0
  35. package/dist/blocks.d.ts +107 -0
  36. package/dist/blocks.js +126 -0
  37. package/dist/coin-rules-config.d.ts +8 -0
  38. package/dist/coin-rules-config.js +13 -0
  39. package/dist/coin-rules.d.ts +383 -0
  40. package/dist/coin-rules.js +878 -0
  41. package/dist/coins.d.ts +217 -0
  42. package/dist/coins.js +520 -0
  43. package/dist/dips.d.ts +133 -0
  44. package/dist/dips.js +148 -0
  45. package/dist/errors.d.ts +35 -0
  46. package/dist/errors.js +347 -0
  47. package/dist/index.d.ts +73 -0
  48. package/dist/index.js +58 -0
  49. package/dist/infinity.d.ts +63 -0
  50. package/dist/infinity.js +96 -0
  51. package/dist/infra.d.ts +112 -0
  52. package/dist/infra.js +114 -0
  53. package/dist/lever.d.ts +391 -0
  54. package/dist/lever.js +419 -0
  55. package/dist/pools.d.ts +274 -0
  56. package/dist/pools.js +405 -0
  57. package/dist/sticky-rules.d.ts +179 -0
  58. package/dist/sticky-rules.js +580 -0
  59. package/dist/sticky.d.ts +216 -0
  60. package/dist/sticky.js +292 -0
  61. package/dist/tx.d.ts +70 -0
  62. package/dist/tx.js +69 -0
  63. package/dist/v3.d.ts +42 -0
  64. package/dist/v3.js +98 -0
  65. package/package.json +58 -4
@@ -0,0 +1,2 @@
1
+ // Generated from web/src/lib/dips-abi.ts (the site's ABIs of the live contracts). Do not edit by hand: node scripts/gen-abis.mjs
2
+ export const dipDeskAbi = [{ "type": "function", "name": "MAX_DURATION", "inputs": [], "outputs": [{ "name": "", "type": "uint32" }], "stateMutability": "view" }, { "type": "function", "name": "MAX_EXERCISE_FEE_BPS", "inputs": [], "outputs": [{ "name": "", "type": "uint16" }], "stateMutability": "view" }, { "type": "function", "name": "MAX_PREMIUM_BPS", "inputs": [], "outputs": [{ "name": "", "type": "uint16" }], "stateMutability": "view" }, { "type": "function", "name": "MAX_PREMIUM_FEE_BPS", "inputs": [], "outputs": [{ "name": "", "type": "uint16" }], "stateMutability": "view" }, { "type": "function", "name": "MIN_COVER", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "MIN_DEPOSIT", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "MIN_DURATION", "inputs": [], "outputs": [{ "name": "", "type": "uint32" }], "stateMutability": "view" }, { "type": "function", "name": "PRICE_UNIT", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "bidCount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "bidIdsByMaker", "inputs": [{ "name": "maker", "type": "address" }, { "name": "start", "type": "uint256" }, { "name": "n", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[]" }, { "name": "total", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "bidIdsOf", "inputs": [{ "name": "token", "type": "address" }, { "name": "start", "type": "uint256" }, { "name": "n", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[]" }, { "name": "total", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "bidOf", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple", "components": [{ "name": "maker", "type": "address" }, { "name": "duration", "type": "uint32" }, { "name": "premiumBps", "type": "uint16" }, { "name": "until", "type": "uint40" }, { "name": "closed", "type": "bool" }, { "name": "token", "type": "address" }, { "name": "strike", "type": "uint128" }, { "name": "minCover", "type": "uint128" }, { "name": "free", "type": "uint128" }, { "name": "locked", "type": "uint128" }] }], "stateMutability": "view" }, { "type": "function", "name": "bidsOf", "inputs": [{ "name": "token", "type": "address" }, { "name": "n", "type": "uint256" }], "outputs": [{ "name": "ids", "type": "uint256[]" }, { "name": "list", "type": "tuple[]", "components": [{ "name": "maker", "type": "address" }, { "name": "duration", "type": "uint32" }, { "name": "premiumBps", "type": "uint16" }, { "name": "until", "type": "uint40" }, { "name": "closed", "type": "bool" }, { "name": "token", "type": "address" }, { "name": "strike", "type": "uint128" }, { "name": "minCover", "type": "uint128" }, { "name": "free", "type": "uint128" }, { "name": "locked", "type": "uint128" }] }], "stateMutability": "view" }, { "type": "function", "name": "buy", "inputs": [{ "name": "bidId", "type": "uint256" }, { "name": "coins", "type": "uint128" }], "outputs": [{ "name": "id", "type": "uint256" }], "stateMutability": "payable" }, { "type": "function", "name": "close", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "collectPlatform", "inputs": [], "outputs": [{ "name": "a", "type": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "end", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "endMany", "inputs": [{ "name": "ids", "type": "uint256[]" }], "outputs": [{ "name": "n", "type": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "exercise", "inputs": [{ "name": "id", "type": "uint256" }, { "name": "coins", "type": "uint128" }, { "name": "minBnb", "type": "uint256" }], "outputs": [{ "name": "out", "type": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "exerciseFeeBps", "inputs": [], "outputs": [{ "name": "", "type": "uint16" }], "stateMutability": "view" }, { "type": "function", "name": "floorCount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "floorIdsOf", "inputs": [{ "name": "holder", "type": "address" }, { "name": "start", "type": "uint256" }, { "name": "n", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[]" }, { "name": "total", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "floorOf", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple", "components": [{ "name": "owner", "type": "address" }, { "name": "bought", "type": "uint40" }, { "name": "expiry", "type": "uint40" }, { "name": "feeBps", "type": "uint16" }, { "name": "bid", "type": "uint64" }, { "name": "coins", "type": "uint128" }, { "name": "cover", "type": "uint128" }, { "name": "premium", "type": "uint128" }] }], "stateMutability": "view" }, { "type": "function", "name": "fund", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [], "stateMutability": "payable" }, { "type": "function", "name": "give", "inputs": [{ "name": "id", "type": "uint256" }, { "name": "to", "type": "address" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "live", "inputs": [{ "name": "id", "type": "uint256" }], "outputs": [{ "name": "", "type": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "owner", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "stateMutability": "view" }, { "type": "function", "name": "pending", "inputs": [{ "name": "", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "pendingTotal", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "platformOwed", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "platformWallet", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "stateMutability": "view" }, { "type": "function", "name": "post", "inputs": [{ "name": "token", "type": "address" }, { "name": "strike", "type": "uint128" }, { "name": "duration", "type": "uint32" }, { "name": "premiumBps", "type": "uint16" }, { "name": "until", "type": "uint40" }, { "name": "minCover", "type": "uint128" }], "outputs": [{ "name": "id", "type": "uint256" }], "stateMutability": "payable" }, { "type": "function", "name": "premiumFeeBps", "inputs": [], "outputs": [{ "name": "", "type": "uint16" }], "stateMutability": "view" }, { "type": "function", "name": "quote", "inputs": [{ "name": "id", "type": "uint256" }, { "name": "coins", "type": "uint128" }], "outputs": [{ "name": "cover", "type": "uint256" }, { "name": "premium", "type": "uint256" }, { "name": "fee", "type": "uint256" }, { "name": "payout", "type": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "setFees", "inputs": [{ "name": "premiumFeeBps_", "type": "uint16" }, { "name": "exerciseFeeBps_", "type": "uint16" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setOwner", "inputs": [{ "name": "owner_", "type": "address" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "setPlatform", "inputs": [{ "name": "wallet", "type": "address" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "withdraw", "inputs": [{ "name": "id", "type": "uint256" }, { "name": "amount", "type": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "withdrawPending", "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "event", "name": "BidClosed", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "returned", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "BidFunded", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "amount", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "BidPosted", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "token", "type": "address", "indexed": true }, { "name": "maker", "type": "address", "indexed": true }, { "name": "strike", "type": "uint256", "indexed": false }, { "name": "duration", "type": "uint32", "indexed": false }, { "name": "premiumBps", "type": "uint16", "indexed": false }, { "name": "until", "type": "uint40", "indexed": false }, { "name": "minCover", "type": "uint256", "indexed": false }, { "name": "deposit", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "BidWithdrawn", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "amount", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "FeesSet", "inputs": [{ "name": "premiumFeeBps", "type": "uint16", "indexed": false }, { "name": "exerciseFeeBps", "type": "uint16", "indexed": false }], "anonymous": false }, { "type": "event", "name": "FloorBought", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "bid", "type": "uint256", "indexed": true }, { "name": "owner", "type": "address", "indexed": true }, { "name": "token", "type": "address", "indexed": false }, { "name": "coins", "type": "uint256", "indexed": false }, { "name": "cover", "type": "uint256", "indexed": false }, { "name": "premium", "type": "uint256", "indexed": false }, { "name": "fee", "type": "uint256", "indexed": false }, { "name": "expiry", "type": "uint40", "indexed": false }], "anonymous": false }, { "type": "event", "name": "FloorEnded", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "bid", "type": "uint256", "indexed": true }, { "name": "by", "type": "address", "indexed": true }, { "name": "coinsLeft", "type": "uint256", "indexed": false }, { "name": "released", "type": "uint256", "indexed": false }, { "name": "expired", "type": "bool", "indexed": false }], "anonymous": false }, { "type": "event", "name": "FloorExercised", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "bid", "type": "uint256", "indexed": true }, { "name": "owner", "type": "address", "indexed": true }, { "name": "coins", "type": "uint256", "indexed": false }, { "name": "delivered", "type": "uint256", "indexed": false }, { "name": "paid", "type": "uint256", "indexed": false }, { "name": "fee", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "FloorGiven", "inputs": [{ "name": "id", "type": "uint256", "indexed": true }, { "name": "from", "type": "address", "indexed": true }, { "name": "to", "type": "address", "indexed": true }], "anonymous": false }, { "type": "event", "name": "OwnerSet", "inputs": [{ "name": "owner", "type": "address", "indexed": false }], "anonymous": false }, { "type": "event", "name": "PlatformCollected", "inputs": [{ "name": "to", "type": "address", "indexed": true }, { "name": "amount", "type": "uint256", "indexed": false }], "anonymous": false }, { "type": "event", "name": "PlatformSet", "inputs": [{ "name": "wallet", "type": "address", "indexed": false }], "anonymous": false }, { "type": "error", "name": "BidOver", "inputs": [] }, { "type": "error", "name": "Delivery", "inputs": [] }, { "type": "error", "name": "Deposit", "inputs": [] }, { "type": "error", "name": "Duration", "inputs": [] }, { "type": "error", "name": "Ended", "inputs": [] }, { "type": "error", "name": "FeeTooHigh", "inputs": [] }, { "type": "error", "name": "IsClosed", "inputs": [] }, { "type": "error", "name": "NoBid", "inputs": [] }, { "type": "error", "name": "NoCoin", "inputs": [] }, { "type": "error", "name": "NoFloor", "inputs": [] }, { "type": "error", "name": "NotMaker", "inputs": [] }, { "type": "error", "name": "NotOver", "inputs": [] }, { "type": "error", "name": "NotOwner", "inputs": [] }, { "type": "error", "name": "NotYours", "inputs": [] }, { "type": "error", "name": "NothingOwed", "inputs": [] }, { "type": "error", "name": "PayoutTooLow", "inputs": [] }, { "type": "error", "name": "Premium", "inputs": [] }, { "type": "error", "name": "Reentrant", "inputs": [] }, { "type": "error", "name": "SendFailed", "inputs": [] }, { "type": "error", "name": "Strike", "inputs": [] }, { "type": "error", "name": "TooBig", "inputs": [] }, { "type": "error", "name": "TooSmall", "inputs": [] }, { "type": "error", "name": "Until", "inputs": [] }, { "type": "error", "name": "Value", "inputs": [] }, { "type": "error", "name": "ZeroAddress", "inputs": [] }];
@@ -0,0 +1,12 @@
1
+ export { any3FactoryAbi, any3HookAbi } from "./any3.js";
2
+ export { anyTaxFactoryAbi, anyTaxHookAbi } from "./anytax.js";
3
+ export { stickyFactoryAbi, stickyTokenAbi, stickyValidatorAbi } from "./sticky.js";
4
+ export { v1BuySimCode, v1FactoryAbi, v1LockerAbi, v1TokenAbi } from "./v1.js";
5
+ export { arenaAbi, floorVaultAbi, payrollBoxAbi, v2FactoryAbi, v2LockerAbi, v2TokenAbi, voteBoxAbi } from "./v2.js";
6
+ export { plainTokenAbi, poolsFactoryAbi, poolsHookAbi } from "./pools.js";
7
+ export { leverEngineAbi, leverFactoryAbi, leverHookAbi, leverRouterAbi } from "./lever.js";
8
+ export { lever2EngineAbi, lever2FactoryAbi, lever2HookAbi, lever2LensAbi } from "./lever2.js";
9
+ export { callsDeskAbi, callsFactoryAbi, callsHookAbi } from "./calls.js";
10
+ export { dipDeskAbi } from "./dips.js";
11
+ export { hooksExecutorAbi, hooksFloorAbi, hooksFloorFactoryAbi } from "./infra.js";
12
+ export { POOL_KEY, SWAP_EXACT_IN_SINGLE, clPoolManagerAbi, clQuoterAbi, erc20Abi, permit2Abi, universalRouterAbi, pancakeV2FactoryAbi, v2PairAbi, v3PoolAbi, v3QuoterAbi, v3RouterAbi, } from "./common.js";
@@ -0,0 +1,12 @@
1
+ export { any3FactoryAbi, any3HookAbi } from "./any3.js";
2
+ export { anyTaxFactoryAbi, anyTaxHookAbi } from "./anytax.js";
3
+ export { stickyFactoryAbi, stickyTokenAbi, stickyValidatorAbi } from "./sticky.js";
4
+ export { v1BuySimCode, v1FactoryAbi, v1LockerAbi, v1TokenAbi } from "./v1.js";
5
+ export { arenaAbi, floorVaultAbi, payrollBoxAbi, v2FactoryAbi, v2LockerAbi, v2TokenAbi, voteBoxAbi } from "./v2.js";
6
+ export { plainTokenAbi, poolsFactoryAbi, poolsHookAbi } from "./pools.js";
7
+ export { leverEngineAbi, leverFactoryAbi, leverHookAbi, leverRouterAbi } from "./lever.js";
8
+ export { lever2EngineAbi, lever2FactoryAbi, lever2HookAbi, lever2LensAbi } from "./lever2.js";
9
+ export { callsDeskAbi, callsFactoryAbi, callsHookAbi } from "./calls.js";
10
+ export { dipDeskAbi } from "./dips.js";
11
+ export { hooksExecutorAbi, hooksFloorAbi, hooksFloorFactoryAbi } from "./infra.js";
12
+ export { POOL_KEY, SWAP_EXACT_IN_SINGLE, clPoolManagerAbi, clQuoterAbi, erc20Abi, permit2Abi, universalRouterAbi, pancakeV2FactoryAbi, v2PairAbi, v3PoolAbi, v3QuoterAbi, v3RouterAbi, } from "./common.js";