@unconfirmed/effect-sui 0.0.0-stage → 0.1.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 (573) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +10 -2
  3. package/dist/Address.d.ts +18 -0
  4. package/dist/Address.d.ts.map +1 -0
  5. package/dist/Address.js +33 -0
  6. package/dist/Address.js.map +1 -0
  7. package/dist/AddressAlias.d.ts +107 -0
  8. package/dist/AddressAlias.d.ts.map +1 -0
  9. package/dist/AddressAlias.js +104 -0
  10. package/dist/AddressAlias.js.map +1 -0
  11. package/dist/Bip32.d.ts +6 -0
  12. package/dist/Bip32.d.ts.map +1 -0
  13. package/dist/Bip32.js +34 -0
  14. package/dist/Bip32.js.map +1 -0
  15. package/dist/Chain.d.ts +23 -0
  16. package/dist/Chain.d.ts.map +1 -0
  17. package/dist/Chain.js +7 -0
  18. package/dist/Chain.js.map +1 -0
  19. package/dist/CheckpointData.d.ts +74 -0
  20. package/dist/CheckpointData.d.ts.map +1 -0
  21. package/dist/CheckpointData.js +48 -0
  22. package/dist/CheckpointData.js.map +1 -0
  23. package/dist/Checkpoints.d.ts +23 -0
  24. package/dist/Checkpoints.d.ts.map +1 -0
  25. package/dist/Checkpoints.js +7 -0
  26. package/dist/Checkpoints.js.map +1 -0
  27. package/dist/CoinReservation.d.ts +18 -0
  28. package/dist/CoinReservation.d.ts.map +1 -0
  29. package/dist/CoinReservation.js +58 -0
  30. package/dist/CoinReservation.js.map +1 -0
  31. package/dist/Coins.d.ts +42 -0
  32. package/dist/Coins.d.ts.map +1 -0
  33. package/dist/Coins.js +49 -0
  34. package/dist/Coins.js.map +1 -0
  35. package/dist/DynamicFields.d.ts +115 -0
  36. package/dist/DynamicFields.d.ts.map +1 -0
  37. package/dist/DynamicFields.js +101 -0
  38. package/dist/DynamicFields.js.map +1 -0
  39. package/dist/Ecdsa.d.ts +39 -0
  40. package/dist/Ecdsa.d.ts.map +1 -0
  41. package/dist/Ecdsa.js +76 -0
  42. package/dist/Ecdsa.js.map +1 -0
  43. package/dist/Ed25519.d.ts +22 -0
  44. package/dist/Ed25519.d.ts.map +1 -0
  45. package/dist/Ed25519.js +77 -0
  46. package/dist/Ed25519.js.map +1 -0
  47. package/dist/Events.d.ts +105 -0
  48. package/dist/Events.d.ts.map +1 -0
  49. package/dist/Events.js +51 -0
  50. package/dist/Events.js.map +1 -0
  51. package/dist/Hash.d.ts +16 -0
  52. package/dist/Hash.d.ts.map +1 -0
  53. package/dist/Hash.js +32 -0
  54. package/dist/Hash.js.map +1 -0
  55. package/dist/MlDsa65.d.ts +17 -0
  56. package/dist/MlDsa65.d.ts.map +1 -0
  57. package/dist/MlDsa65.js +84 -0
  58. package/dist/MlDsa65.js.map +1 -0
  59. package/dist/Mnemonic.d.ts +20 -0
  60. package/dist/Mnemonic.d.ts.map +1 -0
  61. package/dist/Mnemonic.js +71 -0
  62. package/dist/Mnemonic.js.map +1 -0
  63. package/dist/Move.d.ts +261 -0
  64. package/dist/Move.d.ts.map +1 -0
  65. package/dist/Move.js +232 -0
  66. package/dist/Move.js.map +1 -0
  67. package/dist/MultiSig.d.ts +106 -0
  68. package/dist/MultiSig.d.ts.map +1 -0
  69. package/dist/MultiSig.js +254 -0
  70. package/dist/MultiSig.js.map +1 -0
  71. package/dist/Objects.d.ts +95 -0
  72. package/dist/Objects.d.ts.map +1 -0
  73. package/dist/Objects.js +57 -0
  74. package/dist/Objects.js.map +1 -0
  75. package/dist/Packages.d.ts +49 -0
  76. package/dist/Packages.d.ts.map +1 -0
  77. package/dist/Packages.js +16 -0
  78. package/dist/Packages.js.map +1 -0
  79. package/dist/Passkey.d.ts +11 -0
  80. package/dist/Passkey.d.ts.map +1 -0
  81. package/dist/Passkey.js +11 -0
  82. package/dist/Passkey.js.map +1 -0
  83. package/dist/PrivateKey.d.ts +39 -0
  84. package/dist/PrivateKey.d.ts.map +1 -0
  85. package/dist/PrivateKey.js +118 -0
  86. package/dist/PrivateKey.js.map +1 -0
  87. package/dist/Ptb.d.ts +413 -0
  88. package/dist/Ptb.d.ts.map +1 -0
  89. package/dist/Ptb.js +338 -0
  90. package/dist/Ptb.js.map +1 -0
  91. package/dist/Resolve.d.ts +502 -0
  92. package/dist/Resolve.d.ts.map +1 -0
  93. package/dist/Resolve.js +1188 -0
  94. package/dist/Resolve.js.map +1 -0
  95. package/dist/RpcError.d.ts +19 -0
  96. package/dist/RpcError.d.ts.map +1 -0
  97. package/dist/RpcError.js +37 -0
  98. package/dist/RpcError.js.map +1 -0
  99. package/dist/Secp256k1.d.ts +11 -0
  100. package/dist/Secp256k1.d.ts.map +1 -0
  101. package/dist/Secp256k1.js +23 -0
  102. package/dist/Secp256k1.js.map +1 -0
  103. package/dist/Secp256r1.d.ts +11 -0
  104. package/dist/Secp256r1.d.ts.map +1 -0
  105. package/dist/Secp256r1.js +23 -0
  106. package/dist/Secp256r1.js.map +1 -0
  107. package/dist/SignatureScheme.d.ts +103 -0
  108. package/dist/SignatureScheme.d.ts.map +1 -0
  109. package/dist/SignatureScheme.js +93 -0
  110. package/dist/SignatureScheme.js.map +1 -0
  111. package/dist/Signer.d.ts +54 -0
  112. package/dist/Signer.d.ts.map +1 -0
  113. package/dist/Signer.js +31 -0
  114. package/dist/Signer.js.map +1 -0
  115. package/dist/Testing.d.ts +171 -0
  116. package/dist/Testing.d.ts.map +1 -0
  117. package/dist/Testing.js +531 -0
  118. package/dist/Testing.js.map +1 -0
  119. package/dist/TransactionData.d.ts +3218 -0
  120. package/dist/TransactionData.d.ts.map +1 -0
  121. package/dist/TransactionData.js +105 -0
  122. package/dist/TransactionData.js.map +1 -0
  123. package/dist/TransactionJson.d.ts +1544 -0
  124. package/dist/TransactionJson.d.ts.map +1 -0
  125. package/dist/TransactionJson.js +926 -0
  126. package/dist/TransactionJson.js.map +1 -0
  127. package/dist/Transactions.d.ts +181 -0
  128. package/dist/Transactions.d.ts.map +1 -0
  129. package/dist/Transactions.js +49 -0
  130. package/dist/Transactions.js.map +1 -0
  131. package/dist/Tx.d.ts +1419 -0
  132. package/dist/Tx.d.ts.map +1 -0
  133. package/dist/Tx.js +266 -0
  134. package/dist/Tx.js.map +1 -0
  135. package/dist/TypeTag.d.ts +42 -0
  136. package/dist/TypeTag.d.ts.map +1 -0
  137. package/dist/TypeTag.js +110 -0
  138. package/dist/TypeTag.js.map +1 -0
  139. package/dist/Verify.d.ts +23 -0
  140. package/dist/Verify.d.ts.map +1 -0
  141. package/dist/Verify.js +29 -0
  142. package/dist/Verify.js.map +1 -0
  143. package/dist/enoki/EnokiClient.d.ts +184 -0
  144. package/dist/enoki/EnokiClient.d.ts.map +1 -0
  145. package/dist/enoki/EnokiClient.js +105 -0
  146. package/dist/enoki/EnokiClient.js.map +1 -0
  147. package/dist/enoki/EnokiHttp.d.ts +33 -0
  148. package/dist/enoki/EnokiHttp.d.ts.map +1 -0
  149. package/dist/enoki/EnokiHttp.js +160 -0
  150. package/dist/enoki/EnokiHttp.js.map +1 -0
  151. package/dist/enoki/Sponsor.d.ts +119 -0
  152. package/dist/enoki/Sponsor.d.ts.map +1 -0
  153. package/dist/enoki/Sponsor.js +170 -0
  154. package/dist/enoki/Sponsor.js.map +1 -0
  155. package/dist/enoki/ZkLoginFlow.d.ts +84 -0
  156. package/dist/enoki/ZkLoginFlow.d.ts.map +1 -0
  157. package/dist/enoki/ZkLoginFlow.js +138 -0
  158. package/dist/enoki/ZkLoginFlow.js.map +1 -0
  159. package/dist/enoki/index.d.ts +9 -0
  160. package/dist/enoki/index.d.ts.map +1 -0
  161. package/dist/enoki/index.js +9 -0
  162. package/dist/enoki/index.js.map +1 -0
  163. package/dist/graphql/ChainGraphQL.d.ts +35 -0
  164. package/dist/graphql/ChainGraphQL.d.ts.map +1 -0
  165. package/dist/graphql/ChainGraphQL.js +62 -0
  166. package/dist/graphql/ChainGraphQL.js.map +1 -0
  167. package/dist/graphql/CheckpointDataGraphQL.d.ts +785 -0
  168. package/dist/graphql/CheckpointDataGraphQL.d.ts.map +1 -0
  169. package/dist/graphql/CheckpointDataGraphQL.js +157 -0
  170. package/dist/graphql/CheckpointDataGraphQL.js.map +1 -0
  171. package/dist/graphql/CheckpointsGraphQL.d.ts +91 -0
  172. package/dist/graphql/CheckpointsGraphQL.d.ts.map +1 -0
  173. package/dist/graphql/CheckpointsGraphQL.js +80 -0
  174. package/dist/graphql/CheckpointsGraphQL.js.map +1 -0
  175. package/dist/graphql/CoinsGraphQL.d.ts +81 -0
  176. package/dist/graphql/CoinsGraphQL.d.ts.map +1 -0
  177. package/dist/graphql/CoinsGraphQL.js +63 -0
  178. package/dist/graphql/CoinsGraphQL.js.map +1 -0
  179. package/dist/graphql/DynamicFieldsGraphQL.d.ts +94 -0
  180. package/dist/graphql/DynamicFieldsGraphQL.d.ts.map +1 -0
  181. package/dist/graphql/DynamicFieldsGraphQL.js +126 -0
  182. package/dist/graphql/DynamicFieldsGraphQL.js.map +1 -0
  183. package/dist/graphql/EventsGraphQL.d.ts +266 -0
  184. package/dist/graphql/EventsGraphQL.d.ts.map +1 -0
  185. package/dist/graphql/EventsGraphQL.js +249 -0
  186. package/dist/graphql/EventsGraphQL.js.map +1 -0
  187. package/dist/graphql/ObjectsGraphQL.d.ts +130 -0
  188. package/dist/graphql/ObjectsGraphQL.d.ts.map +1 -0
  189. package/dist/graphql/ObjectsGraphQL.js +79 -0
  190. package/dist/graphql/ObjectsGraphQL.js.map +1 -0
  191. package/dist/graphql/PackagesGraphQL.d.ts +82 -0
  192. package/dist/graphql/PackagesGraphQL.d.ts.map +1 -0
  193. package/dist/graphql/PackagesGraphQL.js +145 -0
  194. package/dist/graphql/PackagesGraphQL.js.map +1 -0
  195. package/dist/graphql/SuiGraphQL.d.ts +37 -0
  196. package/dist/graphql/SuiGraphQL.d.ts.map +1 -0
  197. package/dist/graphql/SuiGraphQL.js +47 -0
  198. package/dist/graphql/SuiGraphQL.js.map +1 -0
  199. package/dist/graphql/TransactionsGraphQL.d.ts +1309 -0
  200. package/dist/graphql/TransactionsGraphQL.d.ts.map +1 -0
  201. package/dist/graphql/TransactionsGraphQL.js +206 -0
  202. package/dist/graphql/TransactionsGraphQL.js.map +1 -0
  203. package/dist/graphql/convert.d.ts +505 -0
  204. package/dist/graphql/convert.d.ts.map +1 -0
  205. package/dist/graphql/convert.js +384 -0
  206. package/dist/graphql/convert.js.map +1 -0
  207. package/dist/graphql/index.d.ts +41 -0
  208. package/dist/graphql/index.d.ts.map +1 -0
  209. package/dist/graphql/index.js +20 -0
  210. package/dist/graphql/index.js.map +1 -0
  211. package/dist/graphql/merge.d.ts +8 -0
  212. package/dist/graphql/merge.d.ts.map +1 -0
  213. package/dist/graphql/merge.js +55 -0
  214. package/dist/graphql/merge.js.map +1 -0
  215. package/dist/graphql/paging.d.ts +219 -0
  216. package/dist/graphql/paging.d.ts.map +1 -0
  217. package/dist/graphql/paging.js +74 -0
  218. package/dist/graphql/paging.js.map +1 -0
  219. package/dist/graphql/subscription.d.ts +27 -0
  220. package/dist/graphql/subscription.d.ts.map +1 -0
  221. package/dist/graphql/subscription.js +47 -0
  222. package/dist/graphql/subscription.js.map +1 -0
  223. package/dist/graphql/tip.d.ts +31 -0
  224. package/dist/graphql/tip.d.ts.map +1 -0
  225. package/dist/graphql/tip.js +29 -0
  226. package/dist/graphql/tip.js.map +1 -0
  227. package/dist/grpc/ChainGrpc.d.ts +11 -0
  228. package/dist/grpc/ChainGrpc.d.ts.map +1 -0
  229. package/dist/grpc/ChainGrpc.js +40 -0
  230. package/dist/grpc/ChainGrpc.js.map +1 -0
  231. package/dist/grpc/CheckpointDataGrpc.d.ts +6 -0
  232. package/dist/grpc/CheckpointDataGrpc.d.ts.map +1 -0
  233. package/dist/grpc/CheckpointDataGrpc.js +27 -0
  234. package/dist/grpc/CheckpointDataGrpc.js.map +1 -0
  235. package/dist/grpc/CheckpointsGrpc.d.ts +6 -0
  236. package/dist/grpc/CheckpointsGrpc.d.ts.map +1 -0
  237. package/dist/grpc/CheckpointsGrpc.js +25 -0
  238. package/dist/grpc/CheckpointsGrpc.js.map +1 -0
  239. package/dist/grpc/CoinsGrpc.d.ts +7 -0
  240. package/dist/grpc/CoinsGrpc.d.ts.map +1 -0
  241. package/dist/grpc/CoinsGrpc.js +34 -0
  242. package/dist/grpc/CoinsGrpc.js.map +1 -0
  243. package/dist/grpc/DynamicFieldsGrpc.d.ts +11 -0
  244. package/dist/grpc/DynamicFieldsGrpc.d.ts.map +1 -0
  245. package/dist/grpc/DynamicFieldsGrpc.js +91 -0
  246. package/dist/grpc/DynamicFieldsGrpc.js.map +1 -0
  247. package/dist/grpc/EventsGrpc.d.ts +13 -0
  248. package/dist/grpc/EventsGrpc.d.ts.map +1 -0
  249. package/dist/grpc/EventsGrpc.js +88 -0
  250. package/dist/grpc/EventsGrpc.js.map +1 -0
  251. package/dist/grpc/GrpcWeb.d.ts +71 -0
  252. package/dist/grpc/GrpcWeb.d.ts.map +1 -0
  253. package/dist/grpc/GrpcWeb.js +243 -0
  254. package/dist/grpc/GrpcWeb.js.map +1 -0
  255. package/dist/grpc/ObjectsGrpc.d.ts +10 -0
  256. package/dist/grpc/ObjectsGrpc.d.ts.map +1 -0
  257. package/dist/grpc/ObjectsGrpc.js +72 -0
  258. package/dist/grpc/ObjectsGrpc.js.map +1 -0
  259. package/dist/grpc/PackagesGrpc.d.ts +9 -0
  260. package/dist/grpc/PackagesGrpc.d.ts.map +1 -0
  261. package/dist/grpc/PackagesGrpc.js +78 -0
  262. package/dist/grpc/PackagesGrpc.js.map +1 -0
  263. package/dist/grpc/Rpc.d.ts +46 -0
  264. package/dist/grpc/Rpc.d.ts.map +1 -0
  265. package/dist/grpc/Rpc.js +111 -0
  266. package/dist/grpc/Rpc.js.map +1 -0
  267. package/dist/grpc/TransactionsGrpc.d.ts +6 -0
  268. package/dist/grpc/TransactionsGrpc.d.ts.map +1 -0
  269. package/dist/grpc/TransactionsGrpc.js +56 -0
  270. package/dist/grpc/TransactionsGrpc.js.map +1 -0
  271. package/dist/grpc/cache.d.ts +7 -0
  272. package/dist/grpc/cache.d.ts.map +1 -0
  273. package/dist/grpc/cache.js +55 -0
  274. package/dist/grpc/cache.js.map +1 -0
  275. package/dist/grpc/convert.d.ts +43 -0
  276. package/dist/grpc/convert.d.ts.map +1 -0
  277. package/dist/grpc/convert.js +198 -0
  278. package/dist/grpc/convert.js.map +1 -0
  279. package/dist/grpc/generated/lean.d.ts +36 -0
  280. package/dist/grpc/generated/lean.d.ts.map +1 -0
  281. package/dist/grpc/generated/lean.js +205 -0
  282. package/dist/grpc/generated/lean.js.map +1 -0
  283. package/dist/grpc/generated/proto.d.ts +2000 -0
  284. package/dist/grpc/generated/proto.d.ts.map +1 -0
  285. package/dist/grpc/generated/proto.js +356 -0
  286. package/dist/grpc/generated/proto.js.map +1 -0
  287. package/dist/grpc/generated/rpc.d.ts +62 -0
  288. package/dist/grpc/generated/rpc.d.ts.map +1 -0
  289. package/dist/grpc/generated/rpc.js +324 -0
  290. package/dist/grpc/generated/rpc.js.map +1 -0
  291. package/dist/grpc/index.d.ts +58 -0
  292. package/dist/grpc/index.d.ts.map +1 -0
  293. package/dist/grpc/index.js +43 -0
  294. package/dist/grpc/index.js.map +1 -0
  295. package/dist/grpc/scan.d.ts +79 -0
  296. package/dist/grpc/scan.d.ts.map +1 -0
  297. package/dist/grpc/scan.js +126 -0
  298. package/dist/grpc/scan.js.map +1 -0
  299. package/dist/grpc/transaction.d.ts +9 -0
  300. package/dist/grpc/transaction.d.ts.map +1 -0
  301. package/dist/grpc/transaction.js +168 -0
  302. package/dist/grpc/transaction.js.map +1 -0
  303. package/dist/index.d.ts +36 -0
  304. package/dist/index.d.ts.map +1 -0
  305. package/dist/index.js +36 -0
  306. package/dist/index.js.map +1 -0
  307. package/dist/internal/allowances.d.ts +18 -0
  308. package/dist/internal/allowances.d.ts.map +1 -0
  309. package/dist/internal/allowances.js +194 -0
  310. package/dist/internal/allowances.js.map +1 -0
  311. package/dist/internal/mnemonic.d.ts +53 -0
  312. package/dist/internal/mnemonic.d.ts.map +1 -0
  313. package/dist/internal/mnemonic.js +66 -0
  314. package/dist/internal/mnemonic.js.map +1 -0
  315. package/dist/internal/passkey/BrowserProvider.d.ts +10 -0
  316. package/dist/internal/passkey/BrowserProvider.d.ts.map +1 -0
  317. package/dist/internal/passkey/BrowserProvider.js +101 -0
  318. package/dist/internal/passkey/BrowserProvider.js.map +1 -0
  319. package/dist/internal/passkey/Passkey.d.ts +104 -0
  320. package/dist/internal/passkey/Passkey.d.ts.map +1 -0
  321. package/dist/internal/passkey/Passkey.js +333 -0
  322. package/dist/internal/passkey/Passkey.js.map +1 -0
  323. package/dist/internal/passkey/SoftwareProvider.d.ts +23 -0
  324. package/dist/internal/passkey/SoftwareProvider.d.ts.map +1 -0
  325. package/dist/internal/passkey/SoftwareProvider.js +61 -0
  326. package/dist/internal/passkey/SoftwareProvider.js.map +1 -0
  327. package/dist/lifecycle/Evidence.d.ts +62 -0
  328. package/dist/lifecycle/Evidence.d.ts.map +1 -0
  329. package/dist/lifecycle/Evidence.js +30 -0
  330. package/dist/lifecycle/Evidence.js.map +1 -0
  331. package/dist/lifecycle/EvidenceGraphQL.d.ts +59 -0
  332. package/dist/lifecycle/EvidenceGraphQL.d.ts.map +1 -0
  333. package/dist/lifecycle/EvidenceGraphQL.js +53 -0
  334. package/dist/lifecycle/EvidenceGraphQL.js.map +1 -0
  335. package/dist/lifecycle/EvidenceGrpc.d.ts +4 -0
  336. package/dist/lifecycle/EvidenceGrpc.d.ts.map +1 -0
  337. package/dist/lifecycle/EvidenceGrpc.js +37 -0
  338. package/dist/lifecycle/EvidenceGrpc.js.map +1 -0
  339. package/dist/lifecycle/Journal.d.ts +69 -0
  340. package/dist/lifecycle/Journal.d.ts.map +1 -0
  341. package/dist/lifecycle/Journal.js +70 -0
  342. package/dist/lifecycle/Journal.js.map +1 -0
  343. package/dist/lifecycle/JournalEntry.d.ts +67 -0
  344. package/dist/lifecycle/JournalEntry.d.ts.map +1 -0
  345. package/dist/lifecycle/JournalEntry.js +45 -0
  346. package/dist/lifecycle/JournalEntry.js.map +1 -0
  347. package/dist/lifecycle/JournalKeyValueStore.d.ts +30 -0
  348. package/dist/lifecycle/JournalKeyValueStore.d.ts.map +1 -0
  349. package/dist/lifecycle/JournalKeyValueStore.js +217 -0
  350. package/dist/lifecycle/JournalKeyValueStore.js.map +1 -0
  351. package/dist/lifecycle/KeyValueStoreIndexedDb.d.ts +54 -0
  352. package/dist/lifecycle/KeyValueStoreIndexedDb.d.ts.map +1 -0
  353. package/dist/lifecycle/KeyValueStoreIndexedDb.js +321 -0
  354. package/dist/lifecycle/KeyValueStoreIndexedDb.js.map +1 -0
  355. package/dist/lifecycle/KeyValueStoreOpfs.d.ts +65 -0
  356. package/dist/lifecycle/KeyValueStoreOpfs.d.ts.map +1 -0
  357. package/dist/lifecycle/KeyValueStoreOpfs.js +207 -0
  358. package/dist/lifecycle/KeyValueStoreOpfs.js.map +1 -0
  359. package/dist/lifecycle/Lifecycle.d.ts +416 -0
  360. package/dist/lifecycle/Lifecycle.d.ts.map +1 -0
  361. package/dist/lifecycle/Lifecycle.js +666 -0
  362. package/dist/lifecycle/Lifecycle.js.map +1 -0
  363. package/dist/lifecycle/Outcome.d.ts +132 -0
  364. package/dist/lifecycle/Outcome.d.ts.map +1 -0
  365. package/dist/lifecycle/Outcome.js +106 -0
  366. package/dist/lifecycle/Outcome.js.map +1 -0
  367. package/dist/lifecycle/SenderLock.d.ts +37 -0
  368. package/dist/lifecycle/SenderLock.d.ts.map +1 -0
  369. package/dist/lifecycle/SenderLock.js +57 -0
  370. package/dist/lifecycle/SenderLock.js.map +1 -0
  371. package/dist/lifecycle/SenderLockWebLocks.d.ts +37 -0
  372. package/dist/lifecycle/SenderLockWebLocks.d.ts.map +1 -0
  373. package/dist/lifecycle/SenderLockWebLocks.js +100 -0
  374. package/dist/lifecycle/SenderLockWebLocks.js.map +1 -0
  375. package/dist/lifecycle/SignedTransaction.d.ts +55 -0
  376. package/dist/lifecycle/SignedTransaction.d.ts.map +1 -0
  377. package/dist/lifecycle/SignedTransaction.js +109 -0
  378. package/dist/lifecycle/SignedTransaction.js.map +1 -0
  379. package/dist/lifecycle/SubmitConfig.d.ts +44 -0
  380. package/dist/lifecycle/SubmitConfig.d.ts.map +1 -0
  381. package/dist/lifecycle/SubmitConfig.js +39 -0
  382. package/dist/lifecycle/SubmitConfig.js.map +1 -0
  383. package/dist/lifecycle/index.d.ts +13 -0
  384. package/dist/lifecycle/index.d.ts.map +1 -0
  385. package/dist/lifecycle/index.js +13 -0
  386. package/dist/lifecycle/index.js.map +1 -0
  387. package/dist/wallet/Connection.d.ts +119 -0
  388. package/dist/wallet/Connection.d.ts.map +1 -0
  389. package/dist/wallet/Connection.js +197 -0
  390. package/dist/wallet/Connection.js.map +1 -0
  391. package/dist/wallet/Features.d.ts +91 -0
  392. package/dist/wallet/Features.d.ts.map +1 -0
  393. package/dist/wallet/Features.js +14 -0
  394. package/dist/wallet/Features.js.map +1 -0
  395. package/dist/wallet/Wallet.d.ts +151 -0
  396. package/dist/wallet/Wallet.d.ts.map +1 -0
  397. package/dist/wallet/Wallet.js +399 -0
  398. package/dist/wallet/Wallet.js.map +1 -0
  399. package/dist/wallet/index.d.ts +7 -0
  400. package/dist/wallet/index.d.ts.map +1 -0
  401. package/dist/wallet/index.js +7 -0
  402. package/dist/wallet/index.js.map +1 -0
  403. package/dist/zklogin/AddressSeed.d.ts +40 -0
  404. package/dist/zklogin/AddressSeed.d.ts.map +1 -0
  405. package/dist/zklogin/AddressSeed.js +91 -0
  406. package/dist/zklogin/AddressSeed.js.map +1 -0
  407. package/dist/zklogin/Errors.d.ts +24 -0
  408. package/dist/zklogin/Errors.d.ts.map +1 -0
  409. package/dist/zklogin/Errors.js +25 -0
  410. package/dist/zklogin/Errors.js.map +1 -0
  411. package/dist/zklogin/Jwt.d.ts +51 -0
  412. package/dist/zklogin/Jwt.d.ts.map +1 -0
  413. package/dist/zklogin/Jwt.js +159 -0
  414. package/dist/zklogin/Jwt.js.map +1 -0
  415. package/dist/zklogin/Nonce.d.ts +9 -0
  416. package/dist/zklogin/Nonce.d.ts.map +1 -0
  417. package/dist/zklogin/Nonce.js +34 -0
  418. package/dist/zklogin/Nonce.js.map +1 -0
  419. package/dist/zklogin/Poseidon.d.ts +24 -0
  420. package/dist/zklogin/Poseidon.d.ts.map +1 -0
  421. package/dist/zklogin/Poseidon.js +54 -0
  422. package/dist/zklogin/Poseidon.js.map +1 -0
  423. package/dist/zklogin/PublicIdentifier.d.ts +49 -0
  424. package/dist/zklogin/PublicIdentifier.d.ts.map +1 -0
  425. package/dist/zklogin/PublicIdentifier.js +90 -0
  426. package/dist/zklogin/PublicIdentifier.js.map +1 -0
  427. package/dist/zklogin/Signature.d.ts +55 -0
  428. package/dist/zklogin/Signature.d.ts.map +1 -0
  429. package/dist/zklogin/Signature.js +70 -0
  430. package/dist/zklogin/Signature.js.map +1 -0
  431. package/dist/zklogin/ZkLogin.d.ts +41 -0
  432. package/dist/zklogin/ZkLogin.d.ts.map +1 -0
  433. package/dist/zklogin/ZkLogin.js +87 -0
  434. package/dist/zklogin/ZkLogin.js.map +1 -0
  435. package/dist/zklogin/ZkLoginAddress.d.ts +30 -0
  436. package/dist/zklogin/ZkLoginAddress.d.ts.map +1 -0
  437. package/dist/zklogin/ZkLoginAddress.js +31 -0
  438. package/dist/zklogin/ZkLoginAddress.js.map +1 -0
  439. package/dist/zklogin/ZkLoginVerifier.d.ts +37 -0
  440. package/dist/zklogin/ZkLoginVerifier.d.ts.map +1 -0
  441. package/dist/zklogin/ZkLoginVerifier.js +4 -0
  442. package/dist/zklogin/ZkLoginVerifier.js.map +1 -0
  443. package/dist/zklogin/ZkLoginVerifierGrpc.d.ts +12 -0
  444. package/dist/zklogin/ZkLoginVerifierGrpc.d.ts.map +1 -0
  445. package/dist/zklogin/ZkLoginVerifierGrpc.js +53 -0
  446. package/dist/zklogin/ZkLoginVerifierGrpc.js.map +1 -0
  447. package/dist/zklogin/index.d.ts +17 -0
  448. package/dist/zklogin/index.d.ts.map +1 -0
  449. package/dist/zklogin/index.js +17 -0
  450. package/dist/zklogin/index.js.map +1 -0
  451. package/dist/zklogin/internal/parse.d.ts +9 -0
  452. package/dist/zklogin/internal/parse.d.ts.map +1 -0
  453. package/dist/zklogin/internal/parse.js +33 -0
  454. package/dist/zklogin/internal/parse.js.map +1 -0
  455. package/dist/zklogin/internal/poseidon.d.ts +21 -0
  456. package/dist/zklogin/internal/poseidon.d.ts.map +1 -0
  457. package/dist/zklogin/internal/poseidon.js +40 -0
  458. package/dist/zklogin/internal/poseidon.js.map +1 -0
  459. package/package.json +69 -4
  460. package/src/Address.ts +45 -0
  461. package/src/AddressAlias.ts +160 -0
  462. package/src/Bip32.ts +37 -0
  463. package/src/Chain.ts +21 -0
  464. package/src/CheckpointData.ts +106 -0
  465. package/src/Checkpoints.ts +18 -0
  466. package/src/CoinReservation.ts +65 -0
  467. package/src/Coins.ts +86 -0
  468. package/src/DynamicFields.ts +179 -0
  469. package/src/Ecdsa.ts +103 -0
  470. package/src/Ed25519.ts +84 -0
  471. package/src/Events.ts +133 -0
  472. package/src/Hash.ts +39 -0
  473. package/src/MlDsa65.ts +92 -0
  474. package/src/Mnemonic.ts +109 -0
  475. package/src/Move.ts +440 -0
  476. package/src/MultiSig.ts +320 -0
  477. package/src/Objects.ts +112 -0
  478. package/src/Packages.ts +52 -0
  479. package/src/Passkey.ts +10 -0
  480. package/src/PrivateKey.ts +138 -0
  481. package/src/Ptb.ts +579 -0
  482. package/src/Resolve.ts +1367 -0
  483. package/src/RpcError.ts +41 -0
  484. package/src/Secp256k1.ts +29 -0
  485. package/src/Secp256r1.ts +29 -0
  486. package/src/SignatureScheme.ts +166 -0
  487. package/src/Signer.ts +62 -0
  488. package/src/Testing.ts +830 -0
  489. package/src/TransactionData.ts +134 -0
  490. package/src/TransactionJson.ts +1002 -0
  491. package/src/Transactions.ts +211 -0
  492. package/src/Tx.ts +367 -0
  493. package/src/TypeTag.ts +123 -0
  494. package/src/Verify.ts +42 -0
  495. package/src/enoki/EnokiClient.ts +204 -0
  496. package/src/enoki/EnokiHttp.ts +222 -0
  497. package/src/enoki/Sponsor.ts +280 -0
  498. package/src/enoki/ZkLoginFlow.ts +176 -0
  499. package/src/enoki/index.ts +8 -0
  500. package/src/graphql/ChainGraphQL.ts +76 -0
  501. package/src/graphql/CheckpointDataGraphQL.ts +191 -0
  502. package/src/graphql/CheckpointsGraphQL.ts +96 -0
  503. package/src/graphql/CoinsGraphQL.ts +85 -0
  504. package/src/graphql/DynamicFieldsGraphQL.ts +167 -0
  505. package/src/graphql/EventsGraphQL.ts +301 -0
  506. package/src/graphql/ObjectsGraphQL.ts +112 -0
  507. package/src/graphql/PackagesGraphQL.ts +173 -0
  508. package/src/graphql/SuiGraphQL.ts +77 -0
  509. package/src/graphql/TransactionsGraphQL.ts +292 -0
  510. package/src/graphql/convert.ts +450 -0
  511. package/src/graphql/index.ts +74 -0
  512. package/src/graphql/merge.ts +62 -0
  513. package/src/graphql/paging.ts +110 -0
  514. package/src/graphql/subscription.ts +58 -0
  515. package/src/graphql/tip.ts +38 -0
  516. package/src/grpc/ChainGrpc.ts +51 -0
  517. package/src/grpc/CheckpointDataGrpc.ts +47 -0
  518. package/src/grpc/CheckpointsGrpc.ts +37 -0
  519. package/src/grpc/CoinsGrpc.ts +50 -0
  520. package/src/grpc/DynamicFieldsGrpc.ts +128 -0
  521. package/src/grpc/EventsGrpc.ts +101 -0
  522. package/src/grpc/GrpcWeb.ts +343 -0
  523. package/src/grpc/ObjectsGrpc.ts +95 -0
  524. package/src/grpc/PackagesGrpc.ts +98 -0
  525. package/src/grpc/Rpc.ts +156 -0
  526. package/src/grpc/TransactionsGrpc.ts +88 -0
  527. package/src/grpc/cache.ts +68 -0
  528. package/src/grpc/convert.ts +227 -0
  529. package/src/grpc/generated/lean.ts +276 -0
  530. package/src/grpc/generated/proto.ts +2130 -0
  531. package/src/grpc/generated/rpc.ts +417 -0
  532. package/src/grpc/index.ts +97 -0
  533. package/src/grpc/scan.ts +183 -0
  534. package/src/grpc/transaction.ts +182 -0
  535. package/src/index.ts +35 -0
  536. package/src/internal/allowances.ts +238 -0
  537. package/src/internal/mnemonic.ts +99 -0
  538. package/src/internal/passkey/BrowserProvider.ts +131 -0
  539. package/src/internal/passkey/Passkey.ts +408 -0
  540. package/src/internal/passkey/SoftwareProvider.ts +90 -0
  541. package/src/lifecycle/Evidence.ts +85 -0
  542. package/src/lifecycle/EvidenceGraphQL.ts +67 -0
  543. package/src/lifecycle/EvidenceGrpc.ts +47 -0
  544. package/src/lifecycle/Journal.ts +117 -0
  545. package/src/lifecycle/JournalEntry.ts +68 -0
  546. package/src/lifecycle/JournalKeyValueStore.ts +276 -0
  547. package/src/lifecycle/KeyValueStoreIndexedDb.ts +361 -0
  548. package/src/lifecycle/KeyValueStoreOpfs.ts +230 -0
  549. package/src/lifecycle/Lifecycle.ts +990 -0
  550. package/src/lifecycle/Outcome.ts +130 -0
  551. package/src/lifecycle/SenderLock.ts +73 -0
  552. package/src/lifecycle/SenderLockWebLocks.ts +136 -0
  553. package/src/lifecycle/SignedTransaction.ts +133 -0
  554. package/src/lifecycle/SubmitConfig.ts +77 -0
  555. package/src/lifecycle/index.ts +12 -0
  556. package/src/wallet/Connection.ts +323 -0
  557. package/src/wallet/Features.ts +114 -0
  558. package/src/wallet/Wallet.ts +550 -0
  559. package/src/wallet/index.ts +6 -0
  560. package/src/zklogin/AddressSeed.ts +130 -0
  561. package/src/zklogin/Errors.ts +27 -0
  562. package/src/zklogin/Jwt.ts +186 -0
  563. package/src/zklogin/Nonce.ts +46 -0
  564. package/src/zklogin/Poseidon.ts +62 -0
  565. package/src/zklogin/PublicIdentifier.ts +111 -0
  566. package/src/zklogin/Signature.ts +88 -0
  567. package/src/zklogin/ZkLogin.ts +145 -0
  568. package/src/zklogin/ZkLoginAddress.ts +72 -0
  569. package/src/zklogin/ZkLoginVerifier.ts +37 -0
  570. package/src/zklogin/ZkLoginVerifierGrpc.ts +66 -0
  571. package/src/zklogin/index.ts +16 -0
  572. package/src/zklogin/internal/parse.ts +30 -0
  573. package/src/zklogin/internal/poseidon.ts +47 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
