kalvora.js 0.0.1-alpha.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 (726) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +10 -0
  4. package/README.md +391 -0
  5. package/dist/LICENSE +202 -0
  6. package/dist/README.md +391 -0
  7. package/dist/index.cjs +78254 -0
  8. package/dist/index.cjs.map +7 -0
  9. package/dist/index.d.ts +83 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +125 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/index.mjs +125 -0
  14. package/dist/proto/generated/google/protobuf/empty_pb.d.ts +63 -0
  15. package/dist/proto/generated/google/protobuf/empty_pb.js +49 -0
  16. package/dist/proto/generated/google/protobuf/timestamp_pb.d.ts +163 -0
  17. package/dist/proto/generated/google/protobuf/timestamp_pb.js +49 -0
  18. package/dist/proto/generated/guardian_pb.d.ts +1229 -0
  19. package/dist/proto/generated/guardian_pb.js +255 -0
  20. package/dist/proto/generated/kal_api_pb.d.ts +1350 -0
  21. package/dist/proto/generated/kal_api_pb.js +324 -0
  22. package/dist/proto/generated/txn_pb.d.ts +3653 -0
  23. package/dist/proto/generated/txn_pb.js +622 -0
  24. package/dist/proto/generated/validator_pb.d.ts +2385 -0
  25. package/dist/proto/generated/validator_pb.js +528 -0
  26. package/dist/proto/guardian.proto +266 -0
  27. package/dist/proto/kal_api.proto +289 -0
  28. package/dist/proto/txn.proto +718 -0
  29. package/dist/proto/validator.proto +469 -0
  30. package/dist/src/adapter/constants.d.ts +80 -0
  31. package/dist/src/adapter/constants.d.ts.map +1 -0
  32. package/dist/src/adapter/constants.js +89 -0
  33. package/dist/src/adapter/constants.js.map +1 -0
  34. package/dist/src/adapter/index.d.ts +45 -0
  35. package/dist/src/adapter/index.d.ts.map +1 -0
  36. package/dist/src/adapter/index.js +71 -0
  37. package/dist/src/adapter/index.js.map +1 -0
  38. package/dist/src/adapter/serialization.d.ts +94 -0
  39. package/dist/src/adapter/serialization.d.ts.map +1 -0
  40. package/dist/src/adapter/serialization.js +175 -0
  41. package/dist/src/adapter/serialization.js.map +1 -0
  42. package/dist/src/adapter/wallet-adapter.d.ts +230 -0
  43. package/dist/src/adapter/wallet-adapter.d.ts.map +1 -0
  44. package/dist/src/adapter/wallet-adapter.js +792 -0
  45. package/dist/src/adapter/wallet-adapter.js.map +1 -0
  46. package/dist/src/adapter/wallet-signer.d.ts +115 -0
  47. package/dist/src/adapter/wallet-signer.d.ts.map +1 -0
  48. package/dist/src/adapter/wallet-signer.js +357 -0
  49. package/dist/src/adapter/wallet-signer.js.map +1 -0
  50. package/dist/src/adapter/walletconnect.d.ts +148 -0
  51. package/dist/src/adapter/walletconnect.d.ts.map +1 -0
  52. package/dist/src/adapter/walletconnect.js +188 -0
  53. package/dist/src/adapter/walletconnect.js.map +1 -0
  54. package/dist/src/allowance/index.d.ts +2 -0
  55. package/dist/src/allowance/index.d.ts.map +1 -0
  56. package/dist/src/allowance/index.js +2 -0
  57. package/dist/src/allowance/index.js.map +1 -0
  58. package/dist/src/allowance/transaction.d.ts +227 -0
  59. package/dist/src/allowance/transaction.d.ts.map +1 -0
  60. package/dist/src/allowance/transaction.js +296 -0
  61. package/dist/src/allowance/transaction.js.map +1 -0
  62. package/dist/src/api/handler/fee-info/service.d.ts +126 -0
  63. package/dist/src/api/handler/fee-info/service.d.ts.map +1 -0
  64. package/dist/src/api/handler/fee-info/service.js +255 -0
  65. package/dist/src/api/handler/fee-info/service.js.map +1 -0
  66. package/dist/src/api/handler/index.d.ts +10 -0
  67. package/dist/src/api/handler/index.d.ts.map +1 -0
  68. package/dist/src/api/handler/index.js +14 -0
  69. package/dist/src/api/handler/index.js.map +1 -0
  70. package/dist/src/api/handler/nonce/service.d.ts +37 -0
  71. package/dist/src/api/handler/nonce/service.d.ts.map +1 -0
  72. package/dist/src/api/handler/nonce/service.js +64 -0
  73. package/dist/src/api/handler/nonce/service.js.map +1 -0
  74. package/dist/src/api/handler/token-info/service.d.ts +123 -0
  75. package/dist/src/api/handler/token-info/service.d.ts.map +1 -0
  76. package/dist/src/api/handler/token-info/service.js +218 -0
  77. package/dist/src/api/handler/token-info/service.js.map +1 -0
  78. package/dist/src/api/shared/indexer-utils.d.ts +14 -0
  79. package/dist/src/api/shared/indexer-utils.d.ts.map +1 -0
  80. package/dist/src/api/shared/indexer-utils.js +19 -0
  81. package/dist/src/api/shared/indexer-utils.js.map +1 -0
  82. package/dist/src/api/validator/balance/index.d.ts +8 -0
  83. package/dist/src/api/validator/balance/index.d.ts.map +1 -0
  84. package/dist/src/api/validator/balance/index.js +7 -0
  85. package/dist/src/api/validator/balance/index.js.map +1 -0
  86. package/dist/src/api/validator/balance/service.d.ts +42 -0
  87. package/dist/src/api/validator/balance/service.d.ts.map +1 -0
  88. package/dist/src/api/validator/balance/service.js +93 -0
  89. package/dist/src/api/validator/balance/service.js.map +1 -0
  90. package/dist/src/api/validator/base-fee/index.d.ts +8 -0
  91. package/dist/src/api/validator/base-fee/index.d.ts.map +1 -0
  92. package/dist/src/api/validator/base-fee/index.js +7 -0
  93. package/dist/src/api/validator/base-fee/index.js.map +1 -0
  94. package/dist/src/api/validator/base-fee/service.d.ts +39 -0
  95. package/dist/src/api/validator/base-fee/service.d.ts.map +1 -0
  96. package/dist/src/api/validator/base-fee/service.js +45 -0
  97. package/dist/src/api/validator/base-fee/service.js.map +1 -0
  98. package/dist/src/api/validator/fee-info/index.d.ts +7 -0
  99. package/dist/src/api/validator/fee-info/index.d.ts.map +1 -0
  100. package/dist/src/api/validator/fee-info/index.js +7 -0
  101. package/dist/src/api/validator/fee-info/index.js.map +1 -0
  102. package/dist/src/api/validator/fee-info/request.d.ts +25 -0
  103. package/dist/src/api/validator/fee-info/request.d.ts.map +1 -0
  104. package/dist/src/api/validator/fee-info/request.js +92 -0
  105. package/dist/src/api/validator/fee-info/request.js.map +1 -0
  106. package/dist/src/api/validator/nonce/index.d.ts +7 -0
  107. package/dist/src/api/validator/nonce/index.d.ts.map +1 -0
  108. package/dist/src/api/validator/nonce/index.js +7 -0
  109. package/dist/src/api/validator/nonce/index.js.map +1 -0
  110. package/dist/src/api/validator/nonce/service.d.ts +18 -0
  111. package/dist/src/api/validator/nonce/service.d.ts.map +1 -0
  112. package/dist/src/api/validator/nonce/service.js +51 -0
  113. package/dist/src/api/validator/nonce/service.js.map +1 -0
  114. package/dist/src/client/index.d.ts +8 -0
  115. package/dist/src/client/index.d.ts.map +1 -0
  116. package/dist/src/client/index.js +8 -0
  117. package/dist/src/client/index.js.map +1 -0
  118. package/dist/src/client/kalvora-client.d.ts +117 -0
  119. package/dist/src/client/kalvora-client.d.ts.map +1 -0
  120. package/dist/src/client/kalvora-client.js +112 -0
  121. package/dist/src/client/kalvora-client.js.map +1 -0
  122. package/dist/src/client/networks.d.ts +48 -0
  123. package/dist/src/client/networks.d.ts.map +1 -0
  124. package/dist/src/client/networks.js +41 -0
  125. package/dist/src/client/networks.js.map +1 -0
  126. package/dist/src/coin-txn/index.d.ts +9 -0
  127. package/dist/src/coin-txn/index.d.ts.map +1 -0
  128. package/dist/src/coin-txn/index.js +9 -0
  129. package/dist/src/coin-txn/index.js.map +1 -0
  130. package/dist/src/coin-txn/transaction.d.ts +94 -0
  131. package/dist/src/coin-txn/transaction.d.ts.map +1 -0
  132. package/dist/src/coin-txn/transaction.js +341 -0
  133. package/dist/src/coin-txn/transaction.js.map +1 -0
  134. package/dist/src/compliance/index.d.ts +2 -0
  135. package/dist/src/compliance/index.d.ts.map +1 -0
  136. package/dist/src/compliance/index.js +2 -0
  137. package/dist/src/compliance/index.js.map +1 -0
  138. package/dist/src/compliance/transaction.d.ts +150 -0
  139. package/dist/src/compliance/transaction.d.ts.map +1 -0
  140. package/dist/src/compliance/transaction.js +183 -0
  141. package/dist/src/compliance/transaction.js.map +1 -0
  142. package/dist/src/contract/create/index.d.ts +8 -0
  143. package/dist/src/contract/create/index.d.ts.map +1 -0
  144. package/dist/src/contract/create/index.js +7 -0
  145. package/dist/src/contract/create/index.js.map +1 -0
  146. package/dist/src/contract/create/transaction.d.ts +47 -0
  147. package/dist/src/contract/create/transaction.d.ts.map +1 -0
  148. package/dist/src/contract/create/transaction.js +137 -0
  149. package/dist/src/contract/create/transaction.js.map +1 -0
  150. package/dist/src/contract/index.d.ts +34 -0
  151. package/dist/src/contract/index.d.ts.map +1 -0
  152. package/dist/src/contract/index.js +34 -0
  153. package/dist/src/contract/index.js.map +1 -0
  154. package/dist/src/contract/shared/index.d.ts +6 -0
  155. package/dist/src/contract/shared/index.d.ts.map +1 -0
  156. package/dist/src/contract/shared/index.js +6 -0
  157. package/dist/src/contract/shared/index.js.map +1 -0
  158. package/dist/src/contract/shared/types.d.ts +114 -0
  159. package/dist/src/contract/shared/types.d.ts.map +1 -0
  160. package/dist/src/contract/shared/types.js +5 -0
  161. package/dist/src/contract/shared/types.js.map +1 -0
  162. package/dist/src/contract/shared/utils.d.ts +111 -0
  163. package/dist/src/contract/shared/utils.d.ts.map +1 -0
  164. package/dist/src/contract/shared/utils.js +182 -0
  165. package/dist/src/contract/shared/utils.js.map +1 -0
  166. package/dist/src/contract/update/index.d.ts +8 -0
  167. package/dist/src/contract/update/index.d.ts.map +1 -0
  168. package/dist/src/contract/update/index.js +7 -0
  169. package/dist/src/contract/update/index.js.map +1 -0
  170. package/dist/src/contract/update/transaction.d.ts +45 -0
  171. package/dist/src/contract/update/transaction.d.ts.map +1 -0
  172. package/dist/src/contract/update/transaction.js +123 -0
  173. package/dist/src/contract/update/transaction.js.map +1 -0
  174. package/dist/src/delegated-voting/index.d.ts +2 -0
  175. package/dist/src/delegated-voting/index.d.ts.map +1 -0
  176. package/dist/src/delegated-voting/index.js +2 -0
  177. package/dist/src/delegated-voting/index.js.map +1 -0
  178. package/dist/src/delegated-voting/transaction.d.ts +127 -0
  179. package/dist/src/delegated-voting/transaction.d.ts.map +1 -0
  180. package/dist/src/delegated-voting/transaction.js +195 -0
  181. package/dist/src/delegated-voting/transaction.js.map +1 -0
  182. package/dist/src/expense-ratio/index.d.ts +2 -0
  183. package/dist/src/expense-ratio/index.d.ts.map +1 -0
  184. package/dist/src/expense-ratio/index.js +2 -0
  185. package/dist/src/expense-ratio/index.js.map +1 -0
  186. package/dist/src/expense-ratio/transaction.d.ts +94 -0
  187. package/dist/src/expense-ratio/transaction.d.ts.map +1 -0
  188. package/dist/src/expense-ratio/transaction.js +122 -0
  189. package/dist/src/expense-ratio/transaction.js.map +1 -0
  190. package/dist/src/grpc/api/validator-api-client.d.ts +32 -0
  191. package/dist/src/grpc/api/validator-api-client.d.ts.map +1 -0
  192. package/dist/src/grpc/api/validator-api-client.js +61 -0
  193. package/dist/src/grpc/api/validator-api-client.js.map +1 -0
  194. package/dist/src/grpc/client-factory.d.ts +12 -0
  195. package/dist/src/grpc/client-factory.d.ts.map +1 -0
  196. package/dist/src/grpc/client-factory.js +248 -0
  197. package/dist/src/grpc/client-factory.js.map +1 -0
  198. package/dist/src/grpc/errors.d.ts +79 -0
  199. package/dist/src/grpc/errors.d.ts.map +1 -0
  200. package/dist/src/grpc/errors.js +108 -0
  201. package/dist/src/grpc/errors.js.map +1 -0
  202. package/dist/src/grpc/index.d.ts +21 -0
  203. package/dist/src/grpc/index.d.ts.map +1 -0
  204. package/dist/src/grpc/index.js +20 -0
  205. package/dist/src/grpc/index.js.map +1 -0
  206. package/dist/src/grpc/transaction/transaction-client.d.ts +97 -0
  207. package/dist/src/grpc/transaction/transaction-client.d.ts.map +1 -0
  208. package/dist/src/grpc/transaction/transaction-client.js +142 -0
  209. package/dist/src/grpc/transaction/transaction-client.js.map +1 -0
  210. package/dist/src/grpc/utils/grpc-web-fetch-wrapper.d.ts +2 -0
  211. package/dist/src/grpc/utils/grpc-web-fetch-wrapper.d.ts.map +1 -0
  212. package/dist/src/grpc/utils/grpc-web-fetch-wrapper.js +213 -0
  213. package/dist/src/grpc/utils/grpc-web-fetch-wrapper.js.map +1 -0
  214. package/dist/src/items/index.d.ts +7 -0
  215. package/dist/src/items/index.d.ts.map +1 -0
  216. package/dist/src/items/index.js +7 -0
  217. package/dist/src/items/index.js.map +1 -0
  218. package/dist/src/items/transaction.d.ts +132 -0
  219. package/dist/src/items/transaction.d.ts.map +1 -0
  220. package/dist/src/items/transaction.js +276 -0
  221. package/dist/src/items/transaction.js.map +1 -0
  222. package/dist/src/mint/index.d.ts +2 -0
  223. package/dist/src/mint/index.d.ts.map +1 -0
  224. package/dist/src/mint/index.js +2 -0
  225. package/dist/src/mint/index.js.map +1 -0
  226. package/dist/src/mint/transaction.d.ts +128 -0
  227. package/dist/src/mint/transaction.d.ts.map +1 -0
  228. package/dist/src/mint/transaction.js +118 -0
  229. package/dist/src/mint/transaction.js.map +1 -0
  230. package/dist/src/proposal/index.d.ts +3 -0
  231. package/dist/src/proposal/index.d.ts.map +1 -0
  232. package/dist/src/proposal/index.js +3 -0
  233. package/dist/src/proposal/index.js.map +1 -0
  234. package/dist/src/proposal/transaction.d.ts +95 -0
  235. package/dist/src/proposal/transaction.d.ts.map +1 -0
  236. package/dist/src/proposal/transaction.js +321 -0
  237. package/dist/src/proposal/transaction.js.map +1 -0
  238. package/dist/src/proposal-cancel/index.d.ts +2 -0
  239. package/dist/src/proposal-cancel/index.d.ts.map +1 -0
  240. package/dist/src/proposal-cancel/index.js +2 -0
  241. package/dist/src/proposal-cancel/index.js.map +1 -0
  242. package/dist/src/proposal-cancel/transaction.d.ts +31 -0
  243. package/dist/src/proposal-cancel/transaction.d.ts.map +1 -0
  244. package/dist/src/proposal-cancel/transaction.js +98 -0
  245. package/dist/src/proposal-cancel/transaction.js.map +1 -0
  246. package/dist/src/protocol/guardian-names.d.ts +35 -0
  247. package/dist/src/protocol/guardian-names.d.ts.map +1 -0
  248. package/dist/src/protocol/guardian-names.js +25 -0
  249. package/dist/src/protocol/guardian-names.js.map +1 -0
  250. package/dist/src/protocol/index.d.ts +36 -0
  251. package/dist/src/protocol/index.d.ts.map +1 -0
  252. package/dist/src/protocol/index.js +36 -0
  253. package/dist/src/protocol/index.js.map +1 -0
  254. package/dist/src/quash/index.d.ts +2 -0
  255. package/dist/src/quash/index.d.ts.map +1 -0
  256. package/dist/src/quash/index.js +2 -0
  257. package/dist/src/quash/index.js.map +1 -0
  258. package/dist/src/quash/transaction.d.ts +124 -0
  259. package/dist/src/quash/transaction.d.ts.map +1 -0
  260. package/dist/src/quash/transaction.js +118 -0
  261. package/dist/src/quash/transaction.js.map +1 -0
  262. package/dist/src/query/api-client.d.ts +368 -0
  263. package/dist/src/query/api-client.d.ts.map +1 -0
  264. package/dist/src/query/api-client.js +497 -0
  265. package/dist/src/query/api-client.js.map +1 -0
  266. package/dist/src/query/decoders.d.ts +184 -0
  267. package/dist/src/query/decoders.d.ts.map +1 -0
  268. package/dist/src/query/decoders.js +257 -0
  269. package/dist/src/query/decoders.js.map +1 -0
  270. package/dist/src/query/guardian-client.d.ts +73 -0
  271. package/dist/src/query/guardian-client.d.ts.map +1 -0
  272. package/dist/src/query/guardian-client.js +90 -0
  273. package/dist/src/query/guardian-client.js.map +1 -0
  274. package/dist/src/query/index.d.ts +16 -0
  275. package/dist/src/query/index.d.ts.map +1 -0
  276. package/dist/src/query/index.js +16 -0
  277. package/dist/src/query/index.js.map +1 -0
  278. package/dist/src/query/validator-client.d.ts +95 -0
  279. package/dist/src/query/validator-client.d.ts.map +1 -0
  280. package/dist/src/query/validator-client.js +116 -0
  281. package/dist/src/query/validator-client.js.map +1 -0
  282. package/dist/src/revoke/index.d.ts +2 -0
  283. package/dist/src/revoke/index.d.ts.map +1 -0
  284. package/dist/src/revoke/index.js +2 -0
  285. package/dist/src/revoke/index.js.map +1 -0
  286. package/dist/src/revoke/transaction.d.ts +123 -0
  287. package/dist/src/revoke/transaction.d.ts.map +1 -0
  288. package/dist/src/revoke/transaction.js +125 -0
  289. package/dist/src/revoke/transaction.js.map +1 -0
  290. package/dist/src/shared/crypto/address-utils.d.ts +71 -0
  291. package/dist/src/shared/crypto/address-utils.d.ts.map +1 -0
  292. package/dist/src/shared/crypto/address-utils.js +305 -0
  293. package/dist/src/shared/crypto/address-utils.js.map +1 -0
  294. package/dist/src/shared/crypto/constants.d.ts +29 -0
  295. package/dist/src/shared/crypto/constants.d.ts.map +1 -0
  296. package/dist/src/shared/crypto/constants.js +53 -0
  297. package/dist/src/shared/crypto/constants.js.map +1 -0
  298. package/dist/src/shared/crypto/signature-utils.d.ts +14 -0
  299. package/dist/src/shared/crypto/signature-utils.d.ts.map +1 -0
  300. package/dist/src/shared/crypto/signature-utils.js +40 -0
  301. package/dist/src/shared/crypto/signature-utils.js.map +1 -0
  302. package/dist/src/shared/fee-calculators/base-fee-constants.d.ts +33 -0
  303. package/dist/src/shared/fee-calculators/base-fee-constants.d.ts.map +1 -0
  304. package/dist/src/shared/fee-calculators/base-fee-constants.js +45 -0
  305. package/dist/src/shared/fee-calculators/base-fee-constants.js.map +1 -0
  306. package/dist/src/shared/fee-calculators/contract-fee-constants.d.ts +53 -0
  307. package/dist/src/shared/fee-calculators/contract-fee-constants.d.ts.map +1 -0
  308. package/dist/src/shared/fee-calculators/contract-fee-constants.js +73 -0
  309. package/dist/src/shared/fee-calculators/contract-fee-constants.js.map +1 -0
  310. package/dist/src/shared/fee-calculators/contract-fee-service.d.ts +60 -0
  311. package/dist/src/shared/fee-calculators/contract-fee-service.d.ts.map +1 -0
  312. package/dist/src/shared/fee-calculators/contract-fee-service.js +171 -0
  313. package/dist/src/shared/fee-calculators/contract-fee-service.js.map +1 -0
  314. package/dist/src/shared/fee-calculators/denomination-fallback.d.ts +41 -0
  315. package/dist/src/shared/fee-calculators/denomination-fallback.d.ts.map +1 -0
  316. package/dist/src/shared/fee-calculators/denomination-fallback.js +83 -0
  317. package/dist/src/shared/fee-calculators/denomination-fallback.js.map +1 -0
  318. package/dist/src/shared/fee-calculators/exchange-rate-service.d.ts +26 -0
  319. package/dist/src/shared/fee-calculators/exchange-rate-service.d.ts.map +1 -0
  320. package/dist/src/shared/fee-calculators/exchange-rate-service.js +62 -0
  321. package/dist/src/shared/fee-calculators/exchange-rate-service.js.map +1 -0
  322. package/dist/src/shared/fee-calculators/types.d.ts +81 -0
  323. package/dist/src/shared/fee-calculators/types.d.ts.map +1 -0
  324. package/dist/src/shared/fee-calculators/types.js +7 -0
  325. package/dist/src/shared/fee-calculators/types.js.map +1 -0
  326. package/dist/src/shared/fee-calculators/universal-fee-calculator.d.ts +144 -0
  327. package/dist/src/shared/fee-calculators/universal-fee-calculator.d.ts.map +1 -0
  328. package/dist/src/shared/fee-calculators/universal-fee-calculator.js +900 -0
  329. package/dist/src/shared/fee-calculators/universal-fee-calculator.js.map +1 -0
  330. package/dist/src/shared/monitoring/health-check.d.ts +37 -0
  331. package/dist/src/shared/monitoring/health-check.d.ts.map +1 -0
  332. package/dist/src/shared/monitoring/health-check.js +152 -0
  333. package/dist/src/shared/monitoring/health-check.js.map +1 -0
  334. package/dist/src/shared/monitoring/index.d.ts +9 -0
  335. package/dist/src/shared/monitoring/index.d.ts.map +1 -0
  336. package/dist/src/shared/monitoring/index.js +9 -0
  337. package/dist/src/shared/monitoring/index.js.map +1 -0
  338. package/dist/src/shared/monitoring/logger.d.ts +42 -0
  339. package/dist/src/shared/monitoring/logger.d.ts.map +1 -0
  340. package/dist/src/shared/monitoring/logger.js +185 -0
  341. package/dist/src/shared/monitoring/logger.js.map +1 -0
  342. package/dist/src/shared/monitoring/metrics.d.ts +33 -0
  343. package/dist/src/shared/monitoring/metrics.d.ts.map +1 -0
  344. package/dist/src/shared/monitoring/metrics.js +105 -0
  345. package/dist/src/shared/monitoring/metrics.js.map +1 -0
  346. package/dist/src/shared/network/constants.d.ts +34 -0
  347. package/dist/src/shared/network/constants.d.ts.map +1 -0
  348. package/dist/src/shared/network/constants.js +46 -0
  349. package/dist/src/shared/network/constants.js.map +1 -0
  350. package/dist/src/shared/protobuf/index.d.ts +18 -0
  351. package/dist/src/shared/protobuf/index.d.ts.map +1 -0
  352. package/dist/src/shared/protobuf/index.js +10 -0
  353. package/dist/src/shared/protobuf/index.js.map +1 -0
  354. package/dist/src/shared/tx/base.d.ts +24 -0
  355. package/dist/src/shared/tx/base.d.ts.map +1 -0
  356. package/dist/src/shared/tx/base.js +57 -0
  357. package/dist/src/shared/tx/base.js.map +1 -0
  358. package/dist/src/shared/tx/standard.d.ts +198 -0
  359. package/dist/src/shared/tx/standard.d.ts.map +1 -0
  360. package/dist/src/shared/tx/standard.js +283 -0
  361. package/dist/src/shared/tx/standard.js.map +1 -0
  362. package/dist/src/shared/utils/amount-utils.d.ts +110 -0
  363. package/dist/src/shared/utils/amount-utils.d.ts.map +1 -0
  364. package/dist/src/shared/utils/amount-utils.js +237 -0
  365. package/dist/src/shared/utils/amount-utils.js.map +1 -0
  366. package/dist/src/shared/utils/byte-utils.d.ts +127 -0
  367. package/dist/src/shared/utils/byte-utils.d.ts.map +1 -0
  368. package/dist/src/shared/utils/byte-utils.js +220 -0
  369. package/dist/src/shared/utils/byte-utils.js.map +1 -0
  370. package/dist/src/shared/utils/error-handler.d.ts +65 -0
  371. package/dist/src/shared/utils/error-handler.d.ts.map +1 -0
  372. package/dist/src/shared/utils/error-handler.js +157 -0
  373. package/dist/src/shared/utils/error-handler.js.map +1 -0
  374. package/dist/src/shared/utils/formatting.d.ts +133 -0
  375. package/dist/src/shared/utils/formatting.d.ts.map +1 -0
  376. package/dist/src/shared/utils/formatting.js +190 -0
  377. package/dist/src/shared/utils/formatting.js.map +1 -0
  378. package/dist/src/shared/utils/grpc-config-utils.d.ts +8 -0
  379. package/dist/src/shared/utils/grpc-config-utils.d.ts.map +1 -0
  380. package/dist/src/shared/utils/grpc-config-utils.js +11 -0
  381. package/dist/src/shared/utils/grpc-config-utils.js.map +1 -0
  382. package/dist/src/shared/utils/performance-benchmark.d.ts +136 -0
  383. package/dist/src/shared/utils/performance-benchmark.d.ts.map +1 -0
  384. package/dist/src/shared/utils/performance-benchmark.js +274 -0
  385. package/dist/src/shared/utils/performance-benchmark.js.map +1 -0
  386. package/dist/src/shared/utils/protobuf-utils.d.ts +39 -0
  387. package/dist/src/shared/utils/protobuf-utils.d.ts.map +1 -0
  388. package/dist/src/shared/utils/protobuf-utils.js +103 -0
  389. package/dist/src/shared/utils/protobuf-utils.js.map +1 -0
  390. package/dist/src/shared/utils/testing-defaults/grpc-config.d.ts +12 -0
  391. package/dist/src/shared/utils/testing-defaults/grpc-config.d.ts.map +1 -0
  392. package/dist/src/shared/utils/testing-defaults/grpc-config.js +16 -0
  393. package/dist/src/shared/utils/testing-defaults/grpc-config.js.map +1 -0
  394. package/dist/src/shared/utils/testing-defaults/index.d.ts +8 -0
  395. package/dist/src/shared/utils/testing-defaults/index.d.ts.map +1 -0
  396. package/dist/src/shared/utils/testing-defaults/index.js +8 -0
  397. package/dist/src/shared/utils/testing-defaults/index.js.map +1 -0
  398. package/dist/src/shared/utils/token-config.d.ts +31 -0
  399. package/dist/src/shared/utils/token-config.d.ts.map +1 -0
  400. package/dist/src/shared/utils/token-config.js +56 -0
  401. package/dist/src/shared/utils/token-config.js.map +1 -0
  402. package/dist/src/shared/utils/token-info.d.ts +101 -0
  403. package/dist/src/shared/utils/token-info.d.ts.map +1 -0
  404. package/dist/src/shared/utils/token-info.js +203 -0
  405. package/dist/src/shared/utils/token-info.js.map +1 -0
  406. package/dist/src/shared/utils/transaction-utils.d.ts +200 -0
  407. package/dist/src/shared/utils/transaction-utils.d.ts.map +1 -0
  408. package/dist/src/shared/utils/transaction-utils.js +293 -0
  409. package/dist/src/shared/utils/transaction-utils.js.map +1 -0
  410. package/dist/src/shared/utils/unified-amount-conversion.d.ts +65 -0
  411. package/dist/src/shared/utils/unified-amount-conversion.d.ts.map +1 -0
  412. package/dist/src/shared/utils/unified-amount-conversion.js +146 -0
  413. package/dist/src/shared/utils/unified-amount-conversion.js.map +1 -0
  414. package/dist/src/shared/utils/validation.d.ts +119 -0
  415. package/dist/src/shared/utils/validation.d.ts.map +1 -0
  416. package/dist/src/shared/utils/validation.js +540 -0
  417. package/dist/src/shared/utils/validation.js.map +1 -0
  418. package/dist/src/sign/finalize.d.ts +82 -0
  419. package/dist/src/sign/finalize.d.ts.map +1 -0
  420. package/dist/src/sign/finalize.js +216 -0
  421. package/dist/src/sign/finalize.js.map +1 -0
  422. package/dist/src/sign/index.d.ts +19 -0
  423. package/dist/src/sign/index.d.ts.map +1 -0
  424. package/dist/src/sign/index.js +21 -0
  425. package/dist/src/sign/index.js.map +1 -0
  426. package/dist/src/sign/signer.d.ts +71 -0
  427. package/dist/src/sign/signer.d.ts.map +1 -0
  428. package/dist/src/sign/signer.js +65 -0
  429. package/dist/src/sign/signer.js.map +1 -0
  430. package/dist/src/smart-contracts/deploy/index.d.ts +5 -0
  431. package/dist/src/smart-contracts/deploy/index.d.ts.map +1 -0
  432. package/dist/src/smart-contracts/deploy/index.js +5 -0
  433. package/dist/src/smart-contracts/deploy/index.js.map +1 -0
  434. package/dist/src/smart-contracts/deploy/transaction.d.ts +54 -0
  435. package/dist/src/smart-contracts/deploy/transaction.d.ts.map +1 -0
  436. package/dist/src/smart-contracts/deploy/transaction.js +116 -0
  437. package/dist/src/smart-contracts/deploy/transaction.js.map +1 -0
  438. package/dist/src/smart-contracts/execute/index.d.ts +5 -0
  439. package/dist/src/smart-contracts/execute/index.d.ts.map +1 -0
  440. package/dist/src/smart-contracts/execute/index.js +5 -0
  441. package/dist/src/smart-contracts/execute/index.js.map +1 -0
  442. package/dist/src/smart-contracts/execute/transaction.d.ts +60 -0
  443. package/dist/src/smart-contracts/execute/transaction.d.ts.map +1 -0
  444. package/dist/src/smart-contracts/execute/transaction.js +88 -0
  445. package/dist/src/smart-contracts/execute/transaction.js.map +1 -0
  446. package/dist/src/smart-contracts/instantiate/index.d.ts +6 -0
  447. package/dist/src/smart-contracts/instantiate/index.d.ts.map +1 -0
  448. package/dist/src/smart-contracts/instantiate/index.js +6 -0
  449. package/dist/src/smart-contracts/instantiate/index.js.map +1 -0
  450. package/dist/src/smart-contracts/instantiate/transaction.d.ts +43 -0
  451. package/dist/src/smart-contracts/instantiate/transaction.d.ts.map +1 -0
  452. package/dist/src/smart-contracts/instantiate/transaction.js +72 -0
  453. package/dist/src/smart-contracts/instantiate/transaction.js.map +1 -0
  454. package/dist/src/smart-contracts/shared/base.d.ts +29 -0
  455. package/dist/src/smart-contracts/shared/base.d.ts.map +1 -0
  456. package/dist/src/smart-contracts/shared/base.js +70 -0
  457. package/dist/src/smart-contracts/shared/base.js.map +1 -0
  458. package/dist/src/smart-contracts/shared/parameters.d.ts +26 -0
  459. package/dist/src/smart-contracts/shared/parameters.d.ts.map +1 -0
  460. package/dist/src/smart-contracts/shared/parameters.js +32 -0
  461. package/dist/src/smart-contracts/shared/parameters.js.map +1 -0
  462. package/dist/src/smart-contracts/shared/validation.d.ts +6 -0
  463. package/dist/src/smart-contracts/shared/validation.d.ts.map +1 -0
  464. package/dist/src/smart-contracts/shared/validation.js +13 -0
  465. package/dist/src/smart-contracts/shared/validation.js.map +1 -0
  466. package/dist/src/smart-contracts/use-cases/bootstrapping/index.d.ts +25 -0
  467. package/dist/src/smart-contracts/use-cases/bootstrapping/index.d.ts.map +1 -0
  468. package/dist/src/smart-contracts/use-cases/bootstrapping/index.js +30 -0
  469. package/dist/src/smart-contracts/use-cases/bootstrapping/index.js.map +1 -0
  470. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.d.ts +7 -0
  471. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.d.ts.map +1 -0
  472. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.js +7 -0
  473. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/index.js.map +1 -0
  474. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.d.ts +23 -0
  475. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.d.ts.map +1 -0
  476. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.js +39 -0
  477. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/process-rewards.js.map +1 -0
  478. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.d.ts +27 -0
  479. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.d.ts.map +1 -0
  480. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.js +51 -0
  481. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/stake.js.map +1 -0
  482. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.d.ts +22 -0
  483. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.d.ts.map +1 -0
  484. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.js +43 -0
  485. package/dist/src/smart-contracts/use-cases/bootstrapping/transactions/update-wallet.js.map +1 -0
  486. package/dist/src/smart-contracts/use-cases/bootstrapping/types.d.ts +60 -0
  487. package/dist/src/smart-contracts/use-cases/bootstrapping/types.d.ts.map +1 -0
  488. package/dist/src/smart-contracts/use-cases/bootstrapping/types.js +8 -0
  489. package/dist/src/smart-contracts/use-cases/bootstrapping/types.js.map +1 -0
  490. package/dist/src/smart-contracts/use-cases/bootstrapping/utils.d.ts +131 -0
  491. package/dist/src/smart-contracts/use-cases/bootstrapping/utils.d.ts.map +1 -0
  492. package/dist/src/smart-contracts/use-cases/bootstrapping/utils.js +87 -0
  493. package/dist/src/smart-contracts/use-cases/bootstrapping/utils.js.map +1 -0
  494. package/dist/src/smart-contracts/use-cases/bridge/guardian/index.d.ts +49 -0
  495. package/dist/src/smart-contracts/use-cases/bridge/guardian/index.d.ts.map +1 -0
  496. package/dist/src/smart-contracts/use-cases/bridge/guardian/index.js +59 -0
  497. package/dist/src/smart-contracts/use-cases/bridge/guardian/index.js.map +1 -0
  498. package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.d.ts +150 -0
  499. package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.d.ts.map +1 -0
  500. package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js +505 -0
  501. package/dist/src/smart-contracts/use-cases/bridge/guardian/vaa.js.map +1 -0
  502. package/dist/src/smart-contracts/use-cases/bridge/index.d.ts +68 -0
  503. package/dist/src/smart-contracts/use-cases/bridge/index.d.ts.map +1 -0
  504. package/dist/src/smart-contracts/use-cases/bridge/index.js +83 -0
  505. package/dist/src/smart-contracts/use-cases/bridge/index.js.map +1 -0
  506. package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.d.ts +36 -0
  507. package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.d.ts.map +1 -0
  508. package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.js +53 -0
  509. package/dist/src/smart-contracts/use-cases/bridge/kalvora/index.js.map +1 -0
  510. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.d.ts +10 -0
  511. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.d.ts.map +1 -0
  512. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.js +17 -0
  513. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/index.js.map +1 -0
  514. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.d.ts +65 -0
  515. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.d.ts.map +1 -0
  516. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.js +130 -0
  517. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/lock.js.map +1 -0
  518. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.d.ts +81 -0
  519. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.d.ts.map +1 -0
  520. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js +187 -0
  521. package/dist/src/smart-contracts/use-cases/bridge/kalvora/transactions/release.js.map +1 -0
  522. package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.d.ts +82 -0
  523. package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.d.ts.map +1 -0
  524. package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.js +7 -0
  525. package/dist/src/smart-contracts/use-cases/bridge/kalvora/types.js.map +1 -0
  526. package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.d.ts +49 -0
  527. package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.d.ts.map +1 -0
  528. package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.js +80 -0
  529. package/dist/src/smart-contracts/use-cases/bridge/kalvora/utils.js.map +1 -0
  530. package/dist/src/smart-contracts/use-cases/bridge/solana/constants.d.ts +84 -0
  531. package/dist/src/smart-contracts/use-cases/bridge/solana/constants.d.ts.map +1 -0
  532. package/dist/src/smart-contracts/use-cases/bridge/solana/constants.js +82 -0
  533. package/dist/src/smart-contracts/use-cases/bridge/solana/constants.js.map +1 -0
  534. package/dist/src/smart-contracts/use-cases/bridge/solana/index.d.ts +58 -0
  535. package/dist/src/smart-contracts/use-cases/bridge/solana/index.d.ts.map +1 -0
  536. package/dist/src/smart-contracts/use-cases/bridge/solana/index.js +90 -0
  537. package/dist/src/smart-contracts/use-cases/bridge/solana/index.js.map +1 -0
  538. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.d.ts +26 -0
  539. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.d.ts.map +1 -0
  540. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.js +59 -0
  541. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/burn.js.map +1 -0
  542. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.d.ts +29 -0
  543. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.d.ts.map +1 -0
  544. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.js +50 -0
  545. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/helpers.js.map +1 -0
  546. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.d.ts +14 -0
  547. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.d.ts.map +1 -0
  548. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.js +31 -0
  549. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/index.js.map +1 -0
  550. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.d.ts +70 -0
  551. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.d.ts.map +1 -0
  552. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.js +212 -0
  553. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/lock.js.map +1 -0
  554. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.d.ts +60 -0
  555. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.d.ts.map +1 -0
  556. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.js +288 -0
  557. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/mint.js.map +1 -0
  558. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.d.ts +54 -0
  559. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.d.ts.map +1 -0
  560. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.js +186 -0
  561. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/registration.js.map +1 -0
  562. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.d.ts +96 -0
  563. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.d.ts.map +1 -0
  564. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.js +406 -0
  565. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/release.js.map +1 -0
  566. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.d.ts +34 -0
  567. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.d.ts.map +1 -0
  568. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.js +55 -0
  569. package/dist/src/smart-contracts/use-cases/bridge/solana/transactions/token-type.js.map +1 -0
  570. package/dist/src/smart-contracts/use-cases/bridge/solana/types.d.ts +377 -0
  571. package/dist/src/smart-contracts/use-cases/bridge/solana/types.d.ts.map +1 -0
  572. package/dist/src/smart-contracts/use-cases/bridge/solana/types.js +9 -0
  573. package/dist/src/smart-contracts/use-cases/bridge/solana/types.js.map +1 -0
  574. package/dist/src/smart-contracts/use-cases/bridge/solana/utils.d.ts +121 -0
  575. package/dist/src/smart-contracts/use-cases/bridge/solana/utils.d.ts.map +1 -0
  576. package/dist/src/smart-contracts/use-cases/bridge/solana/utils.js +219 -0
  577. package/dist/src/smart-contracts/use-cases/bridge/solana/utils.js.map +1 -0
  578. package/dist/src/smart-contracts/use-cases/dex/index.d.ts +58 -0
  579. package/dist/src/smart-contracts/use-cases/dex/index.d.ts.map +1 -0
  580. package/dist/src/smart-contracts/use-cases/dex/index.js +73 -0
  581. package/dist/src/smart-contracts/use-cases/dex/index.js.map +1 -0
  582. package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.d.ts +34 -0
  583. package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.d.ts.map +1 -0
  584. package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.js +68 -0
  585. package/dist/src/smart-contracts/use-cases/dex/transactions/add-liquidity.js.map +1 -0
  586. package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.d.ts +35 -0
  587. package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.d.ts.map +1 -0
  588. package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.js +69 -0
  589. package/dist/src/smart-contracts/use-cases/dex/transactions/create-pool.js.map +1 -0
  590. package/dist/src/smart-contracts/use-cases/dex/transactions/index.d.ts +11 -0
  591. package/dist/src/smart-contracts/use-cases/dex/transactions/index.d.ts.map +1 -0
  592. package/dist/src/smart-contracts/use-cases/dex/transactions/index.js +11 -0
  593. package/dist/src/smart-contracts/use-cases/dex/transactions/index.js.map +1 -0
  594. package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.d.ts +40 -0
  595. package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.d.ts.map +1 -0
  596. package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.js +76 -0
  597. package/dist/src/smart-contracts/use-cases/dex/transactions/remove-liquidity.js.map +1 -0
  598. package/dist/src/smart-contracts/use-cases/dex/transactions/swap.d.ts +38 -0
  599. package/dist/src/smart-contracts/use-cases/dex/transactions/swap.d.ts.map +1 -0
  600. package/dist/src/smart-contracts/use-cases/dex/transactions/swap.js +70 -0
  601. package/dist/src/smart-contracts/use-cases/dex/transactions/swap.js.map +1 -0
  602. package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.d.ts +37 -0
  603. package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.d.ts.map +1 -0
  604. package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.js +60 -0
  605. package/dist/src/smart-contracts/use-cases/dex/transactions/unlock-liquidity.js.map +1 -0
  606. package/dist/src/smart-contracts/use-cases/dex/types.d.ts +130 -0
  607. package/dist/src/smart-contracts/use-cases/dex/types.d.ts.map +1 -0
  608. package/dist/src/smart-contracts/use-cases/dex/types.js +11 -0
  609. package/dist/src/smart-contracts/use-cases/dex/types.js.map +1 -0
  610. package/dist/src/smart-contracts/use-cases/dex/utils.d.ts +52 -0
  611. package/dist/src/smart-contracts/use-cases/dex/utils.d.ts.map +1 -0
  612. package/dist/src/smart-contracts/use-cases/dex/utils.js +79 -0
  613. package/dist/src/smart-contracts/use-cases/dex/utils.js.map +1 -0
  614. package/dist/src/smart-contracts/use-cases/index.d.ts +35 -0
  615. package/dist/src/smart-contracts/use-cases/index.d.ts.map +1 -0
  616. package/dist/src/smart-contracts/use-cases/index.js +35 -0
  617. package/dist/src/smart-contracts/use-cases/index.js.map +1 -0
  618. package/dist/src/smart-contracts/use-cases/staking/index.d.ts +67 -0
  619. package/dist/src/smart-contracts/use-cases/staking/index.d.ts.map +1 -0
  620. package/dist/src/smart-contracts/use-cases/staking/index.js +84 -0
  621. package/dist/src/smart-contracts/use-cases/staking/index.js.map +1 -0
  622. package/dist/src/smart-contracts/use-cases/staking/transactions/index.d.ts +12 -0
  623. package/dist/src/smart-contracts/use-cases/staking/transactions/index.d.ts.map +1 -0
  624. package/dist/src/smart-contracts/use-cases/staking/transactions/index.js +12 -0
  625. package/dist/src/smart-contracts/use-cases/staking/transactions/index.js.map +1 -0
  626. package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.d.ts +36 -0
  627. package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.d.ts.map +1 -0
  628. package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.js +57 -0
  629. package/dist/src/smart-contracts/use-cases/staking/transactions/instant-stake.js.map +1 -0
  630. package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.d.ts +33 -0
  631. package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.d.ts.map +1 -0
  632. package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.js +49 -0
  633. package/dist/src/smart-contracts/use-cases/staking/transactions/release-instant.js.map +1 -0
  634. package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.d.ts +33 -0
  635. package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.d.ts.map +1 -0
  636. package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.js +49 -0
  637. package/dist/src/smart-contracts/use-cases/staking/transactions/release-liquid-stake.js.map +1 -0
  638. package/dist/src/smart-contracts/use-cases/staking/transactions/stake.d.ts +36 -0
  639. package/dist/src/smart-contracts/use-cases/staking/transactions/stake.d.ts.map +1 -0
  640. package/dist/src/smart-contracts/use-cases/staking/transactions/stake.js +59 -0
  641. package/dist/src/smart-contracts/use-cases/staking/transactions/stake.js.map +1 -0
  642. package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.d.ts +36 -0
  643. package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.d.ts.map +1 -0
  644. package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.js +57 -0
  645. package/dist/src/smart-contracts/use-cases/staking/transactions/update-instant-wallet.js.map +1 -0
  646. package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.d.ts +36 -0
  647. package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.d.ts.map +1 -0
  648. package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.js +57 -0
  649. package/dist/src/smart-contracts/use-cases/staking/transactions/update-wallet.js.map +1 -0
  650. package/dist/src/smart-contracts/use-cases/staking/types.d.ts +76 -0
  651. package/dist/src/smart-contracts/use-cases/staking/types.d.ts.map +1 -0
  652. package/dist/src/smart-contracts/use-cases/staking/types.js +10 -0
  653. package/dist/src/smart-contracts/use-cases/staking/types.js.map +1 -0
  654. package/dist/src/smart-contracts/use-cases/staking/utils.d.ts +27 -0
  655. package/dist/src/smart-contracts/use-cases/staking/utils.d.ts.map +1 -0
  656. package/dist/src/smart-contracts/use-cases/staking/utils.js +44 -0
  657. package/dist/src/smart-contracts/use-cases/staking/utils.js.map +1 -0
  658. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.d.ts +26 -0
  659. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.d.ts.map +1 -0
  660. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.js +107 -0
  661. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/index.js.map +1 -0
  662. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.d.ts +18 -0
  663. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.d.ts.map +1 -0
  664. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.js +37 -0
  665. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/resolve-indexer.js.map +1 -0
  666. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.d.ts +126 -0
  667. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.d.ts.map +1 -0
  668. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.js +10 -0
  669. package/dist/src/smart-contracts/use-cases/third-party/vision-dynamics/smart-swap/types.js.map +1 -0
  670. package/dist/src/types/index.d.ts +240 -0
  671. package/dist/src/types/index.d.ts.map +1 -0
  672. package/dist/src/types/index.js +110 -0
  673. package/dist/src/types/index.js.map +1 -0
  674. package/dist/src/validator-ops/index.d.ts +2 -0
  675. package/dist/src/validator-ops/index.d.ts.map +1 -0
  676. package/dist/src/validator-ops/index.js +2 -0
  677. package/dist/src/validator-ops/index.js.map +1 -0
  678. package/dist/src/validator-ops/transaction.d.ts +312 -0
  679. package/dist/src/validator-ops/transaction.d.ts.map +1 -0
  680. package/dist/src/validator-ops/transaction.js +416 -0
  681. package/dist/src/validator-ops/transaction.js.map +1 -0
  682. package/dist/src/vote/index.d.ts +5 -0
  683. package/dist/src/vote/index.d.ts.map +1 -0
  684. package/dist/src/vote/index.js +5 -0
  685. package/dist/src/vote/index.js.map +1 -0
  686. package/dist/src/vote/transaction.d.ts +70 -0
  687. package/dist/src/vote/transaction.d.ts.map +1 -0
  688. package/dist/src/vote/transaction.js +140 -0
  689. package/dist/src/vote/transaction.js.map +1 -0
  690. package/dist/src/wallet-creation/constants.d.ts +58 -0
  691. package/dist/src/wallet-creation/constants.d.ts.map +1 -0
  692. package/dist/src/wallet-creation/constants.js +113 -0
  693. package/dist/src/wallet-creation/constants.js.map +1 -0
  694. package/dist/src/wallet-creation/crypto-core.d.ts +178 -0
  695. package/dist/src/wallet-creation/crypto-core.d.ts.map +1 -0
  696. package/dist/src/wallet-creation/crypto-core.js +516 -0
  697. package/dist/src/wallet-creation/crypto-core.js.map +1 -0
  698. package/dist/src/wallet-creation/errors.d.ts +58 -0
  699. package/dist/src/wallet-creation/errors.d.ts.map +1 -0
  700. package/dist/src/wallet-creation/errors.js +89 -0
  701. package/dist/src/wallet-creation/errors.js.map +1 -0
  702. package/dist/src/wallet-creation/hash-utils.d.ts +38 -0
  703. package/dist/src/wallet-creation/hash-utils.d.ts.map +1 -0
  704. package/dist/src/wallet-creation/hash-utils.js +147 -0
  705. package/dist/src/wallet-creation/hash-utils.js.map +1 -0
  706. package/dist/src/wallet-creation/hd-utils.d.ts +45 -0
  707. package/dist/src/wallet-creation/hd-utils.d.ts.map +1 -0
  708. package/dist/src/wallet-creation/hd-utils.js +110 -0
  709. package/dist/src/wallet-creation/hd-utils.js.map +1 -0
  710. package/dist/src/wallet-creation/index.d.ts +11 -0
  711. package/dist/src/wallet-creation/index.d.ts.map +1 -0
  712. package/dist/src/wallet-creation/index.js +21 -0
  713. package/dist/src/wallet-creation/index.js.map +1 -0
  714. package/dist/src/wallet-creation/shared.d.ts +60 -0
  715. package/dist/src/wallet-creation/shared.d.ts.map +1 -0
  716. package/dist/src/wallet-creation/shared.js +127 -0
  717. package/dist/src/wallet-creation/shared.js.map +1 -0
  718. package/dist/src/wallet-creation/wallet-factory.d.ts +107 -0
  719. package/dist/src/wallet-creation/wallet-factory.d.ts.map +1 -0
  720. package/dist/src/wallet-creation/wallet-factory.js +298 -0
  721. package/dist/src/wallet-creation/wallet-factory.js.map +1 -0
  722. package/dist/wallet.d.ts +17 -0
  723. package/dist/wallet.d.ts.map +1 -0
  724. package/dist/wallet.js +17 -0
  725. package/dist/wallet.js.map +1 -0
  726. package/package.json +129 -0
