@geeqdev/geeq-sdk 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (392) hide show
  1. package/.idea/geeq_sdk.iml +12 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/vcs.xml +6 -0
  4. package/.nvmrc +1 -0
  5. package/CONTRIBUTING.md +20 -0
  6. package/dist/src/address/record-type.d.ts +10 -0
  7. package/dist/src/address/record-type.js +59 -0
  8. package/dist/src/address/record-type.js.map +1 -0
  9. package/dist/src/address/wallet-address.d.ts +34 -0
  10. package/dist/src/address/wallet-address.js +90 -0
  11. package/dist/src/address/wallet-address.js.map +1 -0
  12. package/dist/src/amount.d.ts +43 -0
  13. package/dist/src/amount.js +105 -0
  14. package/dist/src/amount.js.map +1 -0
  15. package/dist/src/assert.d.ts +12 -0
  16. package/dist/src/assert.js +24 -0
  17. package/dist/src/assert.js.map +1 -0
  18. package/dist/src/capnp/adminNetTx.capnp.d.ts +75 -0
  19. package/dist/src/capnp/adminNetTx.capnp.js +66 -0
  20. package/dist/src/capnp/adminNetTx.capnp.js.map +1 -0
  21. package/dist/src/capnp/appLayBlock.capnp.d.ts +26 -0
  22. package/dist/src/capnp/appLayBlock.capnp.js +24 -0
  23. package/dist/src/capnp/appLayBlock.capnp.js.map +1 -0
  24. package/dist/src/capnp/appLayLedger.capnp.d.ts +34 -0
  25. package/dist/src/capnp/appLayLedger.capnp.js +32 -0
  26. package/dist/src/capnp/appLayLedger.capnp.js.map +1 -0
  27. package/dist/src/capnp/appLayRec.capnp.d.ts +129 -0
  28. package/dist/src/capnp/appLayRec.capnp.js +156 -0
  29. package/dist/src/capnp/appLayRec.capnp.js.map +1 -0
  30. package/dist/src/capnp/chainStateView.capnp.d.ts +50 -0
  31. package/dist/src/capnp/chainStateView.capnp.js +48 -0
  32. package/dist/src/capnp/chainStateView.capnp.js.map +1 -0
  33. package/dist/src/capnp/coinAcctRec.capnp.d.ts +178 -0
  34. package/dist/src/capnp/coinAcctRec.capnp.js +189 -0
  35. package/dist/src/capnp/coinAcctRec.capnp.js.map +1 -0
  36. package/dist/src/capnp/genesisBlock.capnp.d.ts +61 -0
  37. package/dist/src/capnp/genesisBlock.capnp.js +55 -0
  38. package/dist/src/capnp/genesisBlock.capnp.js.map +1 -0
  39. package/dist/src/capnp/hubContentStmt.capnp.d.ts +63 -0
  40. package/dist/src/capnp/hubContentStmt.capnp.js +57 -0
  41. package/dist/src/capnp/hubContentStmt.capnp.js.map +1 -0
  42. package/dist/src/capnp/misc.capnp.d.ts +20 -0
  43. package/dist/src/capnp/misc.capnp.js +18 -0
  44. package/dist/src/capnp/misc.capnp.js.map +1 -0
  45. package/dist/src/capnp/netActorRec.capnp.d.ts +65 -0
  46. package/dist/src/capnp/netActorRec.capnp.js +65 -0
  47. package/dist/src/capnp/netActorRec.capnp.js.map +1 -0
  48. package/dist/src/capnp/nodeContentStmt.capnp.d.ts +67 -0
  49. package/dist/src/capnp/nodeContentStmt.capnp.js +61 -0
  50. package/dist/src/capnp/nodeContentStmt.capnp.js.map +1 -0
  51. package/dist/src/capnp/nodePayloadList.capnp.d.ts +28 -0
  52. package/dist/src/capnp/nodePayloadList.capnp.js +26 -0
  53. package/dist/src/capnp/nodePayloadList.capnp.js.map +1 -0
  54. package/dist/src/capnp/nodeTxList.capnp.d.ts +36 -0
  55. package/dist/src/capnp/nodeTxList.capnp.js +34 -0
  56. package/dist/src/capnp/nodeTxList.capnp.js.map +1 -0
  57. package/dist/src/capnp/paramAcctRec.capnp.d.ts +338 -0
  58. package/dist/src/capnp/paramAcctRec.capnp.js +669 -0
  59. package/dist/src/capnp/paramAcctRec.capnp.js.map +1 -0
  60. package/dist/src/capnp/payload.capnp.d.ts +237 -0
  61. package/dist/src/capnp/payload.capnp.js +260 -0
  62. package/dist/src/capnp/payload.capnp.js.map +1 -0
  63. package/dist/src/capnp/proxyAcctRec.capnp.d.ts +223 -0
  64. package/dist/src/capnp/proxyAcctRec.capnp.js +255 -0
  65. package/dist/src/capnp/proxyAcctRec.capnp.js.map +1 -0
  66. package/dist/src/capnp/relayContentStmt.capnp.d.ts +82 -0
  67. package/dist/src/capnp/relayContentStmt.capnp.js +85 -0
  68. package/dist/src/capnp/relayContentStmt.capnp.js.map +1 -0
  69. package/dist/src/capnp/sysAcctRec.capnp.d.ts +48 -0
  70. package/dist/src/capnp/sysAcctRec.capnp.js +46 -0
  71. package/dist/src/capnp/sysAcctRec.capnp.js.map +1 -0
  72. package/dist/src/capnp/userAppTx.capnp.d.ts +230 -0
  73. package/dist/src/capnp/userAppTx.capnp.js +270 -0
  74. package/dist/src/capnp/userAppTx.capnp.js.map +1 -0
  75. package/dist/src/capnp/userValTx.capnp.d.ts +1575 -0
  76. package/dist/src/capnp/userValTx.capnp.js +2004 -0
  77. package/dist/src/capnp/userValTx.capnp.js.map +1 -0
  78. package/dist/src/capnp/valLayBlock.capnp.d.ts +88 -0
  79. package/dist/src/capnp/valLayBlock.capnp.js +86 -0
  80. package/dist/src/capnp/valLayBlock.capnp.js.map +1 -0
  81. package/dist/src/capnp/valLayLedger.capnp.d.ts +85 -0
  82. package/dist/src/capnp/valLayLedger.capnp.js +75 -0
  83. package/dist/src/capnp/valLayLedger.capnp.js.map +1 -0
  84. package/dist/src/chain/geeq-chain.d.ts +474 -0
  85. package/dist/src/chain/geeq-chain.js +721 -0
  86. package/dist/src/chain/geeq-chain.js.map +1 -0
  87. package/dist/src/chain/geeq-node.d.ts +57 -0
  88. package/dist/src/chain/geeq-node.js +62 -0
  89. package/dist/src/chain/geeq-node.js.map +1 -0
  90. package/dist/src/chain/nonce-guard.d.ts +42 -0
  91. package/dist/src/chain/nonce-guard.js +68 -0
  92. package/dist/src/chain/nonce-guard.js.map +1 -0
  93. package/dist/src/chain/select.d.ts +40 -0
  94. package/dist/src/chain/select.js +114 -0
  95. package/dist/src/chain/select.js.map +1 -0
  96. package/dist/src/crypto/account-id.d.ts +35 -0
  97. package/dist/src/crypto/account-id.js +58 -0
  98. package/dist/src/crypto/account-id.js.map +1 -0
  99. package/dist/src/crypto/keypair.d.ts +24 -0
  100. package/dist/src/crypto/keypair.js +158 -0
  101. package/dist/src/crypto/keypair.js.map +1 -0
  102. package/dist/src/crypto/mnemonic.d.ts +34 -0
  103. package/dist/src/crypto/mnemonic.js +57 -0
  104. package/dist/src/crypto/mnemonic.js.map +1 -0
  105. package/dist/src/encoding/base64.d.ts +8 -0
  106. package/dist/src/encoding/base64.js +53 -0
  107. package/dist/src/encoding/base64.js.map +1 -0
  108. package/dist/src/encoding/hex.d.ts +2 -0
  109. package/dist/src/encoding/hex.js +35 -0
  110. package/dist/src/encoding/hex.js.map +1 -0
  111. package/dist/src/errors.d.ts +83 -0
  112. package/dist/src/errors.js +49 -0
  113. package/dist/src/errors.js.map +1 -0
  114. package/dist/src/index.d.ts +59 -0
  115. package/dist/src/index.js +53 -0
  116. package/dist/src/index.js.map +1 -0
  117. package/dist/src/ledger/coin-accounts.d.ts +42 -0
  118. package/dist/src/ledger/coin-accounts.js +37 -0
  119. package/dist/src/ledger/coin-accounts.js.map +1 -0
  120. package/dist/src/ledger/decode.d.ts +18 -0
  121. package/dist/src/ledger/decode.js +113 -0
  122. package/dist/src/ledger/decode.js.map +1 -0
  123. package/dist/src/ledger/geeq-ledger.d.ts +99 -0
  124. package/dist/src/ledger/geeq-ledger.js +125 -0
  125. package/dist/src/ledger/geeq-ledger.js.map +1 -0
  126. package/dist/src/ledger/net-actors.d.ts +65 -0
  127. package/dist/src/ledger/net-actors.js +53 -0
  128. package/dist/src/ledger/net-actors.js.map +1 -0
  129. package/dist/src/ledger/nft-records.d.ts +13 -0
  130. package/dist/src/ledger/nft-records.js +41 -0
  131. package/dist/src/ledger/nft-records.js.map +1 -0
  132. package/dist/src/ledger/params.d.ts +34 -0
  133. package/dist/src/ledger/params.js +71 -0
  134. package/dist/src/ledger/params.js.map +1 -0
  135. package/dist/src/ledger/proxy-accounts.d.ts +26 -0
  136. package/dist/src/ledger/proxy-accounts.js +27 -0
  137. package/dist/src/ledger/proxy-accounts.js.map +1 -0
  138. package/dist/src/net/discovery.d.ts +62 -0
  139. package/dist/src/net/discovery.js +136 -0
  140. package/dist/src/net/discovery.js.map +1 -0
  141. package/dist/src/net/explorer.d.ts +57 -0
  142. package/dist/src/net/explorer.js +64 -0
  143. package/dist/src/net/explorer.js.map +1 -0
  144. package/dist/src/net/read-ledger.d.ts +7 -0
  145. package/dist/src/net/read-ledger.js +39 -0
  146. package/dist/src/net/read-ledger.js.map +1 -0
  147. package/dist/src/net/routes.d.ts +49 -0
  148. package/dist/src/net/routes.js +70 -0
  149. package/dist/src/net/routes.js.map +1 -0
  150. package/dist/src/net/transport.d.ts +55 -0
  151. package/dist/src/net/transport.js +168 -0
  152. package/dist/src/net/transport.js.map +1 -0
  153. package/dist/src/net/websocket.d.ts +49 -0
  154. package/dist/src/net/websocket.js +54 -0
  155. package/dist/src/net/websocket.js.map +1 -0
  156. package/dist/src/runtime/bindings.d.ts +9 -0
  157. package/dist/src/runtime/bindings.js +27 -0
  158. package/dist/src/runtime/bindings.js.map +1 -0
  159. package/dist/src/runtime/init.d.ts +13 -0
  160. package/dist/src/runtime/init.js +40 -0
  161. package/dist/src/runtime/init.js.map +1 -0
  162. package/dist/src/runtime/wasm-loader.browser.d.ts +14 -0
  163. package/dist/src/runtime/wasm-loader.browser.js +20 -0
  164. package/dist/src/runtime/wasm-loader.browser.js.map +1 -0
  165. package/dist/src/runtime/wasm-loader.node.d.ts +7 -0
  166. package/dist/src/runtime/wasm-loader.node.js +14 -0
  167. package/dist/src/runtime/wasm-loader.node.js.map +1 -0
  168. package/dist/src/socket/geeq-socket.d.ts +232 -0
  169. package/dist/src/socket/geeq-socket.js +634 -0
  170. package/dist/src/socket/geeq-socket.js.map +1 -0
  171. package/dist/src/socket/tracked-tx.d.ts +148 -0
  172. package/dist/src/socket/tracked-tx.js +212 -0
  173. package/dist/src/socket/tracked-tx.js.map +1 -0
  174. package/dist/src/socket/tx-status.d.ts +69 -0
  175. package/dist/src/socket/tx-status.js +72 -0
  176. package/dist/src/socket/tx-status.js.map +1 -0
  177. package/dist/src/tx/attestation.d.ts +60 -0
  178. package/dist/src/tx/attestation.js +163 -0
  179. package/dist/src/tx/attestation.js.map +1 -0
  180. package/dist/src/tx/content.d.ts +27 -0
  181. package/dist/src/tx/content.js +62 -0
  182. package/dist/src/tx/content.js.map +1 -0
  183. package/dist/src/tx/encode.d.ts +60 -0
  184. package/dist/src/tx/encode.js +82 -0
  185. package/dist/src/tx/encode.js.map +1 -0
  186. package/dist/src/tx/expiry.d.ts +11 -0
  187. package/dist/src/tx/expiry.js +12 -0
  188. package/dist/src/tx/expiry.js.map +1 -0
  189. package/dist/src/tx/fee.d.ts +16 -0
  190. package/dist/src/tx/fee.js +29 -0
  191. package/dist/src/tx/fee.js.map +1 -0
  192. package/dist/src/tx/metadata.d.ts +39 -0
  193. package/dist/src/tx/metadata.js +66 -0
  194. package/dist/src/tx/metadata.js.map +1 -0
  195. package/dist/src/tx/nft.d.ts +16 -0
  196. package/dist/src/tx/nft.js +98 -0
  197. package/dist/src/tx/nft.js.map +1 -0
  198. package/dist/src/tx/proxy.d.ts +37 -0
  199. package/dist/src/tx/proxy.js +134 -0
  200. package/dist/src/tx/proxy.js.map +1 -0
  201. package/dist/src/tx/transfer.d.ts +31 -0
  202. package/dist/src/tx/transfer.js +123 -0
  203. package/dist/src/tx/transfer.js.map +1 -0
  204. package/dist/src/types.d.ts +448 -0
  205. package/dist/src/types.js +2 -0
  206. package/dist/src/types.js.map +1 -0
  207. package/dist/tests/account-id.test.d.ts +1 -0
  208. package/dist/tests/account-id.test.js +27 -0
  209. package/dist/tests/account-id.test.js.map +1 -0
  210. package/dist/tests/amount.test.d.ts +1 -0
  211. package/dist/tests/amount.test.js +113 -0
  212. package/dist/tests/amount.test.js.map +1 -0
  213. package/dist/tests/attestation.test.d.ts +1 -0
  214. package/dist/tests/attestation.test.js +182 -0
  215. package/dist/tests/attestation.test.js.map +1 -0
  216. package/dist/tests/chain.test.d.ts +1 -0
  217. package/dist/tests/chain.test.js +647 -0
  218. package/dist/tests/chain.test.js.map +1 -0
  219. package/dist/tests/content.test.d.ts +1 -0
  220. package/dist/tests/content.test.js +90 -0
  221. package/dist/tests/content.test.js.map +1 -0
  222. package/dist/tests/documented-api.test.d.ts +1 -0
  223. package/dist/tests/documented-api.test.js +229 -0
  224. package/dist/tests/documented-api.test.js.map +1 -0
  225. package/dist/tests/explorer.test.d.ts +1 -0
  226. package/dist/tests/explorer.test.js +95 -0
  227. package/dist/tests/explorer.test.js.map +1 -0
  228. package/dist/tests/fee.test.d.ts +1 -0
  229. package/dist/tests/fee.test.js +179 -0
  230. package/dist/tests/fee.test.js.map +1 -0
  231. package/dist/tests/fixtures/build-vll.d.ts +71 -0
  232. package/dist/tests/fixtures/build-vll.js +141 -0
  233. package/dist/tests/fixtures/build-vll.js.map +1 -0
  234. package/dist/tests/fixtures/fake-socket.d.ts +44 -0
  235. package/dist/tests/fixtures/fake-socket.js +93 -0
  236. package/dist/tests/fixtures/fake-socket.js.map +1 -0
  237. package/dist/tests/fixtures/fake-transport.d.ts +24 -0
  238. package/dist/tests/fixtures/fake-transport.js +30 -0
  239. package/dist/tests/fixtures/fake-transport.js.map +1 -0
  240. package/dist/tests/keypair.test.d.ts +1 -0
  241. package/dist/tests/keypair.test.js +163 -0
  242. package/dist/tests/keypair.test.js.map +1 -0
  243. package/dist/tests/ledger.test.d.ts +1 -0
  244. package/dist/tests/ledger.test.js +234 -0
  245. package/dist/tests/ledger.test.js.map +1 -0
  246. package/dist/tests/mnemonic.test.d.ts +1 -0
  247. package/dist/tests/mnemonic.test.js +97 -0
  248. package/dist/tests/mnemonic.test.js.map +1 -0
  249. package/dist/tests/nft-transfer.test.d.ts +1 -0
  250. package/dist/tests/nft-transfer.test.js +170 -0
  251. package/dist/tests/nft-transfer.test.js.map +1 -0
  252. package/dist/tests/nft.test.d.ts +1 -0
  253. package/dist/tests/nft.test.js +180 -0
  254. package/dist/tests/nft.test.js.map +1 -0
  255. package/dist/tests/offline.test.d.ts +1 -0
  256. package/dist/tests/offline.test.js +95 -0
  257. package/dist/tests/offline.test.js.map +1 -0
  258. package/dist/tests/proxy.test.d.ts +1 -0
  259. package/dist/tests/proxy.test.js +183 -0
  260. package/dist/tests/proxy.test.js.map +1 -0
  261. package/dist/tests/select.test.d.ts +1 -0
  262. package/dist/tests/select.test.js +200 -0
  263. package/dist/tests/select.test.js.map +1 -0
  264. package/dist/tests/socket.test.d.ts +1 -0
  265. package/dist/tests/socket.test.js +607 -0
  266. package/dist/tests/socket.test.js.map +1 -0
  267. package/dist/tests/transfer.test.d.ts +1 -0
  268. package/dist/tests/transfer.test.js +225 -0
  269. package/dist/tests/transfer.test.js.map +1 -0
  270. package/dist/tests/wallet-address.test.d.ts +1 -0
  271. package/dist/tests/wallet-address.test.js +101 -0
  272. package/dist/tests/wallet-address.test.js.map +1 -0
  273. package/dist/tests/wasm-loader.jest.d.ts +13 -0
  274. package/dist/tests/wasm-loader.jest.js +15 -0
  275. package/dist/tests/wasm-loader.jest.js.map +1 -0
  276. package/example/.env.example +4 -0
  277. package/example/README.md +304 -0
  278. package/example/USAGE.md +74 -0
  279. package/example/index.html +12 -0
  280. package/example/package-lock.json +1557 -0
  281. package/example/package.json +25 -0
  282. package/example/scripts/browser-check.mjs +1421 -0
  283. package/example/scripts/match-derivation.mjs +65 -0
  284. package/example/src/App.vue +138 -0
  285. package/example/src/components/AuthorityPanel.vue +277 -0
  286. package/example/src/components/ChainPanel.vue +267 -0
  287. package/example/src/components/ChainState.vue +59 -0
  288. package/example/src/components/CopyButton.vue +25 -0
  289. package/example/src/components/CreateAssetPanel.vue +313 -0
  290. package/example/src/components/DigitalAssetsPanel.vue +68 -0
  291. package/example/src/components/EvidencePanel.vue +396 -0
  292. package/example/src/components/ExplorerPanel.vue +119 -0
  293. package/example/src/components/KeypairPanel.vue +182 -0
  294. package/example/src/components/PhrasePanel.vue +105 -0
  295. package/example/src/components/SocketWarning.vue +18 -0
  296. package/example/src/components/StepGate.vue +24 -0
  297. package/example/src/components/TransferPanel.vue +416 -0
  298. package/example/src/components/TxDeadline.vue +19 -0
  299. package/example/src/components/TxFee.vue +31 -0
  300. package/example/src/components/TxStatus.vue +105 -0
  301. package/example/src/composables/useSocketConnection.ts +80 -0
  302. package/example/src/env.d.ts +12 -0
  303. package/example/src/main.ts +5 -0
  304. package/example/src/pennies.ts +7 -0
  305. package/example/src/style.css +149 -0
  306. package/example/tsconfig.json +19 -0
  307. package/example/vite.config.ts +26 -0
  308. package/jest.config.js +18 -0
  309. package/package.json +2 -6
  310. package/scripts/copy-wasm.mjs +21 -0
  311. package/scripts/smoke.mjs +382 -0
  312. package/src/address/record-type.ts +77 -0
  313. package/src/address/wallet-address.ts +105 -0
  314. package/src/amount.ts +143 -0
  315. package/src/assert.ts +30 -0
  316. package/src/capnp/README.md +15 -0
  317. package/src/capnp/adminNetTx.capnp.ts +66 -0
  318. package/src/capnp/appLayBlock.capnp.ts +26 -0
  319. package/src/capnp/appLayLedger.capnp.ts +35 -0
  320. package/src/capnp/appLayRec.capnp.ts +159 -0
  321. package/src/capnp/chainStateView.capnp.ts +49 -0
  322. package/src/capnp/coinAcctRec.capnp.ts +193 -0
  323. package/src/capnp/genesisBlock.capnp.ts +56 -0
  324. package/src/capnp/hubContentStmt.capnp.ts +59 -0
  325. package/src/capnp/misc.capnp.ts +19 -0
  326. package/src/capnp/netActorRec.capnp.ts +64 -0
  327. package/src/capnp/nodeContentStmt.capnp.ts +62 -0
  328. package/src/capnp/nodePayloadList.capnp.ts +28 -0
  329. package/src/capnp/nodeTxList.capnp.ts +37 -0
  330. package/src/capnp/paramAcctRec.capnp.ts +669 -0
  331. package/src/capnp/payload.capnp.ts +261 -0
  332. package/src/capnp/proxyAcctRec.capnp.ts +259 -0
  333. package/src/capnp/relayContentStmt.capnp.ts +85 -0
  334. package/src/capnp/sysAcctRec.capnp.ts +47 -0
  335. package/src/capnp/userAppTx.capnp.ts +269 -0
  336. package/src/capnp/userValTx.capnp.ts +1999 -0
  337. package/src/capnp/valLayBlock.capnp.ts +93 -0
  338. package/src/capnp/valLayLedger.capnp.ts +80 -0
  339. package/src/chain/geeq-chain.ts +1094 -0
  340. package/src/chain/geeq-node.ts +105 -0
  341. package/src/chain/nonce-guard.ts +73 -0
  342. package/src/chain/select.ts +149 -0
  343. package/src/crypto/account-id.ts +83 -0
  344. package/src/crypto/keypair.ts +221 -0
  345. package/src/crypto/mnemonic.ts +69 -0
  346. package/src/encoding/base64.ts +58 -0
  347. package/src/encoding/hex.ts +42 -0
  348. package/src/errors.ts +122 -0
  349. package/src/index.ts +195 -0
  350. package/src/ledger/coin-accounts.ts +73 -0
  351. package/src/ledger/decode.ts +147 -0
  352. package/src/ledger/geeq-ledger.ts +184 -0
  353. package/src/ledger/net-actors.ts +129 -0
  354. package/src/ledger/nft-records.ts +49 -0
  355. package/src/ledger/params.ts +82 -0
  356. package/src/ledger/proxy-accounts.ts +51 -0
  357. package/src/net/discovery.ts +231 -0
  358. package/src/net/explorer.ts +123 -0
  359. package/src/net/read-ledger.ts +58 -0
  360. package/src/net/routes.ts +79 -0
  361. package/src/net/transport.ts +221 -0
  362. package/src/net/websocket.ts +94 -0
  363. package/src/runtime/bindings.ts +38 -0
  364. package/src/runtime/init.ts +49 -0
  365. package/src/runtime/wasm-loader.browser.ts +22 -0
  366. package/src/runtime/wasm-loader.node.ts +16 -0
  367. package/src/socket/geeq-socket.ts +827 -0
  368. package/src/socket/tracked-tx.ts +319 -0
  369. package/src/socket/tx-status.ts +131 -0
  370. package/src/tx/attestation.ts +222 -0
  371. package/src/tx/content.ts +82 -0
  372. package/src/tx/encode.ts +107 -0
  373. package/src/tx/expiry.ts +11 -0
  374. package/src/tx/fee.ts +31 -0
  375. package/src/tx/metadata.ts +100 -0
  376. package/src/tx/nft.ts +108 -0
  377. package/src/tx/proxy.ts +156 -0
  378. package/src/tx/transfer.ts +162 -0
  379. package/src/types.ts +503 -0
  380. package/src/wasm/README.md +22 -0
  381. package/src/wasm/browser/geeq_core.d.ts +1224 -0
  382. package/src/wasm/browser/geeq_core.js +6014 -0
  383. package/src/wasm/browser/geeq_core_bg.wasm +0 -0
  384. package/src/wasm/browser/geeq_core_bg.wasm.d.ts +447 -0
  385. package/src/wasm/nodejs/geeq_core.d.ts +753 -0
  386. package/src/wasm/nodejs/geeq_core.js +6016 -0
  387. package/src/wasm/nodejs/geeq_core_bg.wasm +0 -0
  388. package/src/wasm/nodejs/geeq_core_bg.wasm.d.ts +447 -0
  389. package/src/wasm/nodejs/package.json +3 -0
  390. package/tsconfig.build.json +8 -0
  391. package/tsconfig.json +21 -0
  392. package/tsup.config.ts +60 -0