- # Temporary Holding Version
1
+ # @unconfirmed/effect-sui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A ground-up Effect SDK for Sui: transactions, signers and signature schemes (Ed25519, Secp256k1/r1, ML-DSA-65, multisig, passkeys, zkLogin), mnemonics, gRPC and GraphQL clients, crash-safe submission, wallets and Enoki.
4
+
5
+ ```sh
6
+ npm install @unconfirmed/effect-sui @unconfirmed/effect-bcs effect
7
+ ```
8
+
9
+ Documentation: https://github.com/unconfirmedlabs/effect-packages#readme. Source: https://github.com/unconfirmedlabs/effect-packages/tree/main/packages/effect-sui.
10
+
11
+ Licensed under Apache-2.0.
@@ -0,0 +1,18 @@
1
+ import * as Bcs from "@unconfirmed/effect-bcs/Bcs";
2
+ import * as Schema from "effect/Schema";
3
+ /** The branded, normalized address. Also its BCS layout (32 raw bytes). */
4
+ export declare const Address: Schema.brand<Schema.String, "Address">;
5
+ export type Address = Bcs.Address;
6
+ /** Normalize `0x2`, `0X02` or unprefixed hex. Throws on anything else: use for literals you control. */
7
+ export declare const normalize: (s: string) => Address;
8
+ /** Decode a value someone typed: exactly 64 hex digits, `0x` optional. A truncated paste is an error, not a padded address. */
9
+ export declare const Strict: Schema.Codec<Address, string>;
10
+ export declare const fromBytes: (bytes: Uint8Array) => Address;
11
+ /** `blake2b256(flag || publicKey)`, the address of a single-key scheme. */
12
+ export declare const fromPublicKey: (flag: number, publicKey: Uint8Array) => Address;
13
+ export declare const ZERO: string & import("effect/Brand").Brand<"Address">;
14
+ export declare const SUI_FRAMEWORK: string & import("effect/Brand").Brand<"Address">;
15
+ export declare const SUI_SYSTEM: string & import("effect/Brand").Brand<"Address">;
16
+ export declare const CLOCK: string & import("effect/Brand").Brand<"Address">;
17
+ export declare const RANDOM: string & import("effect/Brand").Brand<"Address">;
18
+ //# sourceMappingURL=Address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Address.d.ts","sources":["../src/Address.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,2EAA2E;AAC3E,eAAO,MAAM,OAAO,wCAAc,CAAA;AAClC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;AAGjC,wGAAwG;AACxG,eAAO,MAAM,SAAS,GAAI,GAAG,MAAM,KAAG,OAIrC,CAAA;AAED,+HAA+H;AAC/H,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAMzC,CAAA;AAER,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,KAAG,OAAiD,CAAA;AAE/F,2EAA2E;AAC3E,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,WAAW,UAAU,KAAG,OAKnE,CAAA;AAED,eAAO,MAAM,IAAI,kDAAmC,CAAA;AACpD,eAAO,MAAM,aAAa,kDAAmC,CAAA;AAC7D,eAAO,MAAM,UAAU,kDAAmC,CAAA;AAC1D,eAAO,MAAM,KAAK,kDAAmC,CAAA;AACrD,eAAO,MAAM,MAAM,kDAAmC,CAAA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Sui addresses and object ids: 32 bytes, shown as `0x` + 64 lowercase hex.
3
+ */
4
+ import { blake2b } from "@noble/hashes/blake2.js";
5
+ import * as Bcs from "@unconfirmed/effect-bcs/Bcs";
6
+ import * as Schema from "effect/Schema";
7
+ import * as SchemaTransformation from "effect/SchemaTransformation";
8
+ import * as Bytes from "@unconfirmed/effect-bcs/Bytes";
9
+ /** The branded, normalized address. Also its BCS layout (32 raw bytes). */
10
+ export const Address = Bcs.Address;
11
+ /** Normalize `0x2`, `0X02` or unprefixed hex. Throws on anything else: use for literals you control. */
12
+ export const normalize = (s) => {
13
+ const h = s.toLowerCase().replace(/^0x/, "");
14
+ if (!/^[0-9a-f]{1,64}$/.test(h))
15
+ throw new Error(`invalid Sui address: ${s}`);
16
+ return ("0x" + h.padStart(64, "0"));
17
+ };
18
+ /** Decode a value someone typed: exactly 64 hex digits, `0x` optional. A truncated paste is an error, not a padded address. */
19
+ export const Strict = /* @__PURE__ */ Schema.String.pipe(Schema.check(Schema.isPattern(/^(0x)?[0-9a-fA-F]{64}$/)), Schema.decodeTo(Address, SchemaTransformation.transform({ decode: (s) => normalize(s), encode: (a) => a })));
20
+ export const fromBytes = (bytes) => ("0x" + Bytes.toHex(bytes));
21
+ /** `blake2b256(flag || publicKey)`, the address of a single-key scheme. */
22
+ export const fromPublicKey = (flag, publicKey) => {
23
+ const input = new Uint8Array(1 + publicKey.length);
24
+ input[0] = flag;
25
+ input.set(publicKey, 1);
26
+ return fromBytes(blake2b(input, { dkLen: 32 }));
27
+ };
28
+ export const ZERO = /* @__PURE__ */ normalize("0x0");
29
+ export const SUI_FRAMEWORK = /* @__PURE__ */ normalize("0x2");
30
+ export const SUI_SYSTEM = /* @__PURE__ */ normalize("0x3");
31
+ export const CLOCK = /* @__PURE__ */ normalize("0x6");
32
+ export const RANDOM = /* @__PURE__ */ normalize("0x8");
33
+ //# sourceMappingURL=Address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Address.js","sources":["../src/Address.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAA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AC,CAAC,GAAG,IAAI,CAAA;IACf,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IACvB,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AACpD,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AACrD,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Address aliases (`0x2::address_alias`). An address `A` that has enabled
3
+ * aliases owns an `AddressAliases` object, derived from the shared
4
+ * `AddressAliasState` (`0xa`), holding up to eight addresses. From then on the
5
+ * chain accepts a transaction from `A` signed by any address in that set
6
+ * instead of by `A`'s own key (and `A`'s own key only while `A` is in it).
7
+ *
8
+ * const aliases = yield* AddressAlias.get(A) // { enabled, aliases, objectId }
9
+ * yield* Tx.run(AddressAlias.add(A, B), { signer: a }) // a recipe step, signed by A
10
+ * const asA = yield* AddressAlias.checkedSigner(A, b) // B's key, signing for A
11
+ * yield* Tx.run(recipe, { signer: asA }) // sender A, signature by B
12
+ *
13
+ * Adding an alias gives that key full control of the address, so treat these
14
+ * steps like exporting a key. (`@mysten/sui` refuses `0x2::address_alias`
15
+ * calls by default, so a dapp can't slip one into a wallet's transaction.)
16
+ */
17
+ import * as Effect from "effect/Effect";
18
+ import * as Schema from "effect/Schema";
19
+ import * as Bcs from "@unconfirmed/effect-bcs/Bcs";
20
+ import { type Address } from "./Address.ts";
21
+ import { type ObjectDecodeError, Objects } from "./Objects.ts";
22
+ import * as Ptb from "./Ptb.ts";
23
+ import type { RpcError } from "./RpcError.ts";
24
+ import type { Signer } from "./Signer.ts";
25
+ /** The shared `0x2::address_alias::AddressAliasState`, parent of every alias set. */
26
+ export declare const STATE_ID: Address;
27
+ /** The most addresses an alias set holds (`add` and `replaceAll` abort beyond it). */
28
+ export declare const MAX_ALIASES = 8;
29
+ /** `0x2::address_alias::AddressAliases`: its id and a `VecSet<address>`. */
30
+ export declare const AddressAliases: Schema.Struct<{
31
+ readonly id: Schema.brand<Schema.String, "Address">;
32
+ readonly aliases: Schema.Struct<{
33
+ readonly contents: Schema.$Array<Schema.brand<Schema.String, "Address">>;
34
+ }>;
35
+ }>;
36
+ /**
37
+ * The id of `address`'s `AddressAliases` object, whether or not it exists yet:
38
+ * `derived_object` of `AliasKey(address)` under `0xa`. Throws on an invalid
39
+ * address, like `Address.normalize`.
40
+ */
41
+ export declare const aliasesId: (address: string) => Address;
42
+ export interface Aliases {
43
+ readonly address: Address;
44
+ /** Whether `address` has enabled aliases (its `AddressAliases` object exists). */
45
+ readonly enabled: boolean;
46
+ /** The addresses whose signatures the chain accepts for `address`: its alias set, or only itself when not enabled. */
47
+ readonly aliases: ReadonlyArray<Address>;
48
+ readonly objectId: Address;
49
+ }
50
+ /** Read `address`'s alias set. An address that never enabled aliases is its own only alias, as on chain. */
51
+ export declare const get: (address: Address) => Effect.Effect<Aliases, ObjectDecodeError | RpcError, Objects>;
52
+ /** Whether the chain accepts `signer`'s signature for transactions from `address`. */
53
+ export declare const allows: (address: Address, signer: Address) => Effect.Effect<boolean, ObjectDecodeError | RpcError, Objects>;
54
+ /** `enable`: create the sender's alias set, holding only the sender. Aborts if the sender already has one. */
55
+ export declare const enable: Effect.Effect<Bcs.EnumType<{
56
+ readonly GasCoin: null;
57
+ readonly Input: Schema.Int;
58
+ readonly Result: Schema.Int;
59
+ readonly NestedResult: Schema.Tuple<readonly [Schema.Int, Schema.Int]>;
60
+ }>, Ptb.InvalidPureValue, Ptb.PtbBuilder>;
61
+ /** `add`: add `alias` to `owner`'s set (signed by `owner` or an alias). Aborts if present or past `MAX_ALIASES`. */
62
+ export declare const add: (owner: string, alias: string) => Effect.Effect<Bcs.EnumType<{
63
+ readonly GasCoin: null;
64
+ readonly Input: Schema.Int;
65
+ readonly Result: Schema.Int;
66
+ readonly NestedResult: Schema.Tuple<readonly [Schema.Int, Schema.Int]>;
67
+ }>, Ptb.InvalidPureValue, Ptb.PtbBuilder>;
68
+ /** `remove`: remove `alias` from `owner`'s set. Aborts if absent or the last one. */
69
+ export declare const remove: (owner: string, alias: string) => Effect.Effect<Bcs.EnumType<{
70
+ readonly GasCoin: null;
71
+ readonly Input: Schema.Int;
72
+ readonly Result: Schema.Int;
73
+ readonly NestedResult: Schema.Tuple<readonly [Schema.Int, Schema.Int]>;
74
+ }>, Ptb.InvalidPureValue, Ptb.PtbBuilder>;
75
+ /**
76
+ * `replace_all`: make `owner`'s set exactly `aliases`. One to `MAX_ALIASES`
77
+ * distinct addresses, checked here (`InvalidPureValue`) as the chain would.
78
+ */
79
+ export declare const replaceAll: (owner: string, aliases: ReadonlyArray<string>) => Effect.Effect<Bcs.EnumType<{
80
+ readonly GasCoin: null;
81
+ readonly Input: Schema.Int;
82
+ readonly Result: Schema.Int;
83
+ readonly NestedResult: Schema.Tuple<readonly [Schema.Int, Schema.Int]>;
84
+ }>, Ptb.InvalidPureValue, Ptb.PtbBuilder>;
85
+ /** A key signing for another address: `address` is the address it signs for, `keyAddress` the key's own. */
86
+ export interface AliasSigner extends Signer {
87
+ readonly keyAddress: Address;
88
+ }
89
+ /**
90
+ * `key` signing for `address` through `address`'s alias set: transactions it
91
+ * runs have sender `address` and carry `key`'s signature. Unchecked: the node
92
+ * refuses the signature if `key` isn't in the set (see `checkedSigner`).
93
+ */
94
+ export declare const signer: (address: string, key: Signer) => AliasSigner;
95
+ declare const AliasNotAllowed_base: Schema.Class<AliasNotAllowed, Schema.TaggedStruct<"AliasNotAllowed", {
96
+ readonly address: Schema.String;
97
+ readonly signer: Schema.String;
98
+ readonly aliases: Schema.$Array<Schema.String>;
99
+ }>, import("effect/Cause").YieldableError>;
100
+ /** `key` is not in `address`'s alias set. */
101
+ export declare class AliasNotAllowed extends /* @__PURE__ */ AliasNotAllowed_base {
102
+ get message(): string;
103
+ }
104
+ /** `signer`, after reading `address`'s alias set: `AliasNotAllowed` if `key` isn't in it. */
105
+ export declare const checkedSigner: (address: Address, key: Signer) => Effect.Effect<AliasSigner, AliasNotAllowed | ObjectDecodeError | RpcError, Objects>;
106
+ export {};
107
+ //# sourceMappingURL=AddressAlias.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressAlias.d.ts","sources":["../src/AddressAlias.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,KAAK,OAAO,EAAa,MAAM,cAAc,CAAA;AAEtD,OAAO,EAAU,KAAK,iBAAiB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGzC,qFAAqF;AACrF,eAAO,MAAM,QAAQ,EAAE,OAA0C,CAAA;AAEjE,sFAAsF;AACtF,eAAO,MAAM,WAAW,IAAI,CAAA;AAI5B,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;;;EAGzB,CAAA;AAIF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,KAAG,OAAgF,CAAA;AAE5H,MAAM,WAAW,OAAO;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AAO,MAAM,aAAa,GACxB,SAAS,OAAO,EAChB,KAAK,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,eAAe,GAAG,iBAAiB,GAAG,QAAQ,EAAE,OAAO,CAIU,CAAA"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Address aliases (`0x2::address_alias`). An address `A` that has enabled
3
+ * aliases owns an `AddressAliases` object, derived from the shared
4
+ * `AddressAliasState` (`0xa`), holding up to eight addresses. From then on the
5
+ * chain accepts a transaction from `A` signed by any address in that set
6
+ * instead of by `A`'s own key (and `A`'s own key only while `A` is in it).
7
+ *
8
+ * const aliases = yield* AddressAlias.get(A) // { enabled, aliases, objectId }
9
+ * yield* Tx.run(AddressAlias.add(A, B), { signer: a }) // a recipe step, signed by A
10
+ * const asA = yield* AddressAlias.checkedSigner(A, b) // B's key, signing for A
11
+ * yield* Tx.run(recipe, { signer: asA }) // sender A, signature by B
12
+ *
13
+ * Adding an alias gives that key full control of the address, so treat these
14
+ * steps like exporting a key. (`@mysten/sui` refuses `0x2::address_alias`
15
+ * calls by default, so a dapp can't slip one into a wallet's transaction.)
16
+ */
17
+ import * as Effect from "effect/Effect";
18
+ import * as Schema from "effect/Schema";
19
+ import * as Bcs from "@unconfirmed/effect-bcs/Bcs";
20
+ import { normalize } from "./Address.js";
21
+ import { deriveObjectId } from "./DynamicFields.js";
22
+ import { decode, Objects } from "./Objects.js";
23
+ import * as Ptb from "./Ptb.js";
24
+ /** The shared `0x2::address_alias::AddressAliasState`, parent of every alias set. */
25
+ export const STATE_ID = /* @__PURE__ */ normalize("0xa");
26
+ /** The most addresses an alias set holds (`add` and `replaceAll` abort beyond it). */
27
+ export const MAX_ALIASES = 8;
28
+ const KEY_TYPE = "0x2::address_alias::AliasKey";
29
+ /** `0x2::address_alias::AddressAliases`: its id and a `VecSet<address>`. */
30
+ export const AddressAliases = /* @__PURE__ */ Bcs.struct({
31
+ id: Bcs.Address,
32
+ aliases: /* @__PURE__ */ Bcs.struct({ contents: /* @__PURE__ */ Bcs.vector(Bcs.Address) })
33
+ });
34
+ const encodeAddress = /* @__PURE__ */ Bcs.encodeSync(Bcs.Address);
35
+ /**
36
+ * The id of `address`'s `AddressAliases` object, whether or not it exists yet:
37
+ * `derived_object` of `AliasKey(address)` under `0xa`. Throws on an invalid
38
+ * address, like `Address.normalize`.
39
+ */
40
+ export const aliasesId = (address) => deriveObjectId(STATE_ID, KEY_TYPE, encodeAddress(normalize(address)));
41
+ const decodeAliases = /* @__PURE__ */ decode(AddressAliases);
42
+ /** Read `address`'s alias set. An address that never enabled aliases is its own only alias, as on chain. */
43
+ export const get = (address) => Effect.suspend(() => {
44
+ const objectId = aliasesId(address);
45
+ return Effect.flatMap(Effect.service(Objects), (o) => o.get(objectId)).pipe(Effect.flatMap(decodeAliases), Effect.map((a) => ({ address, enabled: true, aliases: a.aliases.contents, objectId })), Effect.catchTag("ObjectNotFound", () => Effect.succeed({ address, enabled: false, aliases: [address], objectId })));
46
+ });
47
+ /** Whether the chain accepts `signer`'s signature for transactions from `address`. */
48
+ export const allows = (address, signer) => Effect.map(get(address), (a) => a.aliases.includes(signer));
49
+ // -----------------------------------------------------------------------------
50
+ // Recipe steps
51
+ // -----------------------------------------------------------------------------
52
+ const attempt = (f) => Effect.try({ try: f, catch: (e) => new Ptb.InvalidPureValue({ issue: e instanceof Error ? e.message : String(e) }) });
53
+ const call = (fn, args) => Ptb.moveCall({ target: `0x2::address_alias::${fn}`, arguments: args });
54
+ /** `owner`'s `AddressAliases` (consensus-owned by `owner`), looked up by the resolver. */
55
+ const aliasesOf = (owner) => Effect.flatMap(attempt(() => aliasesId(owner)), (id) => Ptb.object(id));
56
+ /** `enable`: create the sender's alias set, holding only the sender. Aborts if the sender already has one. */
57
+ export const enable = /* @__PURE__ */ Effect.flatMap(/* @__PURE__ */ Ptb.object(STATE_ID), (state) => call("enable", [state]));
58
+ /** `add`: add `alias` to `owner`'s set (signed by `owner` or an alias). Aborts if present or past `MAX_ALIASES`. */
59
+ export const add = (owner, alias) => Effect.gen(function* () {
60
+ const aliases = yield* aliasesOf(owner);
61
+ return yield* call("add", [aliases, yield* Ptb.address(alias)]);
62
+ });
63
+ /** `remove`: remove `alias` from `owner`'s set. Aborts if absent or the last one. */
64
+ export const remove = (owner, alias) => Effect.gen(function* () {
65
+ const aliases = yield* aliasesOf(owner);
66
+ return yield* call("remove", [aliases, yield* Ptb.address(alias)]);
67
+ });
68
+ /**
69
+ * `replace_all`: make `owner`'s set exactly `aliases`. One to `MAX_ALIASES`
70
+ * distinct addresses, checked here (`InvalidPureValue`) as the chain would.
71
+ */
72
+ export const replaceAll = (owner, aliases) => Effect.gen(function* () {
73
+ const set = yield* attempt(() => aliases.map(normalize));
74
+ if (set.length === 0 || set.length > MAX_ALIASES || new Set(set).size !== set.length) {
75
+ return yield* new Ptb.InvalidPureValue({ issue: `an alias set holds 1 to ${MAX_ALIASES} distinct addresses, got ${aliases.length}` });
76
+ }
77
+ const target = yield* aliasesOf(owner);
78
+ return yield* call("replace_all", [target, yield* Ptb.pure(Bcs.vector(Bcs.Address), set)]);
79
+ });
80
+ /**
81
+ * `key` signing for `address` through `address`'s alias set: transactions it
82
+ * runs have sender `address` and carry `key`'s signature. Unchecked: the node
83
+ * refuses the signature if `key` isn't in the set (see `checkedSigner`).
84
+ */
85
+ export const signer = (address, key) => ({
86
+ ...key,
87
+ address: normalize(address),
88
+ keyAddress: key.address
89
+ });
90
+ /** `key` is not in `address`'s alias set. */
91
+ export class AliasNotAllowed extends /* @__PURE__ */ Schema.TaggedError()("AliasNotAllowed", {
92
+ address: Schema.String,
93
+ signer: Schema.String,
94
+ aliases: Schema.Array(Schema.String)
95
+ }) {
96
+ get message() {
97
+ return `${this.signer} is not in the alias set of ${this.address} (${this.aliases.join(", ")})`;
98
+ }
99
+ }
100
+ /** `signer`, after reading `address`'s alias set: `AliasNotAllowed` if `key` isn't in it. */
101
+ export const checkedSigner = (address, key) => Effect.flatMap(get(address), (a) => a.aliases.includes(key.address)
102
+ ? Effect.succeed(signer(address, key))
103
+ : Effect.fail(new AliasNotAllowed({ address, signer: key.address, aliases: a.aliases })));
104
+ //# sourceMappingURL=AddressAlias.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressAlias.js","sources":["../src/AddressAlias.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAgB,SAAS,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,MAAM,EAA0B,OAAO,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAK/B,qFAAqF;AACrF,MAAM,CAAC,MAAM,QAAQ,GAAY,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAEjE,sFAAsF;AACtF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAA;AAE5B,MAAM,QAAQ,GAAG,8BAA8B,CAAA;AAE/C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC;IACvD,EAAE,EAAE,GAAG,CAAC,OAAO;IACf,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3F,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,cAAc,CAAC,QAA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C,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { type Derived, type Path, type Source } from "./internal/mnemonic.ts";
2
+ /** The Secp256k1 secret key at a path (default `m/54'/784'/0'/0/0`). Use with `Secp256k1.fromSecretKey`. */
3
+ export declare const secp256k1SecretKey: (source: Source, path?: Path) => Derived;
4
+ /** The Secp256r1 secret key at a path (default `m/74'/784'/0'/0/0`). Use with `Secp256r1.fromSecretKey`. */
5
+ export declare const secp256r1SecretKey: (source: Source, path?: Path) => Derived;
6
+ //# sourceMappingURL=Bip32.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bip32.d.ts","sources":["../src/Bip32.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAoD,KAAK,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAoB/H,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,OAAO,IAAI,KAAG,OAA+C,CAAA;AAEhH,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,OAAO,IAAI,KAAG,OAA+C,CAAA"}
package/dist/Bip32.js ADDED
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Secp256k1 and Secp256r1 keys from a mnemonic (BIP32). A module of its own so
3
+ * `@scure/bip32` loads only for these: Ed25519 and ML-DSA-65 (SLIP-0010) are in
4
+ * `Mnemonic`.
5
+ *
6
+ * const k1 = yield* Secp256k1.fromSecretKey(yield* Bip32.secp256k1SecretKey(m, { account: 1 }))
7
+ *
8
+ * Secp256r1 follows `@mysten/sui` and the Sui CLI: it derives with BIP32's
9
+ * secp256k1 arithmetic and uses the resulting scalar as a P-256 key.
10
+ */
11
+ import { HDKey } from "@scure/bip32";
12
+ import * as Effect from "effect/Effect";
13
+ import { resolve, SECP256K1, SECP256R1, seedOf } from "./internal/mnemonic.js";
14
+ const deriveBip32 = (rule, source, path) => Effect.flatMap(resolve(rule, path), ({ path }) => Effect.flatMap(seedOf(source), (seed) => Effect.sync(() => {
15
+ // A child that is not a valid key has probability ~2^-127; a defect, as in @scure/bip32.
16
+ const master = HDKey.fromMasterSeed(seed);
17
+ const child = master.derive(path);
18
+ try {
19
+ if (!child.privateKey)
20
+ throw new Error(`no private key at ${path}`);
21
+ return child.privateKey.slice();
22
+ }
23
+ finally {
24
+ // Zero the nodes' keys and chain codes, as the SLIP-0010 path zeroes its intermediates.
25
+ // (`derive` makes the nodes in between internally; they are out of reach.)
26
+ child.wipePrivateData();
27
+ master.wipePrivateData();
28
+ }
29
+ })));
30
+ /** The Secp256k1 secret key at a path (default `m/54'/784'/0'/0/0`). Use with `Secp256k1.fromSecretKey`. */
31
+ export const secp256k1SecretKey = (source, path) => deriveBip32(SECP256K1, source, path);
32
+ /** The Secp256r1 secret key at a path (default `m/74'/784'/0'/0/0`). Use with `Secp256r1.fromSecretKey`. */
33
+ export const secp256r1SecretKey = (source, path) => deriveBip32(SECP256R1, source, path);
34
+ //# sourceMappingURL=Bip32.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bip32.js","sources":["../src/Bip32.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAA2B,OAAO,EAAa,SAAS,EAAE,SAAS,EAAE,MAAM,EAAe,MAAM,wBAAwB,CAAA;AAE/H,MAAM,WAAW,GAAG,CAAC,IAAU,EAAE,MAAc,EAAE,IAAsB,EAAW,EAAE,CAClF,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAC/C,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CACtC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;IACf,yFAAyF;IACzF,MAAM,MAAM,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;IACzC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACjC,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAA;QACnE,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACjC,CAAC;YAAS,CAAC;QACT,wFAAwF;QACxF,2EAA2E;QAC3E,KAAK,CAAC,eAAe,EAAE,CAAA;QACvB,MAAM,CAAC,eAAe,EAAE,CAAA;IAC1B,CAAC;AACH,CAAC,CAAC,CAAC,CAAC,CAAA;AAEV,4GAA4G;AAC5G,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,IAAW,EAAW,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;AAEhH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,IAAW,EAAW,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Chain identity and the current epoch's gas price.
3
+ */
4
+ import * as Context from "effect/Context";
5
+ import type * as Effect from "effect/Effect";
6
+ import type { RpcError } from "./RpcError.ts";
7
+ import type { ObjectDigest } from "./TransactionData.ts";
8
+ export interface ChainInfo {
9
+ /** The genesis checkpoint digest; what `ValidDuring.chain` names. */
10
+ readonly chainId: ObjectDigest;
11
+ /** `mainnet`, `testnet`, ... as the node reports it. */
12
+ readonly chain: string;
13
+ readonly epoch: bigint;
14
+ readonly checkpointHeight: bigint;
15
+ }
16
+ declare const Chain_base: Context.ServiceClass<Chain, "@unconfirmed/effect-sui/Chain", {
17
+ readonly info: Effect.Effect<ChainInfo, RpcError>;
18
+ readonly referenceGasPrice: Effect.Effect<bigint, RpcError>;
19
+ }>;
20
+ export declare class Chain extends /* @__PURE__ */ Chain_base {
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=Chain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chain.d.ts","sources":["../src/Chain.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,SAAS;IACxB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAA;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC;;mBAGgB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC;gCACrB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAF7D,qBAAa,KAAM,SAAQ,eAAe,CAAC,UAGN;CAAG"}
package/dist/Chain.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Chain identity and the current epoch's gas price.
3
+ */
4
+ import * as Context from "effect/Context";
5
+ export class Chain extends /* @__PURE__ */ Context.Service()("@unconfirmed/effect-sui/Chain") {
6
+ }
7
+ //# sourceMappingURL=Chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chain.js","sources":["../src/Chain.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAczC,MAAM,OAAO,KAAM,SAAQ,eAAe,CAAC,OAAO,CAAC,OAAO,EAGtD,CAAC,+BAA+B,CAAC;CAAG"}