@andrewkimjoseph/celina-sdk 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/README.md +7 -5
  2. package/build/aa/create-aa-client.d.ts +10 -3
  3. package/build/aa/create-aa-client.js +6 -3
  4. package/build/aa/create-aa-client.js.map +1 -1
  5. package/build/aa/prepared-calls.d.ts +6 -2
  6. package/build/aa/prepared-calls.js +13 -3
  7. package/build/aa/prepared-calls.js.map +1 -1
  8. package/build/aa/types.d.ts +10 -2
  9. package/build/config/celina-tag.d.ts +7 -3
  10. package/build/config/celina-tag.js +7 -3
  11. package/build/config/celina-tag.js.map +1 -1
  12. package/package.json +3 -2
  13. package/build/src/a2a/agent-card.d.ts +0 -37
  14. package/build/src/a2a/agent-card.js +0 -46
  15. package/build/src/a2a/agent-card.js.map +0 -1
  16. package/build/src/a2a/index.d.ts +0 -2
  17. package/build/src/a2a/index.js +0 -3
  18. package/build/src/a2a/index.js.map +0 -1
  19. package/build/src/a2a/skills.d.ts +0 -18
  20. package/build/src/a2a/skills.js +0 -106
  21. package/build/src/a2a/skills.js.map +0 -1
  22. package/build/src/aa/create-aa-client.d.ts +0 -37
  23. package/build/src/aa/create-aa-client.js +0 -112
  24. package/build/src/aa/create-aa-client.js.map +0 -1
  25. package/build/src/aa/gas-sponsorship.d.ts +0 -27
  26. package/build/src/aa/gas-sponsorship.js +0 -65
  27. package/build/src/aa/gas-sponsorship.js.map +0 -1
  28. package/build/src/aa/index.d.ts +0 -4
  29. package/build/src/aa/index.js +0 -4
  30. package/build/src/aa/index.js.map +0 -1
  31. package/build/src/aa/prepared-calls.d.ts +0 -4
  32. package/build/src/aa/prepared-calls.js +0 -17
  33. package/build/src/aa/prepared-calls.js.map +0 -1
  34. package/build/src/aa/types.d.ts +0 -53
  35. package/build/src/aa/types.js +0 -2
  36. package/build/src/aa/types.js.map +0 -1
  37. package/build/src/abis/aave-pool.d.ts +0 -37
  38. package/build/src/abis/aave-pool.js +0 -26
  39. package/build/src/abis/aave-pool.js.map +0 -1
  40. package/build/src/abis/accounts.d.ts +0 -13
  41. package/build/src/abis/accounts.js +0 -10
  42. package/build/src/abis/accounts.js.map +0 -1
  43. package/build/src/abis/election.d.ts +0 -124
  44. package/build/src/abis/election.js +0 -88
  45. package/build/src/abis/election.js.map +0 -1
  46. package/build/src/abis/gooddollar-broker.d.ts +0 -77
  47. package/build/src/abis/gooddollar-broker.js +0 -44
  48. package/build/src/abis/gooddollar-broker.js.map +0 -1
  49. package/build/src/abis/gooddollar-identity.d.ts +0 -85
  50. package/build/src/abis/gooddollar-identity.js +0 -52
  51. package/build/src/abis/gooddollar-identity.js.map +0 -1
  52. package/build/src/abis/governance.d.ts +0 -86
  53. package/build/src/abis/governance.js +0 -68
  54. package/build/src/abis/governance.js.map +0 -1
  55. package/build/src/abis/locked-gold.d.ts +0 -10
  56. package/build/src/abis/locked-gold.js +0 -10
  57. package/build/src/abis/locked-gold.js.map +0 -1
  58. package/build/src/abis/nft.d.ts +0 -107
  59. package/build/src/abis/nft.js +0 -75
  60. package/build/src/abis/nft.js.map +0 -1
  61. package/build/src/abis/permit2.d.ts +0 -43
  62. package/build/src/abis/permit2.js +0 -30
  63. package/build/src/abis/permit2.js.map +0 -1
  64. package/build/src/abis/self-registry.d.ts +0 -194
  65. package/build/src/abis/self-registry.js +0 -120
  66. package/build/src/abis/self-registry.js.map +0 -1
  67. package/build/src/abis/ubi-scheme.d.ts +0 -91
  68. package/build/src/abis/ubi-scheme.js +0 -66
  69. package/build/src/abis/ubi-scheme.js.map +0 -1
  70. package/build/src/abis/uniswap-state-view.d.ts +0 -34
  71. package/build/src/abis/uniswap-state-view.js +0 -22
  72. package/build/src/abis/uniswap-state-view.js.map +0 -1
  73. package/build/src/abis/uniswap-v4-quoter.d.ts +0 -86
  74. package/build/src/abis/uniswap-v4-quoter.js +0 -64
  75. package/build/src/abis/uniswap-v4-quoter.js.map +0 -1
  76. package/build/src/abis/universal-router.d.ts +0 -16
  77. package/build/src/abis/universal-router.js +0 -14
  78. package/build/src/abis/universal-router.js.map +0 -1
  79. package/build/src/abis/validators-minimal.d.ts +0 -65
  80. package/build/src/abis/validators-minimal.js +0 -39
  81. package/build/src/abis/validators-minimal.js.map +0 -1
  82. package/build/src/analytics/amplitude.d.ts +0 -11
  83. package/build/src/analytics/amplitude.js +0 -76
  84. package/build/src/analytics/amplitude.js.map +0 -1
  85. package/build/src/analytics/config.d.ts +0 -7
  86. package/build/src/analytics/config.js +0 -25
  87. package/build/src/analytics/config.js.map +0 -1
  88. package/build/src/analytics/consumer-package.d.ts +0 -9
  89. package/build/src/analytics/consumer-package.js +0 -143
  90. package/build/src/analytics/consumer-package.js.map +0 -1
  91. package/build/src/analytics/mcp-tool-events.d.ts +0 -5
  92. package/build/src/analytics/mcp-tool-events.js +0 -53
  93. package/build/src/analytics/mcp-tool-events.js.map +0 -1
  94. package/build/src/analytics/wallet-context.d.ts +0 -11
  95. package/build/src/analytics/wallet-context.js +0 -81
  96. package/build/src/analytics/wallet-context.js.map +0 -1
  97. package/build/src/analytics/wallet-extract.d.ts +0 -9
  98. package/build/src/analytics/wallet-extract.js +0 -21
  99. package/build/src/analytics/wallet-extract.js.map +0 -1
  100. package/build/src/analytics/wrap-service.d.ts +0 -5
  101. package/build/src/analytics/wrap-service.js +0 -38
  102. package/build/src/analytics/wrap-service.js.map +0 -1
  103. package/build/src/clients/celo-client.d.ts +0 -19
  104. package/build/src/clients/celo-client.js +0 -32
  105. package/build/src/clients/celo-client.js.map +0 -1
  106. package/build/src/clients/ens-client.d.ts +0 -17
  107. package/build/src/clients/ens-client.js +0 -30
  108. package/build/src/clients/ens-client.js.map +0 -1
  109. package/build/src/clients/mento-sdk.d.ts +0 -2
  110. package/build/src/clients/mento-sdk.js +0 -9
  111. package/build/src/clients/mento-sdk.js.map +0 -1
  112. package/build/src/clients/self-api.d.ts +0 -82
  113. package/build/src/clients/self-api.js +0 -242
  114. package/build/src/clients/self-api.js.map +0 -1
  115. package/build/src/clients/uniswap-sdk.d.ts +0 -4
  116. package/build/src/clients/uniswap-sdk.js +0 -13
  117. package/build/src/clients/uniswap-sdk.js.map +0 -1
  118. package/build/src/config/aave.d.ts +0 -17
  119. package/build/src/config/aave.js +0 -77
  120. package/build/src/config/aave.js.map +0 -1
  121. package/build/src/config/celina-tag.d.ts +0 -46
  122. package/build/src/config/celina-tag.js +0 -166
  123. package/build/src/config/celina-tag.js.map +0 -1
  124. package/build/src/config/celo-core-contracts.d.ts +0 -8
  125. package/build/src/config/celo-core-contracts.js +0 -9
  126. package/build/src/config/celo-core-contracts.js.map +0 -1
  127. package/build/src/config/chains.d.ts +0 -937
  128. package/build/src/config/chains.js +0 -319
  129. package/build/src/config/chains.js.map +0 -1
  130. package/build/src/config/gooddollar.d.ts +0 -16
  131. package/build/src/config/gooddollar.js +0 -24
  132. package/build/src/config/gooddollar.js.map +0 -1
  133. package/build/src/config/sdk-config.d.ts +0 -44
  134. package/build/src/config/sdk-config.js +0 -28
  135. package/build/src/config/sdk-config.js.map +0 -1
  136. package/build/src/config/self.d.ts +0 -22
  137. package/build/src/config/self.js +0 -27
  138. package/build/src/config/self.js.map +0 -1
  139. package/build/src/config/uniswap.d.ts +0 -42
  140. package/build/src/config/uniswap.js +0 -76
  141. package/build/src/config/uniswap.js.map +0 -1
  142. package/build/src/index.d.ts +0 -127
  143. package/build/src/index.js +0 -72
  144. package/build/src/index.js.map +0 -1
  145. package/build/src/oasf/index.d.ts +0 -2
  146. package/build/src/oasf/index.js +0 -3
  147. package/build/src/oasf/index.js.map +0 -1
  148. package/build/src/oasf/record.d.ts +0 -39
  149. package/build/src/oasf/record.js +0 -35
  150. package/build/src/oasf/record.js.map +0 -1
  151. package/build/src/oasf/taxonomy.d.ts +0 -19
  152. package/build/src/oasf/taxonomy.js +0 -46
  153. package/build/src/oasf/taxonomy.js.map +0 -1
  154. package/build/src/services/aave.service.d.ts +0 -59
  155. package/build/src/services/aave.service.js +0 -210
  156. package/build/src/services/aave.service.js.map +0 -1
  157. package/build/src/services/account.service.d.ts +0 -22
  158. package/build/src/services/account.service.js +0 -29
  159. package/build/src/services/account.service.js.map +0 -1
  160. package/build/src/services/agentkarma.service.d.ts +0 -89
  161. package/build/src/services/agentkarma.service.js +0 -102
  162. package/build/src/services/agentkarma.service.js.map +0 -1
  163. package/build/src/services/blockchain.service.d.ts +0 -126
  164. package/build/src/services/blockchain.service.js +0 -188
  165. package/build/src/services/blockchain.service.js.map +0 -1
  166. package/build/src/services/contract.service.d.ts +0 -78
  167. package/build/src/services/contract.service.js +0 -117
  168. package/build/src/services/contract.service.js.map +0 -1
  169. package/build/src/services/ens.service.d.ts +0 -44
  170. package/build/src/services/ens.service.js +0 -92
  171. package/build/src/services/ens.service.js.map +0 -1
  172. package/build/src/services/gooddollar.service.d.ts +0 -184
  173. package/build/src/services/gooddollar.service.js +0 -675
  174. package/build/src/services/gooddollar.service.js.map +0 -1
  175. package/build/src/services/governance.service.d.ts +0 -96
  176. package/build/src/services/governance.service.js +0 -255
  177. package/build/src/services/governance.service.js.map +0 -1
  178. package/build/src/services/mento-fx.service.d.ts +0 -81
  179. package/build/src/services/mento-fx.service.js +0 -318
  180. package/build/src/services/mento-fx.service.js.map +0 -1
  181. package/build/src/services/nft.service.d.ts +0 -58
  182. package/build/src/services/nft.service.js +0 -222
  183. package/build/src/services/nft.service.js.map +0 -1
  184. package/build/src/services/self-session-store.d.ts +0 -19
  185. package/build/src/services/self-session-store.js +0 -28
  186. package/build/src/services/self-session-store.js.map +0 -1
  187. package/build/src/services/self.service.d.ts +0 -241
  188. package/build/src/services/self.service.js +0 -699
  189. package/build/src/services/self.service.js.map +0 -1
  190. package/build/src/services/staking.service.d.ts +0 -140
  191. package/build/src/services/staking.service.js +0 -444
  192. package/build/src/services/staking.service.js.map +0 -1
  193. package/build/src/services/token.service.d.ts +0 -110
  194. package/build/src/services/token.service.js +0 -189
  195. package/build/src/services/token.service.js.map +0 -1
  196. package/build/src/services/transaction.service.d.ts +0 -69
  197. package/build/src/services/transaction.service.js +0 -197
  198. package/build/src/services/transaction.service.js.map +0 -1
  199. package/build/src/services/uniswap-path-router.d.ts +0 -40
  200. package/build/src/services/uniswap-path-router.js +0 -168
  201. package/build/src/services/uniswap-path-router.js.map +0 -1
  202. package/build/src/services/uniswap-pool-discovery.d.ts +0 -55
  203. package/build/src/services/uniswap-pool-discovery.js +0 -198
  204. package/build/src/services/uniswap-pool-discovery.js.map +0 -1
  205. package/build/src/services/uniswap.service.d.ts +0 -83
  206. package/build/src/services/uniswap.service.js +0 -352
  207. package/build/src/services/uniswap.service.js.map +0 -1
  208. package/build/src/simulation/index.d.ts +0 -5
  209. package/build/src/simulation/index.js +0 -2
  210. package/build/src/simulation/index.js.map +0 -1
  211. package/build/src/simulation/simulate-prepared-step.d.ts +0 -17
  212. package/build/src/simulation/simulate-prepared-step.js +0 -42
  213. package/build/src/simulation/simulate-prepared-step.js.map +0 -1
  214. package/build/src/tools/catalog.d.ts +0 -11
  215. package/build/src/tools/catalog.js +0 -43
  216. package/build/src/tools/catalog.js.map +0 -1
  217. package/build/src/tools/domains/aave.d.ts +0 -2
  218. package/build/src/tools/domains/aave.js +0 -115
  219. package/build/src/tools/domains/aave.js.map +0 -1
  220. package/build/src/tools/domains/agentkarma.d.ts +0 -2
  221. package/build/src/tools/domains/agentkarma.js +0 -92
  222. package/build/src/tools/domains/agentkarma.js.map +0 -1
  223. package/build/src/tools/domains/blockchain.d.ts +0 -2
  224. package/build/src/tools/domains/blockchain.js +0 -122
  225. package/build/src/tools/domains/blockchain.js.map +0 -1
  226. package/build/src/tools/domains/browser.d.ts +0 -2
  227. package/build/src/tools/domains/browser.js +0 -45
  228. package/build/src/tools/domains/browser.js.map +0 -1
  229. package/build/src/tools/domains/contract.d.ts +0 -2
  230. package/build/src/tools/domains/contract.js +0 -67
  231. package/build/src/tools/domains/contract.js.map +0 -1
  232. package/build/src/tools/domains/ens.d.ts +0 -2
  233. package/build/src/tools/domains/ens.js +0 -16
  234. package/build/src/tools/domains/ens.js.map +0 -1
  235. package/build/src/tools/domains/gooddollar.d.ts +0 -2
  236. package/build/src/tools/domains/gooddollar.js +0 -171
  237. package/build/src/tools/domains/gooddollar.js.map +0 -1
  238. package/build/src/tools/domains/governance.d.ts +0 -2
  239. package/build/src/tools/domains/governance.js +0 -41
  240. package/build/src/tools/domains/governance.js.map +0 -1
  241. package/build/src/tools/domains/index.d.ts +0 -1
  242. package/build/src/tools/domains/index.js +0 -33
  243. package/build/src/tools/domains/index.js.map +0 -1
  244. package/build/src/tools/domains/mento-fx.d.ts +0 -2
  245. package/build/src/tools/domains/mento-fx.js +0 -67
  246. package/build/src/tools/domains/mento-fx.js.map +0 -1
  247. package/build/src/tools/domains/nft.d.ts +0 -2
  248. package/build/src/tools/domains/nft.js +0 -38
  249. package/build/src/tools/domains/nft.js.map +0 -1
  250. package/build/src/tools/domains/self.d.ts +0 -2
  251. package/build/src/tools/domains/self.js +0 -187
  252. package/build/src/tools/domains/self.js.map +0 -1
  253. package/build/src/tools/domains/staking.d.ts +0 -2
  254. package/build/src/tools/domains/staking.js +0 -74
  255. package/build/src/tools/domains/staking.js.map +0 -1
  256. package/build/src/tools/domains/token.d.ts +0 -2
  257. package/build/src/tools/domains/token.js +0 -74
  258. package/build/src/tools/domains/token.js.map +0 -1
  259. package/build/src/tools/domains/transaction.d.ts +0 -2
  260. package/build/src/tools/domains/transaction.js +0 -120
  261. package/build/src/tools/domains/transaction.js.map +0 -1
  262. package/build/src/tools/domains/uniswap.d.ts +0 -2
  263. package/build/src/tools/domains/uniswap.js +0 -67
  264. package/build/src/tools/domains/uniswap.js.map +0 -1
  265. package/build/src/tools/filter.d.ts +0 -2
  266. package/build/src/tools/filter.js +0 -50
  267. package/build/src/tools/filter.js.map +0 -1
  268. package/build/src/tools/index.d.ts +0 -7
  269. package/build/src/tools/index.js +0 -7
  270. package/build/src/tools/index.js.map +0 -1
  271. package/build/src/tools/schemas/common.d.ts +0 -165
  272. package/build/src/tools/schemas/common.js +0 -207
  273. package/build/src/tools/schemas/common.js.map +0 -1
  274. package/build/src/tools/schemas/wallet-params.d.ts +0 -9
  275. package/build/src/tools/schemas/wallet-params.js +0 -52
  276. package/build/src/tools/schemas/wallet-params.js.map +0 -1
  277. package/build/src/tools/swap-routing.d.ts +0 -25
  278. package/build/src/tools/swap-routing.js +0 -174
  279. package/build/src/tools/swap-routing.js.map +0 -1
  280. package/build/src/tools/types.d.ts +0 -124
  281. package/build/src/tools/types.js +0 -2
  282. package/build/src/tools/types.js.map +0 -1
  283. package/build/src/tools/utils/normalize-token.d.ts +0 -2
  284. package/build/src/tools/utils/normalize-token.js +0 -12
  285. package/build/src/tools/utils/normalize-token.js.map +0 -1
  286. package/build/src/tools/utils/wallet.d.ts +0 -4
  287. package/build/src/tools/utils/wallet.js +0 -8
  288. package/build/src/tools/utils/wallet.js.map +0 -1
  289. package/build/src/tools/website-sync.d.ts +0 -28
  290. package/build/src/tools/website-sync.js +0 -198
  291. package/build/src/tools/website-sync.js.map +0 -1
  292. package/build/src/types/prepared.d.ts +0 -43
  293. package/build/src/types/prepared.js +0 -15
  294. package/build/src/types/prepared.js.map +0 -1
  295. package/build/src/utils/celo-format.d.ts +0 -6
  296. package/build/src/utils/celo-format.js +0 -17
  297. package/build/src/utils/celo-format.js.map +0 -1
  298. package/build/src/utils/erc20-allowance-storage.d.ts +0 -20
  299. package/build/src/utils/erc20-allowance-storage.js +0 -64
  300. package/build/src/utils/erc20-allowance-storage.js.map +0 -1
  301. package/build/src/utils/format-date.d.ts +0 -2
  302. package/build/src/utils/format-date.js +0 -13
  303. package/build/src/utils/format-date.js.map +0 -1
  304. package/build/src/utils/format-duration.d.ts +0 -2
  305. package/build/src/utils/format-duration.js +0 -17
  306. package/build/src/utils/format-duration.js.map +0 -1
  307. package/build/src/utils/format-unix-datetime.d.ts +0 -4
  308. package/build/src/utils/format-unix-datetime.js +0 -18
  309. package/build/src/utils/format-unix-datetime.js.map +0 -1
  310. package/build/src/utils/gooddollar-ubi-period.d.ts +0 -23
  311. package/build/src/utils/gooddollar-ubi-period.js +0 -23
  312. package/build/src/utils/gooddollar-ubi-period.js.map +0 -1
  313. package/build/src/utils/normalize-address.d.ts +0 -7
  314. package/build/src/utils/normalize-address.js +0 -16
  315. package/build/src/utils/normalize-address.js.map +0 -1
  316. package/build/src/utils/self-format.d.ts +0 -28
  317. package/build/src/utils/self-format.js +0 -79
  318. package/build/src/utils/self-format.js.map +0 -1
  319. package/build/src/utils/self-signing.d.ts +0 -4
  320. package/build/src/utils/self-signing.js +0 -38
  321. package/build/src/utils/self-signing.js.map +0 -1
  322. package/build/src/utils/transaction-errors.d.ts +0 -3
  323. package/build/src/utils/transaction-errors.js +0 -17
  324. package/build/src/utils/transaction-errors.js.map +0 -1
  325. package/build/tests/catalog/domains/blockchain.d.ts +0 -2
  326. package/build/tests/catalog/domains/blockchain.js +0 -127
  327. package/build/tests/catalog/domains/blockchain.js.map +0 -1
  328. package/build/tests/catalog/domains/chain-ext.d.ts +0 -5
  329. package/build/tests/catalog/domains/chain-ext.js +0 -207
  330. package/build/tests/catalog/domains/chain-ext.js.map +0 -1
  331. package/build/tests/catalog/domains/defi.d.ts +0 -6
  332. package/build/tests/catalog/domains/defi.js +0 -581
  333. package/build/tests/catalog/domains/defi.js.map +0 -1
  334. package/build/tests/catalog/domains/self.d.ts +0 -2
  335. package/build/tests/catalog/domains/self.js +0 -208
  336. package/build/tests/catalog/domains/self.js.map +0 -1
  337. package/build/tests/catalog/domains/token.d.ts +0 -2
  338. package/build/tests/catalog/domains/token.js +0 -70
  339. package/build/tests/catalog/domains/token.js.map +0 -1
  340. package/build/tests/catalog/domains/transaction.d.ts +0 -2
  341. package/build/tests/catalog/domains/transaction.js +0 -96
  342. package/build/tests/catalog/domains/transaction.js.map +0 -1
  343. package/build/tests/catalog/index.d.ts +0 -2
  344. package/build/tests/catalog/index.js +0 -2
  345. package/build/tests/catalog/index.js.map +0 -1
  346. package/build/tests/catalog/operations.d.ts +0 -12
  347. package/build/tests/catalog/operations.js +0 -29
  348. package/build/tests/catalog/operations.js.map +0 -1
  349. package/build/tests/catalog/types.d.ts +0 -24
  350. package/build/tests/catalog/types.js +0 -2
  351. package/build/tests/catalog/types.js.map +0 -1
  352. package/build/tests/fixtures/mainnet.d.ts +0 -54
  353. package/build/tests/fixtures/mainnet.js +0 -53
  354. package/build/tests/fixtures/mainnet.js.map +0 -1
  355. package/build/tests/helpers/assert.d.ts +0 -4
  356. package/build/tests/helpers/assert.js +0 -24
  357. package/build/tests/helpers/assert.js.map +0 -1
  358. package/build/tests/helpers/env.d.ts +0 -12
  359. package/build/tests/helpers/env.js +0 -29
  360. package/build/tests/helpers/env.js.map +0 -1
  361. package/build/tests/helpers/gating.d.ts +0 -3
  362. package/build/tests/helpers/gating.js +0 -23
  363. package/build/tests/helpers/gating.js.map +0 -1
  364. package/build/tests/testing-entry.d.ts +0 -6
  365. package/build/tests/testing-entry.js +0 -6
  366. package/build/tests/testing-entry.js.map +0 -1