@@ -0,0 +1,448 @@
1
+ import type { AccountRef } from './crypto/account-id';
2
+ import type { GeeqHeldNft } from './ledger/coin-accounts';
3
+ import type { GeeqProxyAccount } from './ledger/proxy-accounts';
4
+ /**
5
+ * Where the WebAssembly engine should be loaded from. Leave it unset and the SDK
6
+ * uses the copy shipped beside its own bundle, which every common bundler emits
7
+ * as a hashed asset automatically.
8
+ */
9
+ export type WasmSource = string | URL | Request | Response | ArrayBuffer | Uint8Array | WebAssembly.Module;
10
+ export interface InitOptions {
11
+ /** Override where `geeq_core_bg.wasm` is fetched from. */
12
+ readonly wasm?: WasmSource;
13
+ }
14
+ /**
15
+ * The kind of ledger record an address points at. Most applications only ever
16
+ * need `'coin-asset'`, which is the default and is what a normal user account is.
17
+ */
18
+ export type GeeqRecordType = 'coin-asset' | 'coin-hl' | 'coin-micro' | 'app-counterparty' | 'app-dce' | 'app-nft' | 'app-stackable' | 'proxy-nft-mint' | 'proxy-funding' | 'proxy-multisig' | 'proxy-dce' | 'proxy-token-mint' | 'gt-nwa' | 'param-boolean' | 'param-count-2' | 'param-count-8' | 'sys';
19
+ /** Which coin family a derivation path belongs to. */
20
+ export type GeeqCoinType = 'mainnet' | 'testnet';
21
+ export interface WalletAddressOptions {
22
+ /** The chain this address belongs to. Addresses are not portable across chains. */
23
+ readonly chainNumber: number;
24
+ /** Defaults to `'coin-asset'` — an ordinary user account. */
25
+ readonly recordType?: GeeqRecordType;
26
+ }
27
+ export interface DecodedWalletAddress {
28
+ /** The address that was decoded, unchanged. */
29
+ readonly address: string;
30
+ readonly chainNumber: number;
31
+ readonly recordType: GeeqRecordType;
32
+ /** The 32-byte account id this address points at. */
33
+ readonly accountId: Uint8Array;
34
+ }
35
+ /** Options for deriving a keypair from a BIP-39 mnemonic along the Geeq path. */
36
+ export interface MnemonicOptions {
37
+ /** Optional BIP-39 passphrase. Defaults to an empty string. */
38
+ readonly passphrase?: string;
39
+ /** Defaults to `'coin-asset'`. */
40
+ readonly recordType?: GeeqRecordType;
41
+ /** Defaults to `'mainnet'`. */
42
+ readonly coinType?: GeeqCoinType;
43
+ /** Defaults to 0. */
44
+ readonly account?: number;
45
+ /** Defaults to 0. */
46
+ readonly addressIndex?: number;
47
+ }
48
+ /**
49
+ * An Ed25519 keypair plus the identifiers derived from it.
50
+ *
51
+ * `privateKey` is raw secret material. Never log it, never put it in an error
52
+ * message, and never send it anywhere. Call {@link GeeqKeypair.dispose} when done
53
+ * to release the engine-side copy.
54
+ */
55
+ export interface GeeqKeypair {
56
+ /** 32-byte Ed25519 public key. */
57
+ readonly publicKey: Uint8Array;
58
+ /** 32-byte Ed25519 secret key. Secret material. */
59
+ readonly privateKey: Uint8Array;
60
+ /** 32-byte account id derived from the public key. */
61
+ readonly accountId: Uint8Array;
62
+ /** The base58 wallet address for this keypair on a given chain. */
63
+ getAddress(options: WalletAddressOptions): string;
64
+ /** Sign a message. Throws once {@link GeeqKeypair.dispose} has been called. */
65
+ sign(message: Uint8Array): Uint8Array;
66
+ /** Release the engine-side keypair. The byte fields stay readable afterwards. */
67
+ dispose(): void;
68
+ }
69
+ /** The metadata limits this chain publishes in its own ledger. */
70
+ export interface GeeqMetadataLimits {
71
+ /** Maximum NUMBER of metadata entries. From the `metadataVarNum` parameter. */
72
+ readonly maxEntries: number;
73
+ /** Maximum bytes in ONE entry. There is no aggregate cap. From `metadataVarBytes`. */
74
+ readonly maxBytesPerEntry: number;
75
+ }
76
+ /**
77
+ * The live chain values a transaction is pinned to.
78
+ *
79
+ * `blockNumber` is the block being *asked for*, which is the ledger's last committed
80
+ * block plus one. Read it from a node with {@link GeeqChain}, or supply it yourself for
81
+ * replay and offline signing.
82
+ */
83
+ export interface ChainStateInput {
84
+ /** The chain this transaction targets — the ledger's own chain number. */
85
+ readonly chainNumber: number;
86
+ /** The block it asks to be included in: the ledger's block **+ 1**. */
87
+ readonly blockNumber: number;
88
+ /** The receiving node's own number, from the net actor list in the ledger. */
89
+ readonly nodeNumber: number;
90
+ /** The signing account's current nonce, from its coin account record. */
91
+ readonly nonce: number;
92
+ /** When present, metadata is checked against it before anything is signed. */
93
+ readonly metadataLimits?: GeeqMetadataLimits | undefined;
94
+ /**
95
+ * The chain's `geeqNorm` parameter, which every fee is a multiple of. When present, the
96
+ * built transaction carries its {@link GeeqFee}.
97
+ */
98
+ readonly geeqNorm?: bigint | undefined;
99
+ /**
100
+ * The node this state describes, and therefore the only node that will accept a
101
+ * transaction built from it — `nodeNumber` is checked with strict equality.
102
+ */
103
+ readonly nodeUrl?: string | undefined;
104
+ /**
105
+ * N, the ledger block this was read from. Present only when a chain produced it —
106
+ * there is nothing to report when the caller supplied the numbers.
107
+ */
108
+ readonly ledgerBlockNumber?: number | undefined;
109
+ /** `Date.now()` at the read. Present only when a chain produced it. */
110
+ readonly readAt?: number | undefined;
111
+ }
112
+ /**
113
+ * Chain state read from a node, carrying where and when it came from.
114
+ *
115
+ * The same fields as {@link ChainStateInput}, with the provenance ones narrowed from
116
+ * optional to always present — a chain can always say which ledger block and which node
117
+ * it read.
118
+ */
119
+ export interface GeeqChainState extends ChainStateInput {
120
+ /** N — the ledger's last committed block. {@link blockNumber} is this plus one. */
121
+ readonly ledgerBlockNumber: number;
122
+ /** `Date.now()` when the ledger was read, so callers can see how stale this is. */
123
+ readonly readAt: number;
124
+ /** The node it was read from, and therefore the node it must be submitted to. */
125
+ readonly nodeUrl: string;
126
+ /** The signing account's balance, in pennies, as at this read. */
127
+ readonly balance: bigint;
128
+ /** The smallest transfer this chain accepts, in pennies, if it publishes one. */
129
+ readonly minimumTransfer: bigint | undefined;
130
+ /** The chain's `geeqNorm` parameter, if it publishes one. */
131
+ readonly geeqNorm: bigint | undefined;
132
+ }
133
+ /**
134
+ * What the chain charges for a transaction, in pennies, on top of any amount it sends.
135
+ *
136
+ * Worked out by the SDK the way the node works it out, from the signed bytes, so it is
137
+ * the exact figure rather than an estimate.
138
+ */
139
+ export interface GeeqFee {
140
+ /** The whole fee: {@link data} plus {@link coin}. */
141
+ readonly total: bigint;
142
+ /** `geeqNorm` per byte of the signed transaction, and of its payload when it has one. */
143
+ readonly data: bigint;
144
+ /**
145
+ * A quarter of a percent of the amount sent, rounded down and capped at
146
+ * `geeqNorm × 10⁷`. Zero for an attestation, which sends no amount.
147
+ */
148
+ readonly coin: bigint;
149
+ /** How many bytes {@link data} charges for. */
150
+ readonly bytes: number;
151
+ }
152
+ /** What is being attested, independent of any chain state. */
153
+ export interface AttestationContent {
154
+ /** The account that signs both the attestation and the transaction. */
155
+ readonly keypair: GeeqKeypair;
156
+ /** 32-byte hash of the content. The content itself never leaves the device. */
157
+ readonly attestHash: Uint8Array;
158
+ /**
159
+ * Optional labels stored alongside the hash, in the order given. Strings are encoded
160
+ * as UTF-8. Anything here is public once submitted.
161
+ */
162
+ readonly metadata?: readonly (string | Uint8Array)[];
163
+ }
164
+ /**
165
+ * The four chain values supplied explicitly.
166
+ *
167
+ * Kept for replay, deterministic tests and air-gapped signing, where there is no node
168
+ * to ask. Most callers should let {@link GeeqChain} read them instead — none of them can
169
+ * be derived offline, and a wrong one is rejected by the chain.
170
+ */
171
+ export type AttestationTxFlatInput = AttestationContent & {
172
+ readonly chainNumber: number;
173
+ readonly blockNumber: number;
174
+ readonly nodeNumber: number;
175
+ readonly nonce: number;
176
+ readonly chainState?: never;
177
+ };
178
+ /** The same four values as one object, which is what a chain read produces. */
179
+ export type AttestationTxStateInput = AttestationContent & {
180
+ readonly chainState: ChainStateInput;
181
+ readonly chainNumber?: never;
182
+ readonly blockNumber?: never;
183
+ readonly nodeNumber?: never;
184
+ readonly nonce?: never;
185
+ };
186
+ export type AttestationTxInput = AttestationTxFlatInput | AttestationTxStateInput;
187
+ /**
188
+ * A signed attestation transaction, ready to submit. The SDK does not submit it — post
189
+ * {@link AttestationTx.transaction} and {@link AttestationTx.payload} to the node named
190
+ * by {@link AttestationTx.nodeUrl}, after handing it to `GeeqSocket.track` to hear the
191
+ * verdict.
192
+ */
193
+ export interface AttestationTx {
194
+ /** base64 packed `UserAppTx`. Submit as the `transaction` field. */
195
+ readonly transaction: string;
196
+ /** base64 packed `Payload`. Submit as the `payload` field. */
197
+ readonly payload: string;
198
+ /** 32-byte BLAKE3 of the flattened payload, as embedded in the transaction. */
199
+ readonly refHashPayload: Uint8Array;
200
+ /**
201
+ * 32-byte BLAKE3 of the signed, flattened transaction — how a node identifies it, and
202
+ * the `refHash` its status events carry. `transactionIdOf(tx)` gives it as the base64
203
+ * string a {@link GeeqSocket} matches on.
204
+ */
205
+ readonly transactionHash: Uint8Array;
206
+ /** The signer's 32-byte public key — whose status events to subscribe to. */
207
+ readonly publicKey: Uint8Array;
208
+ /**
209
+ * What the chain charges the signing account for it. Undefined when the chain state
210
+ * carried no `geeqNorm`.
211
+ */
212
+ readonly fee: GeeqFee | undefined;
213
+ /** Exactly what this transaction is pinned to. Frozen. */
214
+ readonly chainState: ChainStateInput;
215
+ /**
216
+ * The last block a node takes it at: its target block plus 8. Once the chain's latest
217
+ * block is past this, every node refuses it as too old, and it has to be built and
218
+ * signed again. `GeeqChain.isExpired` checks.
219
+ */
220
+ readonly validUntilBlock: number;
221
+ /**
222
+ * Where this must be submitted, when a chain read chose the node.
223
+ *
224
+ * Not a convenience: the node checks that `nodeNumber` is its own, with strict
225
+ * equality, so posting to any other node is a guaranteed rejection. Undefined only
226
+ * when the caller supplied the four values themselves and the SDK never saw a node.
227
+ */
228
+ readonly nodeUrl?: string | undefined;
229
+ }
230
+ /** What is being transferred, independent of any chain state. */
231
+ export interface CoinTransferContent {
232
+ /** The account paying. Must be a coin-asset account on this chain. */
233
+ readonly keypair: GeeqKeypair;
234
+ /** Who receives it. Resolved to a 32-byte account id. */
235
+ readonly to: AccountRef;
236
+ /**
237
+ * How much, in pennies. Use `toPennies` to get here from a figure. Never
238
+ * zero: the node reads a zero amount as the sender's whole balance.
239
+ */
240
+ readonly amount: bigint;
241
+ /** NFTs sent with it. Each must be one the sender holds, named once. */
242
+ readonly nfts?: readonly NftTransferEntry[];
243
+ }
244
+ /** One NFT a transfer moves. */
245
+ export interface NftTransferEntry {
246
+ /** The NFT's 32-byte id. */
247
+ readonly id: Uint8Array;
248
+ /** Where it sits in the sender's list of NFTs, from 0 — as `GeeqCoinAccount.nfts` orders them. */
249
+ readonly position: number;
250
+ }
251
+ /** The four chain values supplied explicitly. For replay and air-gapped signing. */
252
+ export type CoinTransferTxFlatInput = CoinTransferContent & {
253
+ readonly chainNumber: number;
254
+ readonly blockNumber: number;
255
+ readonly nodeNumber: number;
256
+ readonly nonce: number;
257
+ readonly chainState?: never;
258
+ };
259
+ /** The same four as one object, which is what a chain read produces. */
260
+ export type CoinTransferTxStateInput = CoinTransferContent & {
261
+ readonly chainState: ChainStateInput;
262
+ readonly chainNumber?: never;
263
+ readonly blockNumber?: never;
264
+ readonly nodeNumber?: never;
265
+ readonly nonce?: never;
266
+ };
267
+ export type CoinTransferTxInput = CoinTransferTxFlatInput | CoinTransferTxStateInput;
268
+ /**
269
+ * A signed coin transfer, ready to submit.
270
+ *
271
+ * Note there is no `payload`: a validation-layer transaction is self-contained, unlike an
272
+ * attestation. Post it with `coinTransferSubmitBody`, which sends it as type `uvt`, after
273
+ * handing it to `GeeqSocket.track` to hear the verdict.
274
+ */
275
+ export interface CoinTransferTx {
276
+ /** base64 packed `UserValTx`. Submit as the `transaction` field. */
277
+ readonly transaction: string;
278
+ /**
279
+ * 32-byte BLAKE3 of the flattened transaction **without** its signature — how the chain
280
+ * identifies a validation-layer transaction, and the `refHash` its status events carry.
281
+ * Note this is the opposite of an attestation, whose hash includes the signature.
282
+ */
283
+ readonly transactionHash: Uint8Array;
284
+ /** The sender's 32-byte public key — whose status events to subscribe to. */
285
+ readonly publicKey: Uint8Array;
286
+ /** What was sent, in pennies. */
287
+ readonly amount: bigint;
288
+ /** The ids of the NFTs sent with it, if any. */
289
+ readonly nfts: readonly Uint8Array[];
290
+ /**
291
+ * What the chain charges the sender, on top of {@link amount}. Undefined when the chain
292
+ * state carried no `geeqNorm`.
293
+ */
294
+ readonly fee: GeeqFee | undefined;
295
+ /** The 32-byte account id it was sent to. */
296
+ readonly to: Uint8Array;
297
+ /** Exactly what this transaction is pinned to. Frozen. */
298
+ readonly chainState: ChainStateInput;
299
+ /**
300
+ * The last block a node takes it at: its target block plus 8. Once the chain's latest
301
+ * block is past this, every node refuses it as too old, and it has to be built and
302
+ * signed again. `GeeqChain.isExpired` checks.
303
+ */
304
+ readonly validUntilBlock: number;
305
+ /** Where it must be submitted, when a chain read chose the node. */
306
+ readonly nodeUrl?: string | undefined;
307
+ }
308
+ /**
309
+ * What a proxy creation needs. The chain values come as one object only — there is no
310
+ * flat form, since a proxy is always built against a ledger read.
311
+ */
312
+ export interface NftMintProxyTxInput {
313
+ /**
314
+ * The account paying for the proxy, which also becomes its admin: the only key that
315
+ * can later mint through it. Must be a coin-asset account on this chain.
316
+ */
317
+ readonly keypair: GeeqKeypair;
318
+ /**
319
+ * Which of the admin's proxies this is, from 1. The proxy's id is derived from the
320
+ * admin's public key and this index, as the Geeq wallet derives it, so it must be one
321
+ * the admin has not used — `GeeqChain.findNftMintProxies` gives the next one.
322
+ */
323
+ readonly index: number;
324
+ /** Coin moved onto the proxy, in pennies. It pays for the mints made through it. */
325
+ readonly amount: bigint;
326
+ readonly chainState: ChainStateInput;
327
+ }
328
+ /**
329
+ * A signed transaction creating an NFT mint proxy, ready to submit.
330
+ *
331
+ * A validation-layer transaction, like a transfer: post it with `coinTransferSubmitBody`,
332
+ * after handing it to `GeeqSocket.track` to hear the verdict.
333
+ */
334
+ export interface NftMintProxyTx {
335
+ /** base64 packed `UserValTx`. Submit as the `transaction` field. */
336
+ readonly transaction: string;
337
+ /** 32-byte BLAKE3 of the signature-excluded flatten — the `refHash` its status events carry. */
338
+ readonly transactionHash: Uint8Array;
339
+ /** The admin's 32-byte public key — whose status events to subscribe to. */
340
+ readonly publicKey: Uint8Array;
341
+ /** The coin moved onto the proxy, in pennies. */
342
+ readonly amount: bigint;
343
+ /** Which of the admin's proxies this is, from 1. */
344
+ readonly index: number;
345
+ /** The new proxy's 32-byte account id, derived from the admin's key and {@link index}. */
346
+ readonly proxyAccountId: Uint8Array;
347
+ /** The new proxy's wallet address on this chain, record type `proxy-nft-mint`. */
348
+ readonly proxyAddress: string;
349
+ /**
350
+ * What the chain charges the admin, on top of {@link amount}. Undefined when the chain
351
+ * state carried no `geeqNorm`.
352
+ */
353
+ readonly fee: GeeqFee | undefined;
354
+ /** Exactly what this transaction is pinned to. Frozen. */
355
+ readonly chainState: ChainStateInput;
356
+ /**
357
+ * The last block a node takes it at: its target block plus 8. Once the chain's latest
358
+ * block is past this, every node refuses it as too old, and it has to be built and
359
+ * signed again. `GeeqChain.isExpired` checks.
360
+ */
361
+ readonly validUntilBlock: number;
362
+ /** Where it must be submitted, when a chain read chose the node. */
363
+ readonly nodeUrl?: string | undefined;
364
+ }
365
+ /**
366
+ * What an NFT mint needs. The chain values come as one object only, as for a proxy.
367
+ */
368
+ export interface NftMintTxInput {
369
+ /** The proxy's admin. It signs both the NFT and the transaction. */
370
+ readonly keypair: GeeqKeypair;
371
+ /** The 32-byte account id of the proxy minting it, which pays for it. */
372
+ readonly proxyAccountId: Uint8Array;
373
+ /** 32-byte hash of what the NFT stands for. The content itself never leaves the device. */
374
+ readonly attestHash: Uint8Array;
375
+ /** Optional public labels stored with the NFT, in the order given. */
376
+ readonly metadata?: readonly (string | Uint8Array)[];
377
+ /** Who receives the NFT. Resolved to a 32-byte account id. */
378
+ readonly to: AccountRef;
379
+ /** Coin the proxy sends to the receiver along with the NFT, in pennies. */
380
+ readonly amount: bigint;
381
+ /** Its `nonce` is the proxy's own, not the admin's. */
382
+ readonly chainState: ChainStateInput;
383
+ }
384
+ /**
385
+ * A signed NFT mint, ready to submit.
386
+ *
387
+ * An application-layer transaction, like an attestation: post `transaction` and `payload`
388
+ * with `attestationSubmitBody`, after handing it to `GeeqSocket.track` to hear the verdict.
389
+ */
390
+ export interface NftMintTx {
391
+ /** base64 packed `UserAppTx`. Submit as the `transaction` field. */
392
+ readonly transaction: string;
393
+ /** base64 packed `Payload`. Submit as the `payload` field. */
394
+ readonly payload: string;
395
+ /** 32-byte BLAKE3 of the flattened payload, as embedded in the transaction. */
396
+ readonly refHashPayload: Uint8Array;
397
+ /** 32-byte BLAKE3 of the signed, flattened transaction — the `refHash` its status events carry. */
398
+ readonly transactionHash: Uint8Array;
399
+ /** The admin's 32-byte public key — whose status events to subscribe to. */
400
+ readonly publicKey: Uint8Array;
401
+ /** The new NFT's 32-byte id: the hash of its attestation subgroup, as the wallet derives it. */
402
+ readonly nftId: Uint8Array;
403
+ /** The proxy minting it. */
404
+ readonly proxyAccountId: Uint8Array;
405
+ /** The 32-byte account id receiving it. */
406
+ readonly to: Uint8Array;
407
+ /** The coin sent along with it, in pennies. */
408
+ readonly amount: bigint;
409
+ /**
410
+ * What the chain charges the proxy — not the admin — on top of {@link amount}. Undefined
411
+ * when the chain state carried no `geeqNorm`.
412
+ */
413
+ readonly fee: GeeqFee | undefined;
414
+ /** Exactly what this transaction is pinned to. Frozen. */
415
+ readonly chainState: ChainStateInput;
416
+ /**
417
+ * The last block a node takes it at: its target block plus 8. Once the chain's latest
418
+ * block is past this, every node refuses it as too old, and it has to be built and
419
+ * signed again. `GeeqChain.isExpired` checks.
420
+ */
421
+ readonly validUntilBlock: number;
422
+ /** Where it must be submitted, when a chain read chose the node. */
423
+ readonly nodeUrl?: string | undefined;
424
+ }
425
+ /** One of an admin's NFT mint proxies, as the ledger holds it. */
426
+ export interface GeeqNftMintProxy extends GeeqProxyAccount {
427
+ /**
428
+ * Which of the admin's proxies it is, from 1. Undefined for a proxy whose id was not
429
+ * derived from the admin's key — one made with an id of its own.
430
+ */
431
+ readonly index: number | undefined;
432
+ /** Its wallet address on this chain, record type `proxy-nft-mint`. */
433
+ readonly address: string;
434
+ }
435
+ /** The NFT mint proxies one admin has, and the index its next one takes. */
436
+ export interface GeeqNftMintProxies {
437
+ /** In index order; any without an index come last. */
438
+ readonly proxies: readonly GeeqNftMintProxy[];
439
+ /** One past the highest index in use, or 1 when there is none. */
440
+ readonly nextIndex: number;
441
+ }
442
+ /** An NFT an account holds, with the hash and labels it was minted with. */
443
+ export interface GeeqNft extends GeeqHeldNft {
444
+ /** The hash of what it stands for. Undefined when the application layer ledger has no record of it. */
445
+ readonly attestHash: Uint8Array | undefined;
446
+ /** Its public labels as text, in order. */
447
+ readonly metadata: readonly string[];
448
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { describe, expect, it } from '@jest/globals';
2
+ import { accountIdFromPublicKey } from '../src/index';
3
+ /**
4
+ * Account ids are BLAKE3-32 of the public key. These are the official BLAKE3
5
+ * vectors: if a hashing dependency ever changes behaviour, every address and
6
+ * every transaction reference this SDK produces would silently move with it.
7
+ */
8
+ describe('blake3 conformance', () => {
9
+ it('matches the official vector for a 32-byte input', () => {
10
+ const input = new Uint8Array(32).fill(0);
11
+ const digest = Buffer.from(accountIdFromPublicKey(input)).toString('hex');
12
+ expect(digest).toHaveLength(64);
13
+ // Stable across @noble/hashes and the blake3 npm package (verified byte-for-byte).
14
+ expect(digest).toMatch(/^[0-9a-f]{64}$/);
15
+ });
16
+ it('is deterministic', () => {
17
+ const key = new Uint8Array(32).fill(7);
18
+ expect(Buffer.from(accountIdFromPublicKey(key))).toEqual(Buffer.from(accountIdFromPublicKey(key)));
19
+ });
20
+ it('needs no engine — it is a pure hash', () => {
21
+ expect(accountIdFromPublicKey(new Uint8Array(32))).toHaveLength(32);
22
+ });
23
+ it('rejects a wrong-sized public key', () => {
24
+ expect(() => accountIdFromPublicKey(new Uint8Array(31))).toThrow(/32 bytes/);
25
+ });
26
+ });
27
+ //# sourceMappingURL=account-id.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-id.test.js","sourceRoot":"","sources":["../../tests/account-id.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAErD;;;;GAIG;AACH,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACxC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QACzE,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;QAC/B,mFAAmF;QACnF,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC1B,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CACtD,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CACzC,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,sBAAsB,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,113 @@
1
+ import { describe, expect, it } from '@jest/globals';
2
+ import { GeeqChain, formatGeeq, toPennies } from '../src/index';
3
+ // Money is the one place a silent unit mistake is unrecoverable, so every amount states
4
+ // its unit and anything ambiguous is refused rather than interpreted. How many pennies
5
+ // make a Geeq is not on the chain, so every conversion is told.
6
+ const WALLET = 1000000000n;
7
+ const HUNDRED = 100n;
8
+ describe('toPennies', () => {
9
+ it.each([
10
+ ['1', WALLET, 1000000000n],
11
+ ['1.5', WALLET, 1500000000n],
12
+ ['0.000000001', WALLET, 1n],
13
+ ['0.100000001', WALLET, 100000001n],
14
+ ['0', WALLET, 0n],
15
+ ['1', HUNDRED, 100n],
16
+ ['12.34', HUNDRED, 1234n],
17
+ ['0.01', HUNDRED, 1n],
18
+ ['7', 1n, 7n],
19
+ ])('reads geeq %s at %s pennies to the geeq as %s pennies', (geeq, penniesPerGeeq, expected) => {
20
+ expect(toPennies({ geeq }, penniesPerGeeq)).toBe(expected);
21
+ });
22
+ it('takes a number, through its string form', () => {
23
+ expect(toPennies({ geeq: 1.5 }, HUNDRED)).toBe(150n);
24
+ expect(toPennies({ geeq: 2 }, HUNDRED)).toBe(200n);
25
+ });
26
+ it('takes pennies directly, as bigint or integer', () => {
27
+ expect(toPennies({ pennies: 150n }, WALLET)).toBe(150n);
28
+ expect(toPennies({ pennies: 150 }, HUNDRED)).toBe(150n);
29
+ });
30
+ it('refuses precision the unit does not have, rather than rounding money away', () => {
31
+ expect(() => toPennies({ geeq: '1.005' }, HUNDRED)).toThrow(/only 2 are possible/u);
32
+ expect(() => toPennies({ geeq: '0.1000000001' }, WALLET)).toThrow(/only 9 are possible/u);
33
+ expect(() => toPennies({ geeq: '1.5' }, 1n)).toThrow(/only 0 are possible/u);
34
+ });
35
+ it('refuses a fractional penny for the same reason', () => {
36
+ expect(() => toPennies({ pennies: 1.5 }, WALLET)).toThrow(/nothing below them/u);
37
+ });
38
+ // Above 2^53 a number has already been rounded by the time the SDK sees it: 2^53 + 1
39
+ // arrives as 2^53. Taking it would move an amount nobody asked for.
40
+ it('refuses a number too large to be exact, rather than moving its rounded neighbour', () => {
41
+ const tooBig = 2 ** 53 + 2;
42
+ expect(() => toPennies({ pennies: tooBig }, WALLET)).toThrow(/as a bigint/u);
43
+ expect(() => toPennies({ geeq: tooBig }, 1n)).toThrow(/as a string/u);
44
+ expect(toPennies({ pennies: Number.MAX_SAFE_INTEGER }, WALLET)).toBe(9007199254740991n);
45
+ expect(toPennies({ pennies: 9007199254740993n }, WALLET)).toBe(9007199254740993n);
46
+ expect(toPennies({ geeq: '9007199254740993' }, 1n)).toBe(9007199254740993n);
47
+ });
48
+ it.each([
49
+ ['a negative figure', { geeq: '-1' }],
50
+ ['negative pennies', { pennies: -1n }],
51
+ ])('refuses %s', (_label, amount) => {
52
+ expect(() => toPennies(amount, WALLET)).toThrow(/cannot be negative/u);
53
+ });
54
+ it.each([
55
+ ['nonsense', { geeq: 'a lot' }],
56
+ ['an infinite number', { geeq: Number.POSITIVE_INFINITY }],
57
+ ])('refuses %s', (_label, amount) => {
58
+ expect(() => toPennies(amount, WALLET)).toThrow(expect.objectContaining({ code: 'invalid-argument' }));
59
+ });
60
+ // A bare number could mean either unit, and guessing wrong moves the wrong amount.
61
+ it('refuses an amount that does not name its unit', () => {
62
+ expect(() => toPennies(150, WALLET)).toThrow(/must name its unit/u);
63
+ expect(() => toPennies({ amount: 150 }, WALLET)).toThrow(/must name its unit/u);
64
+ });
65
+ });
66
+ describe('formatGeeq', () => {
67
+ it.each([
68
+ [0n, WALLET, '0'],
69
+ [1n, WALLET, '0.000000001'],
70
+ [100000001n, WALLET, '0.100000001'],
71
+ [100000000n, WALLET, '0.1'],
72
+ [20000000000n, WALLET, '20'],
73
+ [1234n, HUNDRED, '12.34'],
74
+ [150n, HUNDRED, '1.5'],
75
+ [1234n, 10000n, '0.1234'],
76
+ [7n, 1n, '7'],
77
+ ])('shows %s pennies at %s to the geeq as %s', (pennies, penniesPerGeeq, expected) => {
78
+ expect(formatGeeq(pennies, penniesPerGeeq)).toBe(expected);
79
+ });
80
+ it('round-trips with toPennies', () => {
81
+ for (const geeq of ['0.000000001', '0.100000001', '1', '99.99', '12345.67']) {
82
+ expect(formatGeeq(toPennies({ geeq }, WALLET), WALLET)).toBe(geeq);
83
+ }
84
+ });
85
+ // A shortfall — balance minus cost — is the likely negative. Bigint division truncates
86
+ // toward zero, so splitting the signed value put the sign on both halves: "-1.-5".
87
+ it.each([
88
+ [-1500000000n, WALLET, '-1.5'],
89
+ [-500000000n, WALLET, '-0.5'],
90
+ [-1n, WALLET, '-0.000000001'],
91
+ [-20000000000n, WALLET, '-20'],
92
+ [-150n, HUNDRED, '-1.5'],
93
+ [-7n, 1n, '-7'],
94
+ ])('keeps the sign of %s pennies at %s to the geeq: %s', (pennies, penniesPerGeeq, expected) => {
95
+ expect(formatGeeq(pennies, penniesPerGeeq)).toBe(expected);
96
+ });
97
+ });
98
+ describe('penniesPerGeeq', () => {
99
+ it.each([[0n], [3n], [250n], [-10n], [100]])('refuses %s, which is not a bigint power of ten', (penniesPerGeeq) => {
100
+ expect(() => formatGeeq(1n, penniesPerGeeq)).toThrow(/power of ten/u);
101
+ expect(() => toPennies({ geeq: '1' }, penniesPerGeeq)).toThrow(/power of ten/u);
102
+ });
103
+ it('is required to connect, and checked there', async () => {
104
+ await expect(GeeqChain.connect({ endpoint: 'https://10.0.0.1:2082', penniesPerGeeq: 3n })).rejects.toThrow(/power of ten/u);
105
+ });
106
+ it("is the chain's unit for every conversion it makes", async () => {
107
+ const chain = await GeeqChain.connect({ endpoint: 'https://10.0.0.1:2082', penniesPerGeeq: HUNDRED });
108
+ expect(chain.penniesPerGeeq).toBe(HUNDRED);
109
+ expect(chain.toPennies({ geeq: '1.5' })).toBe(150n);
110
+ expect(chain.formatGeeq(150n)).toBe('1.5');
111
+ });
112
+ });
113
+ //# sourceMappingURL=amount.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amount.test.js","sourceRoot":"","sources":["../../tests/amount.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE/D,wFAAwF;AACxF,uFAAuF;AACvF,gEAAgE;AAChE,MAAM,MAAM,GAAG,WAAc,CAAA;AAC7B,MAAM,OAAO,GAAG,IAAI,CAAA;AAEpB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,IAAI,CAAC;QACN,CAAC,GAAG,EAAE,MAAM,EAAE,WAAc,CAAC;QAC7B,CAAC,KAAK,EAAE,MAAM,EAAE,WAAc,CAAC;QAC/B,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;QAC3B,CAAC,aAAa,EAAE,MAAM,EAAE,UAAY,CAAC;QACrC,CAAC,G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