@@ -0,0 +1,184 @@
1
+ /**
2
+ * Decoders and helpers for Kalvora query responses.
3
+ *
4
+ * Pure functions (no network access) that turn raw protobuf responses into
5
+ * convenient, typed values. They are used by {@link KalvoraQueryClient} and
6
+ * are exported for callers that fetch data through other channels (e.g. an
7
+ * indexer that stores raw blocks).
8
+ *
9
+ * @module query/decoders
10
+ */
11
+ import { TRANSACTION_TYPE, TXN_STATUS, type TXNStatusFees } from '../../proto/generated/txn_pb.js';
12
+ import type { Block } from '../../proto/generated/validator_pb.js';
13
+ /**
14
+ * Fixed-point scale used by the network for USD rates, currency equivalents,
15
+ * and fee percentages: `1_000_000_000_000_000_000` (1e18) represents
16
+ * `$1.00` (or 100 %).
17
+ */
18
+ export declare const USD_SCALE: bigint;
19
+ /**
20
+ * Parse a non-negative integer string returned by the node into a `bigint`.
21
+ * Empty strings (proto3 defaults) parse as `0n`.
22
+ *
23
+ * @throws Error if the value is not an unsigned integer string
24
+ */
25
+ export declare function parseUintString(value: string, field?: string): bigint;
26
+ /**
27
+ * Format a 1e18-scaled integer as a decimal string without floating point.
28
+ *
29
+ * @param scaled - Scaled value (e.g. a `rate` or `currencyEquivalent`)
30
+ * @param maxFractionDigits - Digits kept after the decimal point (default 18,
31
+ * truncated); trailing zeros are removed.
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * formatScaled(1_500_000_000_000_000_000n); // '1.5'
36
+ * ```
37
+ */
38
+ export declare function formatScaled(scaled: bigint, maxFractionDigits?: number): string;
39
+ /**
40
+ * Convert a token amount in smallest units into whole units as a decimal
41
+ * string, using the token's `denomination` (parts per whole token).
42
+ *
43
+ * Works for any positive denomination (not only powers of ten); results that
44
+ * do not terminate are truncated to `maxFractionDigits` (default 18).
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * partsToWhole(1_500_000_000n, 1_000_000_000n); // '1.5'
49
+ * partsToWhole(1n, 4n); // '0.25'
50
+ * ```
51
+ */
52
+ export declare function partsToWhole(parts: bigint, denomination: bigint, maxFractionDigits?: number): string;
53
+ /** Decoded `CONTRACT_SUPPLY` database record. */
54
+ export interface ContractSupply {
55
+ /** Maximum supply in smallest units (`0n` when the contract is uncapped). */
56
+ maxSupply: bigint;
57
+ /** Current (minted, not burned) supply in smallest units. */
58
+ currentSupply: bigint;
59
+ }
60
+ /**
61
+ * Decode the `CONTRACT_SUPPLY` database record.
62
+ *
63
+ * The validator stores this record as an internal protobuf message whose
64
+ * schema is not part of the public protos: field 1 is the max supply and
65
+ * field 2 the current supply, both as decimal strings. Field meaning was
66
+ * confirmed against the live network (field 1 equals the contract's
67
+ * `max_supply`).
68
+ *
69
+ * @param value - The raw `DatabaseResponse.value` string (binary protobuf
70
+ * transported as a latin-1 string)
71
+ * @throws Error if the record is malformed
72
+ */
73
+ export declare function decodeContractSupply(value: string): ContractSupply;
74
+ /**
75
+ * Mapping of every `TXNS` list field to the transaction type it contains.
76
+ * Result-only lists (`txnFeesAndStatus`, `tokenFees`, …) are excluded.
77
+ */
78
+ declare const TXNS_LIST_TYPES: {
79
+ readonly coinTxns: TRANSACTION_TYPE.COIN_TYPE;
80
+ readonly mintTxns: TRANSACTION_TYPE.MINT_TYPE;
81
+ readonly itemMintTxns: TRANSACTION_TYPE.ITEM_MINT_TYPE;
82
+ readonly contractTxns: TRANSACTION_TYPE.CONTRACT_TXN_TYPE;
83
+ readonly governanceVotes: TRANSACTION_TYPE.VOTE_TYPE;
84
+ readonly governanceProposals: TRANSACTION_TYPE.PROPOSAL_TYPE;
85
+ readonly smartContracts: TRANSACTION_TYPE.SMART_CONTRACT_TYPE;
86
+ readonly smartContractExecutes: TRANSACTION_TYPE.SMART_CONTRACT_EXECUTE_TYPE;
87
+ readonly expenseRatios: TRANSACTION_TYPE.EXPENSE_RATIO_TYPE;
88
+ readonly nftTxns: TRANSACTION_TYPE.NFT_TYPE;
89
+ readonly contractUpdateTxns: TRANSACTION_TYPE.UPDATE_CONTRACT_TYPE;
90
+ readonly validatorRegistrationTxns: TRANSACTION_TYPE.VALIDATOR_REGISTRATION_TYPE;
91
+ readonly validatorHeartbeatTxns: TRANSACTION_TYPE.VALIDATOR_HEARTBEAT_TYPE;
92
+ readonly proposalResultTxns: TRANSACTION_TYPE.PROPOSAL_RESULT_TYPE;
93
+ readonly delegatedVotingTxns: TRANSACTION_TYPE.DELEGATED_VOTING_TYPE;
94
+ readonly quashTxns: TRANSACTION_TYPE.QUASH_TYPE;
95
+ readonly revokeTxns: TRANSACTION_TYPE.REVOKE_TYPE;
96
+ readonly complianceTxns: TRANSACTION_TYPE.COMPLIANCE_TYPE;
97
+ readonly burnSbtTxns: TRANSACTION_TYPE.SBT_BURN_TYPE;
98
+ readonly smartContractInstantiateTxns: TRANSACTION_TYPE.SMART_CONTRACT_INSTANTIATE_TYPE;
99
+ readonly allowanceTxns: TRANSACTION_TYPE.ALLOWANCE_TYPE;
100
+ readonly proposalCancelTxns: TRANSACTION_TYPE.PROPOSAL_CANCEL_TYPE;
101
+ };
102
+ /** A transaction extracted from a block, with its type and (hex) hash. */
103
+ export interface BlockTransaction {
104
+ /** Transaction type. */
105
+ type: TRANSACTION_TYPE;
106
+ /** Name of the `TXNS` field the transaction came from, e.g. `coinTxns`. */
107
+ list: keyof typeof TXNS_LIST_TYPES | 'requiredVersionTxn';
108
+ /** Lower-case hex transaction hash (`''` if the transaction has no base hash). */
109
+ hash: string;
110
+ /** The decoded protobuf transaction message. */
111
+ txn: {
112
+ $typeName: string;
113
+ base?: {
114
+ hash?: Uint8Array;
115
+ };
116
+ };
117
+ }
118
+ /**
119
+ * Flatten every transaction in a block's `TXNS` container into a single list.
120
+ *
121
+ * Ordering follows the `TXNS` field order, then in-list order.
122
+ */
123
+ export declare function listBlockTransactions(block: Block): BlockTransaction[];
124
+ /** Processing result for one transaction, from `TXNS.txn_fees_and_status`. */
125
+ export interface TransactionResult {
126
+ /** Lower-case hex transaction hash. */
127
+ hash: string;
128
+ /** Network status code. `TXN_STATUS.OK` means the transaction succeeded. */
129
+ status: TXN_STATUS;
130
+ /** Upper-snake status name, e.g. `OK` or `INSUFFICIENT_AMOUNT`. */
131
+ statusName: string;
132
+ /** `true` when `status === TXN_STATUS.OK`. */
133
+ success: boolean;
134
+ /** Base fee charged, in smallest units of `baseFeeContractId`. */
135
+ baseFees: bigint;
136
+ /** Instrument the base fee was paid in. */
137
+ baseFeeContractId: string;
138
+ /** Contract fee charged (smallest units), when applicable. */
139
+ contractFees?: bigint;
140
+ /** Instrument the contract fee was paid in, when applicable. */
141
+ contractFeeContractId?: string;
142
+ /** Gas consumed by smart contract execution, when applicable. */
143
+ gas?: bigint;
144
+ /**
145
+ * Network-assigned proposal identifier (`TXNStatusFees.proposal_identifier`),
146
+ * set on governance-proposal results by nodes running the kal_* protocol.
147
+ */
148
+ proposalIdentifier?: bigint;
149
+ /** The raw protobuf record, for fields not surfaced above. */
150
+ raw: TXNStatusFees;
151
+ }
152
+ /** Convert a raw `TXNStatusFees` record into a {@link TransactionResult}. */
153
+ export declare function toTransactionResult(raw: TXNStatusFees): TransactionResult;
154
+ /**
155
+ * Find the processing result of a transaction inside a block.
156
+ *
157
+ * @param block - Block to search
158
+ * @param txnHash - Hex transaction hash (optionally `0x`-prefixed, any case)
159
+ * @returns The result, or `undefined` if the block does not contain it
160
+ */
161
+ export declare function findTransactionResult(block: Block, txnHash: string): TransactionResult | undefined;
162
+ /** Compact, JSON-friendly summary of a block header and contents. */
163
+ export interface BlockSummary {
164
+ /** Block height. */
165
+ height: bigint;
166
+ /** Lower-case hex block hash. */
167
+ hash: string;
168
+ /** Lower-case hex hash of the previous block (`''` for genesis). */
169
+ previousHash: string;
170
+ /** Block timestamp. */
171
+ timestamp: Date | undefined;
172
+ /** Protocol version the block was produced with. */
173
+ version: bigint | undefined;
174
+ /** Number of user/system transactions (excludes result records). */
175
+ transactionCount: number;
176
+ /** Transaction count per type name, e.g. `{ COIN_TYPE: 3 }`. */
177
+ transactionsByType: Record<string, number>;
178
+ /** Per-transaction processing results. */
179
+ results: TransactionResult[];
180
+ }
181
+ /** Summarise a block into plain values (hex hashes, `Date`, counts). */
182
+ export declare function summarizeBlock(block: Block): BlockSummary;
183
+ export {};
184
+ //# sourceMappingURL=decoders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decoders.d.ts","sourceRoot":"","sources":["../../../src/query/decoders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,gBAAgB,EAChB,UAAU,EAEV,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK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,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,YAAY,CAmBzD"}
@@ -0,0 +1,257 @@
1
+ /**
2
+ * Decoders and helpers for Kalvora query responses.
3
+ *
4
+ * Pure functions (no network access) that turn raw protobuf responses into
5
+ * convenient, typed values. They are used by {@link KalvoraQueryClient} and
6
+ * are exported for callers that fetch data through other channels (e.g. an
7
+ * indexer that stores raw blocks).
8
+ *
9
+ * @module query/decoders
10
+ */
11
+ import { TRANSACTION_TYPE, TXN_STATUS } from '../../proto/generated/txn_pb.js';
12
+ import { bytesToHex } from '../shared/utils/byte-utils.js';
13
+ // ============================================================================
14
+ // SCALED VALUES
15
+ // ============================================================================
16
+ /**
17
+ * Fixed-point scale used by the network for USD rates, currency equivalents,
18
+ * and fee percentages: `1_000_000_000_000_000_000` (1e18) represents
19
+ * `$1.00` (or 100 %).
20
+ */
21
+ export const USD_SCALE = 10n ** 18n;
22
+ /**
23
+ * Parse a non-negative integer string returned by the node into a `bigint`.
24
+ * Empty strings (proto3 defaults) parse as `0n`.
25
+ *
26
+ * @throws Error if the value is not an unsigned integer string
27
+ */
28
+ export function parseUintString(value, field = 'value') {
29
+ const trimmed = value.trim();
30
+ if (trimmed === '')
31
+ return 0n;
32
+ if (!/^\d+$/u.test(trimmed)) {
33
+ throw new Error(`${field} is not an unsigned integer: ${JSON.stringify(value)}`);
34
+ }
35
+ return BigInt(trimmed);
36
+ }
37
+ /**
38
+ * Divide `numerator` by a positive `denominator` and render the exact quotient
39
+ * as a decimal string, truncated (not rounded) to `maxFractionDigits`, with
40
+ * trailing zeros removed and no negative zero.
41
+ */
42
+ function formatQuotient(numerator, denominator, maxFractionDigits) {
43
+ if (denominator <= 0n)
44
+ throw new Error('denominator must be positive');
45
+ if (!Number.isInteger(maxFractionDigits) || maxFractionDigits < 0) {
46
+ throw new Error('maxFractionDigits must be a non-negative integer');
47
+ }
48
+ const negative = numerator < 0n;
49
+ const abs = negative ? -numerator : numerator;
50
+ const whole = abs / denominator;
51
+ let remainder = abs % denominator;
52
+ let fraction = '';
53
+ for (let i = 0; i < maxFractionDigits && remainder !== 0n; i++) {
54
+ remainder *= 10n;
55
+ fraction += (remainder / denominator).toString();
56
+ remainder %= denominator;
57
+ }
58
+ fraction = fraction.replace(/0+$/u, '');
59
+ const isZero = whole === 0n && fraction === '';
60
+ return `${negative && !isZero ? '-' : ''}${whole}${fraction ? `.${fraction}` : ''}`;
61
+ }
62
+ /**
63
+ * Format a 1e18-scaled integer as a decimal string without floating point.
64
+ *
65
+ * @param scaled - Scaled value (e.g. a `rate` or `currencyEquivalent`)
66
+ * @param maxFractionDigits - Digits kept after the decimal point (default 18,
67
+ * truncated); trailing zeros are removed.
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * formatScaled(1_500_000_000_000_000_000n); // '1.5'
72
+ * ```
73
+ */
74
+ export function formatScaled(scaled, maxFractionDigits = 18) {
75
+ return formatQuotient(scaled, USD_SCALE, maxFractionDigits);
76
+ }
77
+ /**
78
+ * Convert a token amount in smallest units into whole units as a decimal
79
+ * string, using the token's `denomination` (parts per whole token).
80
+ *
81
+ * Works for any positive denomination (not only powers of ten); results that
82
+ * do not terminate are truncated to `maxFractionDigits` (default 18).
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * partsToWhole(1_500_000_000n, 1_000_000_000n); // '1.5'
87
+ * partsToWhole(1n, 4n); // '0.25'
88
+ * ```
89
+ */
90
+ export function partsToWhole(parts, denomination, maxFractionDigits = 18) {
91
+ if (denomination <= 0n)
92
+ throw new Error('denomination must be positive');
93
+ return formatQuotient(parts, denomination, maxFractionDigits);
94
+ }
95
+ function readVarint(bytes, offset) {
96
+ let value = 0;
97
+ let shift = 0;
98
+ let cursor = offset;
99
+ for (;;) {
100
+ if (cursor >= bytes.length)
101
+ throw new Error('truncated varint');
102
+ const byte = bytes[cursor];
103
+ cursor += 1;
104
+ value += (byte & 0x7f) * 2 ** shift;
105
+ if ((byte & 0x80) === 0)
106
+ return { value, next: cursor };
107
+ shift += 7;
108
+ if (shift > 49)
109
+ throw new Error('varint too long');
110
+ }
111
+ }
112
+ /**
113
+ * Decode the `CONTRACT_SUPPLY` database record.
114
+ *
115
+ * The validator stores this record as an internal protobuf message whose
116
+ * schema is not part of the public protos: field 1 is the max supply and
117
+ * field 2 the current supply, both as decimal strings. Field meaning was
118
+ * confirmed against the live network (field 1 equals the contract's
119
+ * `max_supply`).
120
+ *
121
+ * @param value - The raw `DatabaseResponse.value` string (binary protobuf
122
+ * transported as a latin-1 string)
123
+ * @throws Error if the record is malformed
124
+ */
125
+ export function decodeContractSupply(value) {
126
+ const bytes = Uint8Array.from(value, ch => {
127
+ const code = ch.charCodeAt(0);
128
+ if (code > 0xff)
129
+ throw new Error('contract supply record is not binary protobuf');
130
+ return code;
131
+ });
132
+ const decoder = new TextDecoder();
133
+ const fields = new Map();
134
+ let offset = 0;
135
+ while (offset < bytes.length) {
136
+ const tag = readVarint(bytes, offset);
137
+ const fieldNumber = Math.floor(tag.value / 8);
138
+ const wireType = tag.value % 8;
139
+ if (wireType !== 2)
140
+ throw new Error(`unexpected wire type ${wireType} in contract supply record`);
141
+ const length = readVarint(bytes, tag.next);
142
+ const end = length.next + length.value;
143
+ if (end > bytes.length)
144
+ throw new Error('truncated contract supply record');
145
+ fields.set(fieldNumber, decoder.decode(bytes.subarray(length.next, end)));
146
+ offset = end;
147
+ }
148
+ return {
149
+ maxSupply: parseUintString(fields.get(1) ?? '', 'maxSupply'),
150
+ currentSupply: parseUintString(fields.get(2) ?? '', 'currentSupply')
151
+ };
152
+ }
153
+ // ============================================================================
154
+ // BLOCKS
155
+ // ============================================================================
156
+ /**
157
+ * Mapping of every `TXNS` list field to the transaction type it contains.
158
+ * Result-only lists (`txnFeesAndStatus`, `tokenFees`, …) are excluded.
159
+ */
160
+ const TXNS_LIST_TYPES = {
161
+ coinTxns: TRANSACTION_TYPE.COIN_TYPE,
162
+ mintTxns: TRANSACTION_TYPE.MINT_TYPE,
163
+ itemMintTxns: TRANSACTION_TYPE.ITEM_MINT_TYPE,
164
+ contractTxns: TRANSACTION_TYPE.CONTRACT_TXN_TYPE,
165
+ governanceVotes: TRANSACTION_TYPE.VOTE_TYPE,
166
+ governanceProposals: TRANSACTION_TYPE.PROPOSAL_TYPE,
167
+ smartContracts: TRANSACTION_TYPE.SMART_CONTRACT_TYPE,
168
+ smartContractExecutes: TRANSACTION_TYPE.SMART_CONTRACT_EXECUTE_TYPE,
169
+ expenseRatios: TRANSACTION_TYPE.EXPENSE_RATIO_TYPE,
170
+ nftTxns: TRANSACTION_TYPE.NFT_TYPE,
171
+ contractUpdateTxns: TRANSACTION_TYPE.UPDATE_CONTRACT_TYPE,
172
+ validatorRegistrationTxns: TRANSACTION_TYPE.VALIDATOR_REGISTRATION_TYPE,
173
+ validatorHeartbeatTxns: TRANSACTION_TYPE.VALIDATOR_HEARTBEAT_TYPE,
174
+ proposalResultTxns: TRANSACTION_TYPE.PROPOSAL_RESULT_TYPE,
175
+ delegatedVotingTxns: TRANSACTION_TYPE.DELEGATED_VOTING_TYPE,
176
+ quashTxns: TRANSACTION_TYPE.QUASH_TYPE,
177
+ revokeTxns: TRANSACTION_TYPE.REVOKE_TYPE,
178
+ complianceTxns: TRANSACTION_TYPE.COMPLIANCE_TYPE,
179
+ burnSbtTxns: TRANSACTION_TYPE.SBT_BURN_TYPE,
180
+ smartContractInstantiateTxns: TRANSACTION_TYPE.SMART_CONTRACT_INSTANTIATE_TYPE,
181
+ allowanceTxns: TRANSACTION_TYPE.ALLOWANCE_TYPE,
182
+ proposalCancelTxns: TRANSACTION_TYPE.PROPOSAL_CANCEL_TYPE
183
+ };
184
+ /**
185
+ * Flatten every transaction in a block's `TXNS` container into a single list.
186
+ *
187
+ * Ordering follows the `TXNS` field order, then in-list order.
188
+ */
189
+ export function listBlockTransactions(block) {
190
+ const txns = block.transactions;
191
+ if (!txns)
192
+ return [];
193
+ const result = [];
194
+ const push = (type, list, txn) => {
195
+ const hashBytes = txn.base?.hash;
196
+ result.push({ type, list, hash: hashBytes ? bytesToHex(hashBytes) : '', txn });
197
+ };
198
+ for (const [list, type] of Object.entries(TXNS_LIST_TYPES)) {
199
+ for (const txn of txns[list])
200
+ push(type, list, txn);
201
+ }
202
+ // The only singular transaction field in TXNS.
203
+ if (txns.requiredVersionTxn) {
204
+ push(TRANSACTION_TYPE.REQUIRED_VERSION, 'requiredVersionTxn', txns.requiredVersionTxn);
205
+ }
206
+ return result;
207
+ }
208
+ /** Convert a raw `TXNStatusFees` record into a {@link TransactionResult}. */
209
+ export function toTransactionResult(raw) {
210
+ return {
211
+ hash: bytesToHex(raw.txnHash),
212
+ status: raw.status,
213
+ statusName: TXN_STATUS[raw.status] ?? `UNKNOWN_${raw.status}`,
214
+ success: raw.status === TXN_STATUS.OK,
215
+ baseFees: parseUintString(raw.baseFees, 'baseFees'),
216
+ baseFeeContractId: raw.baseContractId,
217
+ ...(raw.contractFees !== undefined ? { contractFees: parseUintString(raw.contractFees, 'contractFees') } : {}),
218
+ ...(raw.contractContractId !== undefined ? { contractFeeContractId: raw.contractContractId } : {}),
219
+ ...(raw.gas !== undefined ? { gas: raw.gas } : {}),
220
+ ...(raw.proposalIdentifier !== undefined ? { proposalIdentifier: raw.proposalIdentifier } : {}),
221
+ raw
222
+ };
223
+ }
224
+ /**
225
+ * Find the processing result of a transaction inside a block.
226
+ *
227
+ * @param block - Block to search
228
+ * @param txnHash - Hex transaction hash (optionally `0x`-prefixed, any case)
229
+ * @returns The result, or `undefined` if the block does not contain it
230
+ */
231
+ export function findTransactionResult(block, txnHash) {
232
+ const wanted = txnHash.toLowerCase().replace(/^0x/u, '');
233
+ const raw = block.transactions?.txnFeesAndStatus.find(entry => bytesToHex(entry.txnHash) === wanted);
234
+ return raw ? toTransactionResult(raw) : undefined;
235
+ }
236
+ /** Summarise a block into plain values (hex hashes, `Date`, counts). */
237
+ export function summarizeBlock(block) {
238
+ const header = block.blockHeader;
239
+ const transactions = listBlockTransactions(block);
240
+ const transactionsByType = {};
241
+ for (const { type } of transactions) {
242
+ const name = TRANSACTION_TYPE[type] ?? `TYPE_${type}`;
243
+ transactionsByType[name] = (transactionsByType[name] ?? 0) + 1;
244
+ }
245
+ const ts = header?.timestamp;
246
+ return {
247
+ height: header?.blockHeight ?? 0n,
248
+ hash: header?.hash ? bytesToHex(header.hash) : '',
249
+ previousHash: header?.previousBlockHash ? bytesToHex(header.previousBlockHash) : '',
250
+ timestamp: ts ? new Date(Number(ts.seconds) * 1000 + Math.floor(ts.nanos / 1000000)) : undefined,
251
+ version: header?.version,
252
+ transactionCount: transactions.length,
253
+ transactionsByType,
254
+ results: (block.transactions?.txnFeesAndStatus ?? []).map(toTransactionResult)
255
+ };
256
+ }
257
+ //# sourceMappingURL=decoders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decoders.js","sourceRoot":"","sources":["../../../src/query/decoders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,gBAAgB,EAChB,UAAU,EAGX,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,IAAI,GAAG,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,KAAK,GAAG,OAAO;IAC5D,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AA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GAA2B,EAAE,CAAC;IACtD,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,YAAY,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,QAAQ,IAAI,EAAE,CAAC;QACtD,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACjE,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,EAAE,SAAS,CAAC;IAC7B,OAAO;QACL,MAAM,EAAE,MAAM,EAAE,WAAW,IAAI,EAAE;QACjC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;QACjD,YAAY,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,EAAE;QACnF,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,OAAS,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QAClG,OAAO,EAAE,MAAM,EAAE,OAAO;QACxB,gBAAgB,EAAE,YAAY,CAAC,MAAM;QACrC,kBAAkB;QAClB,OAAO,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,mBAAmB,CAAC;KAC/E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Guardian Query Client — read RPCs of the bridge guardian's `GuardianService`.
3
+ *
4
+ * Guardians attest cross-chain bridge activity between Kalvora and Solana.
5
+ * This client exposes the public, read-only guardian RPCs:
6
+ *
7
+ * | Method | RPC | Purpose |
8
+ * |-------------------------|-----------------|---------------------------------------------|
9
+ * | {@link getPayload} | `GetPayload` | Signed bridge payload (VAA) for one txn |
10
+ * | {@link searchPayloads} | `SearchPayload` | All payloads since a time |
11
+ * | {@link getPriceData} | `GetPriceData` | Guardian-cached token price / liquidity |
12
+ * | {@link getMintInfo} | `GetMintInfo` | Kalvora contract ID → Solana mint address |
13
+ *
14
+ * `AuthenticateGuardian` is guardian-to-guardian and is not wrapped.
15
+ * Higher-level VAA helpers (retrying fetch, submission to Solana/Kalvora)
16
+ * live in the bridge module (`guardianBridge`).
17
+ *
18
+ * @module query/guardian-client
19
+ */
20
+ import type { Client } from '@connectrpc/connect';
21
+ import { GuardianService, NETWORK_TYPE, type PayloadResponse, type PriceData, type SearchPayloadResponse } from '../../proto/generated/guardian_pb.js';
22
+ import type { GRPCConfig } from '../types/index.js';
23
+ /** Price data cached by a guardian. USD values use the guardian's `USD_MULTIPLIER` scale. */
24
+ export interface GuardianPriceData {
25
+ /** `true` when the guardian holds a cached price for the mint. */
26
+ hasPrice: boolean;
27
+ /** The cached price record (present when `hasPrice`). */
28
+ priceData: PriceData | undefined;
29
+ /** Responding guardian's Kalvora public key. */
30
+ guardianKey: string;
31
+ }
32
+ /**
33
+ * Typed client for the bridge guardian's `GuardianService`.
34
+ * Construct with {@link createGuardianQueryClient}.
35
+ */
36
+ export declare class GuardianQueryClient {
37
+ /** Raw generated ConnectRPC client (errors normalised to `KalvoraRpcError`). */
38
+ readonly raw: Client<typeof GuardianService>;
39
+ /** @param config - Guardian endpoint / transport configuration */
40
+ constructor(config?: GRPCConfig);
41
+ /**
42
+ * Fetch the guardian-signed payload for one bridge transaction.
43
+ *
44
+ * @param payloadId - Kalvora transaction hash (hex) or Solana transaction signature
45
+ * @param network - Chain the source transaction happened on
46
+ * (`NETWORK_TYPE_KALVORA` or `NETWORK_TYPE.SOLANA`)
47
+ */
48
+ getPayload(payloadId: string, network: NETWORK_TYPE): Promise<PayloadResponse>;
49
+ /** All payloads (both directions) produced since `since`. */
50
+ searchPayloads(since: Date): Promise<SearchPayloadResponse>;
51
+ /**
52
+ * Guardian-cached price data for a Solana mint.
53
+ *
54
+ * @param mintAddress - Solana token mint address
55
+ * @param txnHash - Optional bridge transaction signature for context
56
+ */
57
+ getPriceData(mintAddress: string, txnHash?: string): Promise<GuardianPriceData>;
58
+ /**
59
+ * Resolve Kalvora contract IDs to their Solana mint addresses.
60
+ *
61
+ * @returns Map of contract ID → Solana mint address (unknown IDs are omitted)
62
+ */
63
+ getMintInfo(contractIds: string[]): Promise<Map<string, string>>;
64
+ }
65
+ /**
66
+ * Create a {@link GuardianQueryClient}.
67
+ *
68
+ * @param config - Guardian endpoint / transport configuration
69
+ */
70
+ export declare function createGuardianQueryClient(config?: GRPCConfig): GuardianQueryClient;
71
+ export { NETWORK_TYPE };
72
+ export { NETWORK_TYPE_KALVORA } from '../protocol/guardian-names.js';
73
+ //# sourceMappingURL=guardian-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardian-client.d.ts","sourceRoot":"","sources":["../../../src/query/guardian-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAEL,eAAe,EACf,YAAY,EAIZ,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAC;AAG9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,6FAA6F;AAC7F,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,QAAQ,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,gFAAgF;IAChF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;IAE7C,kEAAkE;gBACtD,MAAM,GAAE,UAAe;IAInC;;;;;;OAMG;IACG,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC;IAOpF,6DAA6D;IACvD,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMjE;;;;;OAKG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,SAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;IASjF;;;;OAIG;IACG,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAOvE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,UAAe,GAAG,mBAAmB,CAEtF;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Guardian Query Client — read RPCs of the bridge guardian's `GuardianService`.
3
+ *
4
+ * Guardians attest cross-chain bridge activity between Kalvora and Solana.
5
+ * This client exposes the public, read-only guardian RPCs:
6
+ *
7
+ * | Method | RPC | Purpose |
8
+ * |-------------------------|-----------------|---------------------------------------------|
9
+ * | {@link getPayload} | `GetPayload` | Signed bridge payload (VAA) for one txn |
10
+ * | {@link searchPayloads} | `SearchPayload` | All payloads since a time |
11
+ * | {@link getPriceData} | `GetPriceData` | Guardian-cached token price / liquidity |
12
+ * | {@link getMintInfo} | `GetMintInfo` | Kalvora contract ID → Solana mint address |
13
+ *
14
+ * `AuthenticateGuardian` is guardian-to-guardian and is not wrapped.
15
+ * Higher-level VAA helpers (retrying fetch, submission to Solana/Kalvora)
16
+ * live in the bridge module (`guardianBridge`).
17
+ *
18
+ * @module query/guardian-client
19
+ */
20
+ import { create } from '@bufbuild/protobuf';
21
+ import { TimestampSchema } from '../../proto/generated/google/protobuf/timestamp_pb.js';
22
+ import { GetMintInfoRequestSchema, GuardianService, NETWORK_TYPE, PayloadRequestSchema, PriceDataRequestSchema, SearchPayloadRequestSchema } from '../../proto/generated/guardian_pb.js';
23
+ import { createClient } from '../grpc/client-factory.js';
24
+ import { toTimestampInit } from '../shared/tx/standard.js';
25
+ /**
26
+ * Typed client for the bridge guardian's `GuardianService`.
27
+ * Construct with {@link createGuardianQueryClient}.
28
+ */
29
+ export class GuardianQueryClient {
30
+ /** @param config - Guardian endpoint / transport configuration */
31
+ constructor(config = {}) {
32
+ this.raw = createClient(GuardianService, config);
33
+ }
34
+ /**
35
+ * Fetch the guardian-signed payload for one bridge transaction.
36
+ *
37
+ * @param payloadId - Kalvora transaction hash (hex) or Solana transaction signature
38
+ * @param network - Chain the source transaction happened on
39
+ * (`NETWORK_TYPE_KALVORA` or `NETWORK_TYPE.SOLANA`)
40
+ */
41
+ async getPayload(payloadId, network) {
42
+ if (typeof payloadId !== 'string' || payloadId.trim() === '') {
43
+ throw new Error('payloadId must be a non-empty string');
44
+ }
45
+ return this.raw.getPayload(create(PayloadRequestSchema, { payloadId, networkType: network }));
46
+ }
47
+ /** All payloads (both directions) produced since `since`. */
48
+ async searchPayloads(since) {
49
+ return this.raw.searchPayload(create(SearchPayloadRequestSchema, {
50
+ searchStartTime: create(TimestampSchema, toTimestampInit(since, 'since'))
51
+ }));
52
+ }
53
+ /**
54
+ * Guardian-cached price data for a Solana mint.
55
+ *
56
+ * @param mintAddress - Solana token mint address
57
+ * @param txnHash - Optional bridge transaction signature for context
58
+ */
59
+ async getPriceData(mintAddress, txnHash = '') {
60
+ if (typeof mintAddress !== 'string' || mintAddress.trim() === '') {
61
+ throw new Error('mintAddress must be a non-empty string');
62
+ }
63
+ const response = await this.raw.getPriceData(create(PriceDataRequestSchema, { mintAddress, txnHash }));
64
+ // `zeraKey` is the generated name of the guardian proto's key field.
65
+ return { hasPrice: response.hasPrice, priceData: response.priceData, guardianKey: response.zeraKey };
66
+ }
67
+ /**
68
+ * Resolve Kalvora contract IDs to their Solana mint addresses.
69
+ *
70
+ * @returns Map of contract ID → Solana mint address (unknown IDs are omitted)
71
+ */
72
+ async getMintInfo(contractIds) {
73
+ if (!Array.isArray(contractIds) || contractIds.length === 0) {
74
+ throw new Error('contractIds must be a non-empty array');
75
+ }
76
+ const response = await this.raw.getMintInfo(create(GetMintInfoRequestSchema, { contractIds }));
77
+ return new Map(response.mintInfos.map(info => [info.contractId, info.mintAddress]));
78
+ }
79
+ }
80
+ /**
81
+ * Create a {@link GuardianQueryClient}.
82
+ *
83
+ * @param config - Guardian endpoint / transport configuration
84
+ */
85
+ export function createGuardianQueryClient(config = {}) {
86
+ return new GuardianQueryClient(config);
87
+ }
88
+ export { NETWORK_TYPE };
89
+ export { NETWORK_TYPE_KALVORA } from '../protocol/guardian-names.js';
90
+ //# sourceMappingURL=guardian-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guardian-client.js","sourceRoot":"","sources":["../../../src/query/guardian-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AACxF,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAI3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAa3D;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAI9B,kEAAkE;IAClE,YAAY,SAAqB,EAAE;QACjC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED;;;;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AAC,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,wBAAwB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QAC/F,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,SAAqB,EAAE;IAC/D,OAAO,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Query Module — typed, read-only access to Kalvora network state.
3
+ *
4
+ * - {@link KalvoraQueryClient}: `APIService` (wallets, contracts, fees,
5
+ * blocks, governance ledger, smart contract events, raw database).
6
+ * - {@link ValidatorQueryClient}: read-only `ValidatorService` subset.
7
+ * - {@link GuardianQueryClient}: bridge guardian payloads, prices, mint info.
8
+ * - Pure decoders for blocks, transaction results, and scaled values.
9
+ *
10
+ * @module query
11
+ */
12
+ export { KalvoraQueryClient, createQueryClient, CONFIRMATION_LEVEL, DATABASE_TYPE, PROPOSAL_TYPE, PROPOSAL_PHASE, PRE_GOVERNANCE_OUTCOME, type AuthorizedFeeToken, type BaseFeeInfo, type BlockSelector, type ConfirmedTransaction, type ContractFeeInfo, type ContractInfo, type ProposalLedgerView, type ProposalStatusView, type SmartContractEvent, type TokenBalance, type TokenFeeInfo, type WaitForTransactionOptions, type WalletItem } from './api-client.js';
13
+ export { ValidatorQueryClient, createValidatorQueryClient, type CheckpointInfo } from './validator-client.js';
14
+ export { GuardianQueryClient, createGuardianQueryClient, NETWORK_TYPE, NETWORK_TYPE_KALVORA, type GuardianPriceData } from './guardian-client.js';
15
+ export { USD_SCALE, decodeContractSupply, findTransactionResult, formatScaled, listBlockTransactions, parseUintString, partsToWhole, summarizeBlock, toTransactionResult, type BlockSummary, type BlockTransaction, type ContractSupply, type TransactionResult } from './decoders.js';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/query/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,oBAAoB,EACpB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC"}