@@ -1,86 +0,0 @@
1
- export declare const v4QuoterAbi: readonly [{
2
- readonly name: "quoteExactInputSingle";
3
- readonly type: "function";
4
- readonly stateMutability: "nonpayable";
5
- readonly inputs: readonly [{
6
- readonly name: "params";
7
- readonly type: "tuple";
8
- readonly components: readonly [{
9
- readonly name: "poolKey";
10
- readonly type: "tuple";
11
- readonly components: readonly [{
12
- readonly name: "currency0";
13
- readonly type: "address";
14
- }, {
15
- readonly name: "currency1";
16
- readonly type: "address";
17
- }, {
18
- readonly name: "fee";
19
- readonly type: "uint24";
20
- }, {
21
- readonly name: "tickSpacing";
22
- readonly type: "int24";
23
- }, {
24
- readonly name: "hooks";
25
- readonly type: "address";
26
- }];
27
- }, {
28
- readonly name: "zeroForOne";
29
- readonly type: "bool";
30
- }, {
31
- readonly name: "exactAmount";
32
- readonly type: "uint128";
33
- }, {
34
- readonly name: "hookData";
35
- readonly type: "bytes";
36
- }];
37
- }];
38
- readonly outputs: readonly [{
39
- readonly name: "amountOut";
40
- readonly type: "uint256";
41
- }, {
42
- readonly name: "gasEstimate";
43
- readonly type: "uint256";
44
- }];
45
- }, {
46
- readonly name: "quoteExactInput";
47
- readonly type: "function";
48
- readonly stateMutability: "nonpayable";
49
- readonly inputs: readonly [{
50
- readonly name: "params";
51
- readonly type: "tuple";
52
- readonly components: readonly [{
53
- readonly name: "exactCurrency";
54
- readonly type: "address";
55
- }, {
56
- readonly name: "path";
57
- readonly type: "tuple[]";
58
- readonly components: readonly [{
59
- readonly name: "intermediateCurrency";
60
- readonly type: "address";
61
- }, {
62
- readonly name: "fee";
63
- readonly type: "uint24";
64
- }, {
65
- readonly name: "tickSpacing";
66
- readonly type: "int24";
67
- }, {
68
- readonly name: "hooks";
69
- readonly type: "address";
70
- }, {
71
- readonly name: "hookData";
72
- readonly type: "bytes";
73
- }];
74
- }, {
75
- readonly name: "exactAmount";
76
- readonly type: "uint128";
77
- }];
78
- }];
79
- readonly outputs: readonly [{
80
- readonly name: "amountOut";
81
- readonly type: "uint256";
82
- }, {
83
- readonly name: "gasEstimate";
84
- readonly type: "uint256";
85
- }];
86
- }];
@@ -1,64 +0,0 @@
1
- export const v4QuoterAbi = [
2
- {
3
- name: "quoteExactInputSingle",
4
- type: "function",
5
- stateMutability: "nonpayable",
6
- inputs: [
7
- {
8
- name: "params",
9
- type: "tuple",
10
- components: [
11
- {
12
- name: "poolKey",
13
- type: "tuple",
14
- components: [
15
- { name: "currency0", type: "address" },
16
- { name: "currency1", type: "address" },
17
- { name: "fee", type: "uint24" },
18
- { name: "tickSpacing", type: "int24" },
19
- { name: "hooks", type: "address" },
20
- ],
21
- },
22
- { name: "zeroForOne", type: "bool" },
23
- { name: "exactAmount", type: "uint128" },
24
- { name: "hookData", type: "bytes" },
25
- ],
26
- },
27
- ],
28
- outputs: [
29
- { name: "amountOut", type: "uint256" },
30
- { name: "gasEstimate", type: "uint256" },
31
- ],
32
- },
33
- {
34
- name: "quoteExactInput",
35
- type: "function",
36
- stateMutability: "nonpayable",
37
- inputs: [
38
- {
39
- name: "params",
40
- type: "tuple",
41
- components: [
42
- { name: "exactCurrency", type: "address" },
43
- {
44
- name: "path",
45
- type: "tuple[]",
46
- components: [
47
- { name: "intermediateCurrency", type: "address" },
48
- { name: "fee", type: "uint24" },
49
- { name: "tickSpacing", type: "int24" },
50
- { name: "hooks", type: "address" },
51
- { name: "hookData", type: "bytes" },
52
- ],
53
- },
54
- { name: "exactAmount", type: "uint128" },
55
- ],
56
- },
57
- ],
58
- outputs: [
59
- { name: "amountOut", type: "uint256" },
60
- { name: "gasEstimate", type: "uint256" },
61
- ],
62
- },
63
- ];
64
- //# sourceMappingURL=uniswap-v4-quoter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uniswap-v4-quoter.js","sourceRoot":"","sources":["../../../src/abis/uniswap-v4-quoter.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE;oBACV;wBACE,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,OAAO;wBACb,UAAU,EAAE;4BACV,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;4BACtC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;4BACtC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE;4BACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;yBACnC;qBACF;oBACD,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;oBACpC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;oBACxC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;iBACpC;aACF;SACF;QACD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;SACzC;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,YAAY;QAC7B,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC1C;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,SAAS;wBACf,UAAU,EAAE;4BACV,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,EAAE;4BACjD,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,EAAE;4BACtC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;4BAClC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;yBACpC;qBACF;oBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;iBACzC;aACF;SACF;QACD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;YACtC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;SACzC;KACF;CACO,CAAC"}
@@ -1,16 +0,0 @@
1
- export declare const universalRouterAbi: readonly [{
2
- readonly name: "execute";
3
- readonly type: "function";
4
- readonly stateMutability: "payable";
5
- readonly inputs: readonly [{
6
- readonly name: "commands";
7
- readonly type: "bytes";
8
- }, {
9
- readonly name: "inputs";
10
- readonly type: "bytes[]";
11
- }, {
12
- readonly name: "deadline";
13
- readonly type: "uint256";
14
- }];
15
- readonly outputs: readonly [];
16
- }];
@@ -1,14 +0,0 @@
1
- export const universalRouterAbi = [
2
- {
3
- name: "execute",
4
- type: "function",
5
- stateMutability: "payable",
6
- inputs: [
7
- { name: "commands", type: "bytes" },
8
- { name: "inputs", type: "bytes[]" },
9
- { name: "deadline", type: "uint256" },
10
- ],
11
- outputs: [],
12
- },
13
- ];
14
- //# sourceMappingURL=universal-router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"universal-router.js","sourceRoot":"","sources":["../../../src/abis/universal-router.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,SAAS;QAC1B,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE;YACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;SACtC;QACD,OAAO,EAAE,EAAE;KACZ;CACO,CAAC"}
@@ -1,65 +0,0 @@
1
- /** Minimal Validators ABI for group and member reads (full ABI in validators.json). */
2
- export declare const validatorsMinimalAbi: readonly [{
3
- readonly type: "function";
4
- readonly name: "getRegisteredValidators";
5
- readonly inputs: readonly [];
6
- readonly outputs: readonly [{
7
- readonly name: "";
8
- readonly type: "address[]";
9
- }];
10
- readonly stateMutability: "view";
11
- }, {
12
- readonly type: "function";
13
- readonly name: "getValidator";
14
- readonly inputs: readonly [{
15
- readonly name: "validator";
16
- readonly type: "address";
17
- }];
18
- readonly outputs: readonly [{
19
- readonly name: "ecdsaPublicKey";
20
- readonly type: "bytes";
21
- }, {
22
- readonly name: "blsPublicKey";
23
- readonly type: "bytes";
24
- }, {
25
- readonly name: "affiliation";
26
- readonly type: "address";
27
- }, {
28
- readonly name: "score";
29
- readonly type: "uint256";
30
- }, {
31
- readonly name: "signer";
32
- readonly type: "address";
33
- }];
34
- readonly stateMutability: "view";
35
- }, {
36
- readonly type: "function";
37
- readonly name: "getValidatorGroup";
38
- readonly inputs: readonly [{
39
- readonly name: "group";
40
- readonly type: "address";
41
- }];
42
- readonly outputs: readonly [{
43
- readonly name: "members";
44
- readonly type: "address[]";
45
- }, {
46
- readonly name: "commission";
47
- readonly type: "uint256";
48
- }, {
49
- readonly name: "lastSlashed";
50
- readonly type: "uint256";
51
- }, {
52
- readonly name: "name";
53
- readonly type: "string";
54
- }, {
55
- readonly name: "membersHistory";
56
- readonly type: "uint256[]";
57
- }, {
58
- readonly name: "membersHistoryLength";
59
- readonly type: "uint256";
60
- }, {
61
- readonly name: "slashingMultiplier";
62
- readonly type: "uint256";
63
- }];
64
- readonly stateMutability: "view";
65
- }];
@@ -1,39 +0,0 @@
1
- /** Minimal Validators ABI for group and member reads (full ABI in validators.json). */
2
- export const validatorsMinimalAbi = [
3
- {
4
- type: "function",
5
- name: "getRegisteredValidators",
6
- inputs: [],
7
- outputs: [{ name: "", type: "address[]" }],
8
- stateMutability: "view",
9
- },
10
- {
11
- type: "function",
12
- name: "getValidator",
13
- inputs: [{ name: "validator", type: "address" }],
14
- outputs: [
15
- { name: "ecdsaPublicKey", type: "bytes" },
16
- { name: "blsPublicKey", type: "bytes" },
17
- { name: "affiliation", type: "address" },
18
- { name: "score", type: "uint256" },
19
- { name: "signer", type: "address" },
20
- ],
21
- stateMutability: "view",
22
- },
23
- {
24
- type: "function",
25
- name: "getValidatorGroup",
26
- inputs: [{ name: "group", type: "address" }],
27
- outputs: [
28
- { name: "members", type: "address[]" },
29
- { name: "commission", type: "uint256" },
30
- { name: "lastSlashed", type: "uint256" },
31
- { name: "name", type: "string" },
32
- { name: "membersHistory", type: "uint256[]" },
33
- { name: "membersHistoryLength", type: "uint256" },
34
- { name: "slashingMultiplier", type: "uint256" },
35
- ],
36
- stateMutability: "view",
37
- },
38
- ];
39
- //# sourceMappingURL=validators-minimal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validators-minimal.js","sourceRoot":"","sources":["../../../src/abis/validators-minimal.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,yBAAyB;QAC/B,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAC1C,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAChD,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE;YACzC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE;YACvC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;YACxC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;YAClC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;SACpC;QACD,eAAe,EAAE,MAAM;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC5C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE;YACtC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;YACvC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;YACxC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,EAAE;YAC7C,EAAE,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,EAAE;YACjD,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,EAAE;SAChD;QACD,eAAe,EAAE,MAAM;KACxB;CACO,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { SdkConfig } from "../config/sdk-config.js";
2
- export type TrackMcpToolContext = {
3
- methodKey: string;
4
- args: readonly unknown[];
5
- };
6
- /** Test-only hook to assert telemetry without calling Amplitude. */
7
- export declare function setTrackFnForTests(fn: ((eventName: string, config: SdkConfig, context: TrackMcpToolContext, userId: string | undefined) => void) | null): void;
8
- /** Fire-and-forget MCP tool name event; never throws to callers. */
9
- export declare function trackMcpTool(eventName: string, config: SdkConfig, context?: TrackMcpToolContext): void;
10
- /** Await any queued Amplitude events (e.g. end of a Next.js route via `after()`). */
11
- export declare function flushCelinaAnalytics(): Promise<void>;
@@ -1,76 +0,0 @@
1
- import { isAnalyticsEnabled, resolveAmplitudeApiKey, resolveDeviceId, } from "./config.js";
2
- import { resolveAnalyticsWallet } from "./wallet-context.js";
3
- let initialized = false;
4
- let testTrackFn = null;
5
- /** Test-only hook to assert telemetry without calling Amplitude. */
6
- export function setTrackFnForTests(fn) {
7
- testTrackFn = fn;
8
- initialized = false;
9
- }
10
- async function ensureInit(config) {
11
- const apiKey = resolveAmplitudeApiKey(config);
12
- if (!apiKey) {
13
- return false;
14
- }
15
- if (initialized) {
16
- return true;
17
- }
18
- try {
19
- const amplitude = await import("@amplitude/analytics-node");
20
- amplitude.init(apiKey);
21
- initialized = true;
22
- return true;
23
- }
24
- catch {
25
- return false;
26
- }
27
- }
28
- /** Fire-and-forget MCP tool name event; never throws to callers. */
29
- export function trackMcpTool(eventName, config, context) {
30
- if (!isAnalyticsEnabled(config)) {
31
- return;
32
- }
33
- const userId = context
34
- ? resolveAnalyticsWallet(context.methodKey, context.args, config)
35
- : undefined;
36
- if (testTrackFn) {
37
- try {
38
- testTrackFn(eventName, config, context ?? { methodKey: "", args: [] }, userId);
39
- }
40
- catch {
41
- // ignore test hook failures
42
- }
43
- return;
44
- }
45
- void (async () => {
46
- try {
47
- if (!(await ensureInit(config))) {
48
- return;
49
- }
50
- const amplitude = await import("@amplitude/analytics-node");
51
- await amplitude.track(eventName, undefined, {
52
- device_id: resolveDeviceId(config),
53
- ...(userId ? { user_id: userId } : {}),
54
- }).promise;
55
- // Serverless (Vercel, Lambda) freezes when the handler returns unless we flush.
56
- await amplitude.flush().promise;
57
- }
58
- catch {
59
- // telemetry must not break SDK reads
60
- }
61
- })();
62
- }
63
- /** Await any queued Amplitude events (e.g. end of a Next.js route via `after()`). */
64
- export async function flushCelinaAnalytics() {
65
- if (!initialized) {
66
- return;
67
- }
68
- try {
69
- const amplitude = await import("@amplitude/analytics-node");
70
- await amplitude.flush().promise;
71
- }
72
- catch {
73
- // ignore flush failures
74
- }
75
- }
76
- //# sourceMappingURL=amplitude.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"amplitude.js","sourceRoot":"","sources":["../../../src/analytics/amplitude.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAO7D,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,WAAW,GAOJ,IAAI,CAAC;AAEhB,oEAAoE;AACpE,MAAM,UAAU,kBAAkB,CAChC,EAOQ;IAER,WAAW,GAAG,EAAE,CAAC;IACjB,WAAW,GAAG,KAAK,CAAC;AACtB,CAAC;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,CAAC,2BAA2B,CAAC,CAAC;YAC5D,MAAM,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE;gBAC1C,SAAS,EAAE,eAAe,CAAC,MAAM,CAAC;gBAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvC,CAAC,CAAC,OAAO,CAAC;YACX,gFAAgF;YAChF,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC;QAClC,CAAC;QAAC,MAAM,CAAC;YACP,qCAAqC;QACvC,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;AACP,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO;IACT,CAAC;IACD,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;QAC5D,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,wBAAwB;IAC1B,CAAC;AACH,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { SdkConfig } from "../config/sdk-config.js";
2
- /** Public Amplitude project ingestion key (bundled for default telemetry on Node installs). */
3
- export declare const DEFAULT_AMPLITUDE_API_KEY = "f36f9a7fdc253ed864072edc627b2a55";
4
- /** Whether Amplitude read telemetry is active for this process. */
5
- export declare function isAnalyticsEnabled(config: SdkConfig): boolean;
6
- export declare function resolveAmplitudeApiKey(config: SdkConfig): string | undefined;
7
- export declare function resolveDeviceId(config: SdkConfig): string;
@@ -1,25 +0,0 @@
1
- /** Public Amplitude project ingestion key (bundled for default telemetry on Node installs). */
2
- export const DEFAULT_AMPLITUDE_API_KEY = "f36f9a7fdc253ed864072edc627b2a55";
3
- const DEFAULT_DEVICE_ID = "celina-sdk";
4
- /** Whether Amplitude read telemetry is active for this process. */
5
- export function isAnalyticsEnabled(config) {
6
- if (typeof process === "undefined") {
7
- return false;
8
- }
9
- if (config.analyticsEnabled === false) {
10
- return false;
11
- }
12
- return true;
13
- }
14
- export function resolveAmplitudeApiKey(config) {
15
- if (!isAnalyticsEnabled(config)) {
16
- return undefined;
17
- }
18
- return (config.amplitudeApiKey ??
19
- process.env.AMPLITUDE_API_KEY ??
20
- DEFAULT_AMPLITUDE_API_KEY);
21
- }
22
- export function resolveDeviceId(config) {
23
- return config.analyticsDeviceId ?? DEFAULT_DEVICE_ID;
24
- }
25
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/analytics/config.ts"],"names":[],"mappings":"AAEA,+FAA+F;AAC/F,MAAM,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,CAAC;AAE5E,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAEvC,mEAAmE;AACnE,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,MAAM,CAAC,gBAAgB,KAAK,KAAK,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,CACL,MAAM,CAAC,eAAe;QACtB,OAAO,CAAC,GAAG,CAAC,iBAAiB;QAC7B,yBAAyB,CAC1B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,OAAO,MAAM,CAAC,iBAAiB,IAAI,iBAAiB,CAAC;AACvD,CAAC"}
@@ -1,9 +0,0 @@
1
- /** Amplitude-safe id from npm `package.json` `name` (strip `@`, `/` and `-` → `_`). */
2
- export declare function sanitizePackageDeviceId(name: string): string;
3
- /**
4
- * npm package name of the app that called `createCelinaClient()`, sanitized for Amplitude.
5
- * Returns `undefined` when detection fails or the consumer is the SDK itself.
6
- */
7
- export declare function detectConsumerPackageName(stack?: string): string | undefined;
8
- /** Test-only: clear cached consumer detection between cases. */
9
- export declare function resetConsumerPackageDetectionForTests(): void;
@@ -1,143 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { dirname, join, resolve, sep } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- const SDK_PACKAGE_NAME = "@andrewkimjoseph/celina-sdk";
5
- const SDK_DEVICE_IDS = new Set(["andrewkimjoseph_celina_sdk", "celina-sdk"]);
6
- let detectionCached = false;
7
- let detectedDeviceId;
8
- /** Amplitude-safe id from npm `package.json` `name` (strip `@`, `/` and `-` → `_`). */
9
- export function sanitizePackageDeviceId(name) {
10
- const stripped = name.startsWith("@") ? name.slice(1) : name;
11
- return stripped.replace(/\//g, "_").replace(/-/g, "_");
12
- }
13
- function getSdkPackageRoot() {
14
- let dir = dirname(fileURLToPath(import.meta.url));
15
- for (let i = 0; i < 24; i++) {
16
- const pkgPath = join(dir, "package.json");
17
- if (existsSync(pkgPath)) {
18
- try {
19
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
20
- if (pkg.name === SDK_PACKAGE_NAME) {
21
- return dir;
22
- }
23
- }
24
- catch {
25
- // ignore malformed package.json
26
- }
27
- }
28
- const parent = dirname(dir);
29
- if (parent === dir) {
30
- break;
31
- }
32
- dir = parent;
33
- }
34
- return undefined;
35
- }
36
- function isSdkFramePath(filePath, sdkRoot) {
37
- const normalized = resolve(filePath);
38
- if (sdkRoot) {
39
- const root = resolve(sdkRoot);
40
- if (normalized === root || normalized.startsWith(root + sep)) {
41
- return true;
42
- }
43
- }
44
- return normalized.includes(`${sep}node_modules${sep}@andrewkimjoseph${sep}celina-sdk${sep}`);
45
- }
46
- function readPackageNameFromFile(filePath) {
47
- let dir = dirname(resolve(filePath));
48
- for (let i = 0; i < 24; i++) {
49
- const pkgPath = join(dir, "package.json");
50
- if (existsSync(pkgPath)) {
51
- try {
52
- const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
53
- if (typeof pkg.name === "string" && pkg.name.length > 0) {
54
- return pkg.name;
55
- }
56
- }
57
- catch {
58
- return undefined;
59
- }
60
- }
61
- const parent = dirname(dir);
62
- if (parent === dir) {
63
- break;
64
- }
65
- dir = parent;
66
- }
67
- return undefined;
68
- }
69
- function parseStackFramePaths(stack) {
70
- const paths = [];
71
- for (const line of stack.split("\n")) {
72
- const trimmed = line.trim();
73
- if (!trimmed.startsWith("at ")) {
74
- continue;
75
- }
76
- const parenMatch = /\(([^)]+)\)/.exec(trimmed);
77
- let loc = parenMatch?.[1];
78
- if (!loc) {
79
- const bare = /^at (?:async )?(?:.+ )?(.+)$/.exec(trimmed);
80
- loc = bare?.[1];
81
- }
82
- if (!loc) {
83
- continue;
84
- }
85
- let filePath = loc.trim();
86
- if (filePath.startsWith("file://")) {
87
- try {
88
- filePath = fileURLToPath(filePath);
89
- }
90
- catch {
91
- continue;
92
- }
93
- }
94
- filePath = filePath.replace(/:\d+:\d+$/, "").replace(/:\d+$/, "");
95
- if (filePath) {
96
- paths.push(filePath);
97
- }
98
- }
99
- return paths;
100
- }
101
- /**
102
- * npm package name of the app that called `createCelinaClient()`, sanitized for Amplitude.
103
- * Returns `undefined` when detection fails or the consumer is the SDK itself.
104
- */
105
- export function detectConsumerPackageName(stack) {
106
- if (detectionCached) {
107
- return detectedDeviceId;
108
- }
109
- detectionCached = true;
110
- detectedDeviceId = undefined;
111
- if (typeof process === "undefined") {
112
- return detectedDeviceId;
113
- }
114
- try {
115
- const stackTrace = stack ?? new Error().stack ?? "";
116
- const sdkRoot = getSdkPackageRoot();
117
- for (const framePath of parseStackFramePaths(stackTrace)) {
118
- if (isSdkFramePath(framePath, sdkRoot)) {
119
- continue;
120
- }
121
- const rawName = readPackageNameFromFile(framePath);
122
- if (!rawName) {
123
- continue;
124
- }
125
- const deviceId = sanitizePackageDeviceId(rawName);
126
- if (SDK_DEVICE_IDS.has(deviceId)) {
127
- continue;
128
- }
129
- detectedDeviceId = deviceId;
130
- return detectedDeviceId;
131
- }
132
- }
133
- catch {
134
- detectedDeviceId = undefined;
135
- }
136
- return detectedDeviceId;
137
- }
138
- /** Test-only: clear cached consumer detection between cases. */
139
- export function resetConsumerPackageDetectionForTests() {
140
- detectionCached = false;
141
- detectedDeviceId = undefined;
142
- }
143
- //# sourceMappingURL=consumer-package.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consumer-package.js","sourceRoot":"","sources":["../../../src/analytics/consumer-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AACvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC,CAAC;AAE7E,IAAI,eAAe,GAAG,KAAK,CAAC;AAC5B,IAAI,gBAAoC,CAAC;AAEzC,uFAAuF;AACvF,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,iBAAiB;IACxB,IAAI,GAAG,GAAG,OAAO,CAAC,aAAa,CA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E,OAAO,CAAC,EAAE,CAAC;gBACvC,SAAS;YACX,CAAC;YACD,MAAM,OAAO,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;YACnD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,SAAS;YACX,CAAC;YACD,MAAM,QAAQ,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;YAClD,IAAI,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACjC,SAAS;YACX,CAAC;YACD,gBAAgB,GAAG,QAAQ,CAAC;YAC5B,OAAO,gBAAgB,CAAC;QAC1B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,gBAAgB,GAAG,SAAS,CAAC;IAC/B,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,qCAAqC;IACnD,eAAe,GAAG,KAAK,CAAC;IACxB,gBAAgB,GAAG,SAAS,CAAC;AAC/B,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated by scripts/generate-mcp-analytics-map.mjs — do not edit by hand.
3
- * Maps SDK method keys (catalog OperationSpec.id) to MCP tool event names.
4
- */
5
- export declare const MCP_TOOL_EVENT_BY_SDK_METHOD: Readonly<Record<string, string>>;
@@ -1,53 +0,0 @@
1
- /**
2
- * Generated by scripts/generate-mcp-analytics-map.mjs — do not edit by hand.
3
- * Maps SDK method keys (catalog OperationSpec.id) to MCP tool event names.
4
- */
5
- export const MCP_TOOL_EVENT_BY_SDK_METHOD = {
6
- "aave.getBalances": "get_aave_balances",
7
- "account.getAccount": "get_account",
8
- "account.getWalletAddress": "get_wallet_address",
9
- "blockchain.getBlock": "get_block",
10
- "blockchain.getBlockWithTransactions": "get_block",
11
- "blockchain.getLatestBlocks": "get_latest_blocks",
12
- "blockchain.getNetworkStatus": "get_network_status",
13
- "blockchain.getTransaction": "get_transaction",
14
- "contract.callFunction": "call_contract_function",
15
- "contract.estimateGas": "estimate_contract_gas",
16
- "ens.resolveEns": "resolve_ens",
17
- "gooddollar.estimateReserveSwap.sell": "estimate_gooddollar_reserve_swap",
18
- "gooddollar.getIdentityLink": "get_gooddollar_identity_link",
19
- "gooddollar.getReserveQuote.buy": "get_gooddollar_reserve_quote",
20
- "gooddollar.getReserveQuote.buy.exactOut": "get_gooddollar_reserve_quote",
21
- "gooddollar.getReserveQuote.sell": "get_gooddollar_reserve_quote",
22
- "gooddollar.getReserveQuote.sell.exactOut": "get_gooddollar_reserve_quote",
23
- "gooddollar.getUbiClaimEligibility": "get_gooddollar_ubi_entitlement",
24
- "gooddollar.getWhitelistingInfo": "get_gooddollar_whitelisting_info",
25
- "governance.getGovernanceProposals": "get_governance_proposals",
26
- "governance.getProposalDetails": "get_proposal_details",
27
- "mentoFx.estimateFx": "estimate_mento_fx",
28
- "mentoFx.getFxQuote": "get_mento_fx_quote",
29
- "nft.getNftBalance": "get_nft_balance",
30
- "nft.getNftInfo": "get_nft_info",
31
- "self.authenticatedSelfFetch": "authenticated_self_fetch",
32
- "self.checkSelfRegistration": "check_self_registration",
33
- "self.getSelfIdentity": "get_self_identity",
34
- "self.lookupSelfAgent": "lookup_self_agent",
35
- "self.signSelfRequest": "sign_self_request",
36
- "self.verifySelfAgent": "verify_self_agent",
37
- "self.verifySelfRequest": "verify_self_request",
38
- "staking.getActivatableStakes": "get_activatable_stakes",
39
- "staking.getStakingBalances": "get_staking_balances",
40
- "staking.getTotalStakingInfo": "get_total_staking_info",
41
- "staking.getValidatorGroupDetails": "get_validator_group_details",
42
- "staking.getValidatorGroups": "get_validator_groups",
43
- "token.getBalances": "get_celo_balances",
44
- "token.getStablecoinBalances": "get_stablecoin_balances",
45
- "token.getTokenBalance": "get_token_balance",
46
- "token.getTokenInfo": "get_token_info",
47
- "transaction.estimateSend": "estimate_send",
48
- "transaction.estimateTransaction": "estimate_transaction",
49
- "transaction.getGasFeeData": "get_gas_fee_data",
50
- "uniswap.estimateSwap": "estimate_uniswap_swap",
51
- "uniswap.getSwapQuote": "get_uniswap_quote",
52
- };
53
- //# sourceMappingURL=mcp-tool-events.js.map