@unconfirmed/effect-sui 0.0.0-stage → 0.1.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 (568) 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/Features.d.ts +91 -0
  388. package/dist/wallet/Features.d.ts.map +1 -0
  389. package/dist/wallet/Features.js +14 -0
  390. package/dist/wallet/Features.js.map +1 -0
  391. package/dist/wallet/Wallet.d.ts +151 -0
  392. package/dist/wallet/Wallet.d.ts.map +1 -0
  393. package/dist/wallet/Wallet.js +399 -0
  394. package/dist/wallet/Wallet.js.map +1 -0
  395. package/dist/wallet/index.d.ts +6 -0
  396. package/dist/wallet/index.d.ts.map +1 -0
  397. package/dist/wallet/index.js +6 -0
  398. package/dist/wallet/index.js.map +1 -0
  399. package/dist/zklogin/AddressSeed.d.ts +40 -0
  400. package/dist/zklogin/AddressSeed.d.ts.map +1 -0
  401. package/dist/zklogin/AddressSeed.js +91 -0
  402. package/dist/zklogin/AddressSeed.js.map +1 -0
  403. package/dist/zklogin/Errors.d.ts +24 -0
  404. package/dist/zklogin/Errors.d.ts.map +1 -0
  405. package/dist/zklogin/Errors.js +25 -0
  406. package/dist/zklogin/Errors.js.map +1 -0
  407. package/dist/zklogin/Jwt.d.ts +51 -0
  408. package/dist/zklogin/Jwt.d.ts.map +1 -0
  409. package/dist/zklogin/Jwt.js +159 -0
  410. package/dist/zklogin/Jwt.js.map +1 -0
  411. package/dist/zklogin/Nonce.d.ts +9 -0
  412. package/dist/zklogin/Nonce.d.ts.map +1 -0
  413. package/dist/zklogin/Nonce.js +34 -0
  414. package/dist/zklogin/Nonce.js.map +1 -0
  415. package/dist/zklogin/Poseidon.d.ts +24 -0
  416. package/dist/zklogin/Poseidon.d.ts.map +1 -0
  417. package/dist/zklogin/Poseidon.js +54 -0
  418. package/dist/zklogin/Poseidon.js.map +1 -0
  419. package/dist/zklogin/PublicIdentifier.d.ts +49 -0
  420. package/dist/zklogin/PublicIdentifier.d.ts.map +1 -0
  421. package/dist/zklogin/PublicIdentifier.js +90 -0
  422. package/dist/zklogin/PublicIdentifier.js.map +1 -0
  423. package/dist/zklogin/Signature.d.ts +55 -0
  424. package/dist/zklogin/Signature.d.ts.map +1 -0
  425. package/dist/zklogin/Signature.js +70 -0
  426. package/dist/zklogin/Signature.js.map +1 -0
  427. package/dist/zklogin/ZkLogin.d.ts +41 -0
  428. package/dist/zklogin/ZkLogin.d.ts.map +1 -0
  429. package/dist/zklogin/ZkLogin.js +87 -0
  430. package/dist/zklogin/ZkLogin.js.map +1 -0
  431. package/dist/zklogin/ZkLoginAddress.d.ts +30 -0
  432. package/dist/zklogin/ZkLoginAddress.d.ts.map +1 -0
  433. package/dist/zklogin/ZkLoginAddress.js +31 -0
  434. package/dist/zklogin/ZkLoginAddress.js.map +1 -0
  435. package/dist/zklogin/ZkLoginVerifier.d.ts +37 -0
  436. package/dist/zklogin/ZkLoginVerifier.d.ts.map +1 -0
  437. package/dist/zklogin/ZkLoginVerifier.js +4 -0
  438. package/dist/zklogin/ZkLoginVerifier.js.map +1 -0
  439. package/dist/zklogin/ZkLoginVerifierGrpc.d.ts +12 -0
  440. package/dist/zklogin/ZkLoginVerifierGrpc.d.ts.map +1 -0
  441. package/dist/zklogin/ZkLoginVerifierGrpc.js +53 -0
  442. package/dist/zklogin/ZkLoginVerifierGrpc.js.map +1 -0
  443. package/dist/zklogin/index.d.ts +17 -0
  444. package/dist/zklogin/index.d.ts.map +1 -0
  445. package/dist/zklogin/index.js +17 -0
  446. package/dist/zklogin/index.js.map +1 -0
  447. package/dist/zklogin/internal/parse.d.ts +9 -0
  448. package/dist/zklogin/internal/parse.d.ts.map +1 -0
  449. package/dist/zklogin/internal/parse.js +33 -0
  450. package/dist/zklogin/internal/parse.js.map +1 -0
  451. package/dist/zklogin/internal/poseidon.d.ts +21 -0
  452. package/dist/zklogin/internal/poseidon.d.ts.map +1 -0
  453. package/dist/zklogin/internal/poseidon.js +40 -0
  454. package/dist/zklogin/internal/poseidon.js.map +1 -0
  455. package/package.json +69 -4
  456. package/src/Address.ts +45 -0
  457. package/src/AddressAlias.ts +160 -0
  458. package/src/Bip32.ts +37 -0
  459. package/src/Chain.ts +21 -0
  460. package/src/CheckpointData.ts +106 -0
  461. package/src/Checkpoints.ts +18 -0
  462. package/src/CoinReservation.ts +65 -0
  463. package/src/Coins.ts +86 -0
  464. package/src/DynamicFields.ts +179 -0
  465. package/src/Ecdsa.ts +103 -0
  466. package/src/Ed25519.ts +84 -0
  467. package/src/Events.ts +133 -0
  468. package/src/Hash.ts +39 -0
  469. package/src/MlDsa65.ts +92 -0
  470. package/src/Mnemonic.ts +109 -0
  471. package/src/Move.ts +440 -0
  472. package/src/MultiSig.ts +320 -0
  473. package/src/Objects.ts +112 -0
  474. package/src/Packages.ts +52 -0
  475. package/src/Passkey.ts +10 -0
  476. package/src/PrivateKey.ts +138 -0
  477. package/src/Ptb.ts +579 -0
  478. package/src/Resolve.ts +1367 -0
  479. package/src/RpcError.ts +41 -0
  480. package/src/Secp256k1.ts +29 -0
  481. package/src/Secp256r1.ts +29 -0
  482. package/src/SignatureScheme.ts +166 -0
  483. package/src/Signer.ts +62 -0
  484. package/src/Testing.ts +830 -0
  485. package/src/TransactionData.ts +134 -0
  486. package/src/TransactionJson.ts +1002 -0
  487. package/src/Transactions.ts +211 -0
  488. package/src/Tx.ts +367 -0
  489. package/src/TypeTag.ts +123 -0
  490. package/src/Verify.ts +42 -0
  491. package/src/enoki/EnokiClient.ts +204 -0
  492. package/src/enoki/EnokiHttp.ts +222 -0
  493. package/src/enoki/Sponsor.ts +280 -0
  494. package/src/enoki/ZkLoginFlow.ts +176 -0
  495. package/src/enoki/index.ts +8 -0
  496. package/src/graphql/ChainGraphQL.ts +76 -0
  497. package/src/graphql/CheckpointDataGraphQL.ts +191 -0
  498. package/src/graphql/CheckpointsGraphQL.ts +96 -0
  499. package/src/graphql/CoinsGraphQL.ts +85 -0
  500. package/src/graphql/DynamicFieldsGraphQL.ts +167 -0
  501. package/src/graphql/EventsGraphQL.ts +301 -0
  502. package/src/graphql/ObjectsGraphQL.ts +112 -0
  503. package/src/graphql/PackagesGraphQL.ts +173 -0
  504. package/src/graphql/SuiGraphQL.ts +77 -0
  505. package/src/graphql/TransactionsGraphQL.ts +292 -0
  506. package/src/graphql/convert.ts +450 -0
  507. package/src/graphql/index.ts +74 -0
  508. package/src/graphql/merge.ts +62 -0
  509. package/src/graphql/paging.ts +110 -0
  510. package/src/graphql/subscription.ts +58 -0
  511. package/src/graphql/tip.ts +38 -0
  512. package/src/grpc/ChainGrpc.ts +51 -0
  513. package/src/grpc/CheckpointDataGrpc.ts +47 -0
  514. package/src/grpc/CheckpointsGrpc.ts +37 -0
  515. package/src/grpc/CoinsGrpc.ts +50 -0
  516. package/src/grpc/DynamicFieldsGrpc.ts +128 -0
  517. package/src/grpc/EventsGrpc.ts +101 -0
  518. package/src/grpc/GrpcWeb.ts +343 -0
  519. package/src/grpc/ObjectsGrpc.ts +95 -0
  520. package/src/grpc/PackagesGrpc.ts +98 -0
  521. package/src/grpc/Rpc.ts +156 -0
  522. package/src/grpc/TransactionsGrpc.ts +88 -0
  523. package/src/grpc/cache.ts +68 -0
  524. package/src/grpc/convert.ts +227 -0
  525. package/src/grpc/generated/lean.ts +276 -0
  526. package/src/grpc/generated/proto.ts +2130 -0
  527. package/src/grpc/generated/rpc.ts +417 -0
  528. package/src/grpc/index.ts +97 -0
  529. package/src/grpc/scan.ts +183 -0
  530. package/src/grpc/transaction.ts +182 -0
  531. package/src/index.ts +35 -0
  532. package/src/internal/allowances.ts +238 -0
  533. package/src/internal/mnemonic.ts +99 -0
  534. package/src/internal/passkey/BrowserProvider.ts +131 -0
  535. package/src/internal/passkey/Passkey.ts +408 -0
  536. package/src/internal/passkey/SoftwareProvider.ts +90 -0
  537. package/src/lifecycle/Evidence.ts +85 -0
  538. package/src/lifecycle/EvidenceGraphQL.ts +67 -0
  539. package/src/lifecycle/EvidenceGrpc.ts +47 -0
  540. package/src/lifecycle/Journal.ts +117 -0
  541. package/src/lifecycle/JournalEntry.ts +68 -0
  542. package/src/lifecycle/JournalKeyValueStore.ts +276 -0
  543. package/src/lifecycle/KeyValueStoreIndexedDb.ts +361 -0
  544. package/src/lifecycle/KeyValueStoreOpfs.ts +230 -0
  545. package/src/lifecycle/Lifecycle.ts +990 -0
  546. package/src/lifecycle/Outcome.ts +130 -0
  547. package/src/lifecycle/SenderLock.ts +73 -0
  548. package/src/lifecycle/SenderLockWebLocks.ts +136 -0
  549. package/src/lifecycle/SignedTransaction.ts +133 -0
  550. package/src/lifecycle/SubmitConfig.ts +77 -0
  551. package/src/lifecycle/index.ts +12 -0
  552. package/src/wallet/Features.ts +114 -0
  553. package/src/wallet/Wallet.ts +550 -0
  554. package/src/wallet/index.ts +5 -0
  555. package/src/zklogin/AddressSeed.ts +130 -0
  556. package/src/zklogin/Errors.ts +27 -0
  557. package/src/zklogin/Jwt.ts +186 -0
  558. package/src/zklogin/Nonce.ts +46 -0
  559. package/src/zklogin/Poseidon.ts +62 -0
  560. package/src/zklogin/PublicIdentifier.ts +111 -0
  561. package/src/zklogin/Signature.ts +88 -0
  562. package/src/zklogin/ZkLogin.ts +145 -0
  563. package/src/zklogin/ZkLoginAddress.ts +72 -0
  564. package/src/zklogin/ZkLoginVerifier.ts +37 -0
  565. package/src/zklogin/ZkLoginVerifierGrpc.ts +66 -0
  566. package/src/zklogin/index.ts +16 -0
  567. package/src/zklogin/internal/parse.ts +30 -0
  568. package/src/zklogin/internal/poseidon.ts +47 -0
@@ -0,0 +1,207 @@
1
+ /**
2
+ * A `KeyValueStore` (`effect/persistence`) over the Origin Private File System
3
+ * (`navigator.storage.getDirectory()`): one file per key in a sub-directory
4
+ * (default `sui-lifecycle`; `a/b` nests).
5
+ *
6
+ * - **File names.** A key becomes `k.` plus the key with every character
7
+ * outside `[A-Za-z0-9_-]` written as `%XX` per UTF-8 byte, so `entry:Ab1`
8
+ * is `k.entry%3AAb1`. The mapping is reversible (that is how `keys` works),
9
+ * never yields `/`, `\`, `.` or `..`, and leaves case alone (OPFS names are
10
+ * case-sensitive). Files in the directory that are not of this form
11
+ * (browser swap files, anything else) are ignored by `keys`, `size` and
12
+ * `clear`. A name longer than {@link MAX_NAME_LENGTH} characters is refused
13
+ * with `KeyValueStoreError` before touching the disk.
14
+ * - **Atomic writes.** `set` writes through `createWritable()`, which writes
15
+ * to a swap file and replaces the file only on `close()`; a write that fails
16
+ * (quota, interruption) aborts the stream and leaves the previous value.
17
+ * That works on the main thread and in workers. `createSyncAccessHandle()`
18
+ * is worker-only and writes in place (not atomic), so it is not used.
19
+ * - **Values** are the file's bytes: strings are written as UTF-8, `get`
20
+ * decodes UTF-8 and `getUint8Array` answers the bytes (as
21
+ * `KeyValueStore.layerFileSystem` does), so a string and its UTF-8 bytes
22
+ * are the same value.
23
+ * - **Errors.** Every failure is a `KeyValueStoreError` (the `cause` holds
24
+ * the `DOMException`): OPFS missing (no `navigator.storage.getDirectory`:
25
+ * non-secure context, old browsers; `SecurityError` in some private modes),
26
+ * `QuotaExceededError`, `NoModificationAllowedError` (a worker holds a sync
27
+ * access handle on the file), `TypeMismatchError` (a directory under the
28
+ * name), `createWritable` missing. A missing file (`NotFoundError`) is an
29
+ * absent key: `get` answers `undefined`, `remove` succeeds.
30
+ *
31
+ * Browser caveats:
32
+ * - Safari has `getDirectory` since 15.2 but `createWritable` /
33
+ * `FileSystemWritableFileStream` only since Safari 26; on older Safari this
34
+ * store fails `set` (and the layer fails to build) with `KeyValueStoreError`.
35
+ * Use `KeyValueStoreIndexedDb` there.
36
+ * - Firefox has OPFS since 111; in private browsing `getDirectory` may reject
37
+ * (`SecurityError`), which fails the layer typed.
38
+ * - Two `createWritable` streams on one file (two tabs) do not lock each
39
+ * other: the last `close()` wins, whole. `JournalKeyValueStore` writes whole
40
+ * values per key, so that is enough.
41
+ * - Unlike IndexedDB there is no strict-durability flag: a committed
42
+ * `close()` is on the browser's storage, but whether it is fsynced before
43
+ * a power loss is up to the browser.
44
+ */
45
+ import * as Effect from "effect/Effect";
46
+ import * as Layer from "effect/Layer";
47
+ import * as KeyValueStore from "effect/persistence/KeyValueStore";
48
+ export const DEFAULT_DIRECTORY = "sui-lifecycle";
49
+ /** The longest file name produced; longer keys are refused. Most file systems cap names at 255 bytes. */
50
+ export const MAX_NAME_LENGTH = 255;
51
+ const PREFIX = "k.";
52
+ const encoder = new TextEncoder();
53
+ const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
54
+ const SAFE = /^[A-Za-z0-9_-]$/;
55
+ /** The file name of a key: reversible, and safe as an OPFS entry name. */
56
+ export const encodeKey = (key) => {
57
+ let out = PREFIX;
58
+ for (const ch of key) {
59
+ if (SAFE.test(ch))
60
+ out += ch;
61
+ else
62
+ for (const byte of encoder.encode(ch))
63
+ out += `%${byte.toString(16).toUpperCase().padStart(2, "0")}`;
64
+ }
65
+ return out;
66
+ };
67
+ /** The key of a file name, or `undefined` for a file this store did not write. */
68
+ export const decodeKey = (name) => {
69
+ if (!name.startsWith(PREFIX))
70
+ return undefined;
71
+ const body = name.slice(PREFIX.length);
72
+ if (!/^(?:[A-Za-z0-9_-]|%[0-9A-F]{2})*$/.test(body))
73
+ return undefined;
74
+ try {
75
+ const key = decodeURIComponent(body);
76
+ return encodeKey(key) === name ? key : undefined;
77
+ }
78
+ catch {
79
+ return undefined;
80
+ }
81
+ };
82
+ const describe = (cause) => typeof cause === "object" && cause !== null && "name" in cause && "message" in cause
83
+ ? `${cause.name}: ${cause.message}`
84
+ : String(cause);
85
+ const storeError = (method, cause, key) => new KeyValueStore.KeyValueStoreError({
86
+ method,
87
+ ...(key === undefined ? {} : { key }),
88
+ message: `OPFS ${method}${key === undefined ? "" : ` of ${JSON.stringify(key)}`} failed: ${describe(cause)}`,
89
+ cause
90
+ });
91
+ const isNotFound = (cause) => typeof cause === "object" && cause !== null && cause.name === "NotFoundError";
92
+ const tryAsync = (method, key, f) => Effect.tryPromise({ try: f, catch: (cause) => storeError(method, cause, key) });
93
+ const nameOf = (method, key) => {
94
+ if (decoder.decode(encoder.encode(key)) !== key) {
95
+ return Effect.fail(storeError(method, new Error("the key is not well-formed UTF-16 (a lone surrogate)"), key));
96
+ }
97
+ const name = encodeKey(key);
98
+ return name.length > MAX_NAME_LENGTH
99
+ ? Effect.fail(storeError(method, new Error(`the key encodes to ${name.length} characters, over ${MAX_NAME_LENGTH}`), key))
100
+ : Effect.succeed(name);
101
+ };
102
+ /** Our file names in `dir`. */
103
+ const listNames = async (dir) => {
104
+ const names = [];
105
+ for await (const [name, handle] of dir.entries()) {
106
+ if (handle.kind === "file" && decodeKey(name) !== undefined)
107
+ names.push(name);
108
+ }
109
+ return names;
110
+ };
111
+ const defaultRoot = () => {
112
+ const storage = globalThis.navigator?.storage;
113
+ if (storage === undefined || typeof storage.getDirectory !== "function") {
114
+ return Promise.reject(new Error("the Origin Private File System (navigator.storage.getDirectory) is not available"));
115
+ }
116
+ return storage.getDirectory();
117
+ };
118
+ /** Write `value` to `handle` atomically: a swap file, committed on `close()`, aborted on failure. */
119
+ const writeAtomic = async (handle, value) => {
120
+ if (typeof handle.createWritable !== "function") {
121
+ throw Object.assign(new Error("FileSystemFileHandle.createWritable is not available (Safari before 26); use KeyValueStoreIndexedDb"), { name: "NotSupportedError" });
122
+ }
123
+ const stream = await handle.createWritable({ keepExistingData: false });
124
+ try {
125
+ await stream.write(typeof value === "string" ? value : value);
126
+ }
127
+ catch (cause) {
128
+ await stream.abort().catch(() => { });
129
+ throw cause;
130
+ }
131
+ await stream.close();
132
+ };
133
+ /** The store over `directory` (resolved, and created, now). */
134
+ export const make = (options) => Effect.gen(function* () {
135
+ const path = (options?.directory ?? DEFAULT_DIRECTORY).split("/").filter((p) => p.length > 0);
136
+ const dir = yield* tryAsync("open", undefined, async () => {
137
+ let d = await (options?.root ?? defaultRoot)();
138
+ for (const part of path)
139
+ d = await d.getDirectoryHandle(part, { create: true });
140
+ return d;
141
+ });
142
+ const FileHandle = globalThis.FileSystemFileHandle;
143
+ if (FileHandle !== undefined && !("createWritable" in FileHandle.prototype)) {
144
+ return yield* storeError("open", Object.assign(new Error("FileSystemFileHandle.createWritable is not available (Safari before 26); use KeyValueStoreIndexedDb"), {
145
+ name: "NotSupportedError"
146
+ }));
147
+ }
148
+ const read = (method, convert) => (key) => Effect.flatMap(nameOf(method, key), (name) => tryAsync(method, key, async () => {
149
+ let handle;
150
+ try {
151
+ handle = await dir.getFileHandle(name);
152
+ }
153
+ catch (cause) {
154
+ if (isNotFound(cause))
155
+ return undefined;
156
+ throw cause;
157
+ }
158
+ try {
159
+ return await convert(await handle.getFile());
160
+ }
161
+ catch (cause) {
162
+ if (isNotFound(cause))
163
+ return undefined; // removed between the two calls
164
+ throw cause;
165
+ }
166
+ }));
167
+ const removeName = async (name) => {
168
+ try {
169
+ await dir.removeEntry(name);
170
+ }
171
+ catch (cause) {
172
+ if (!isNotFound(cause))
173
+ throw cause;
174
+ }
175
+ };
176
+ return KeyValueStore.make({
177
+ get: read("get", async (file) => decoder.decode(await file.arrayBuffer())),
178
+ getUint8Array: read("getUint8Array", async (file) => new Uint8Array(await file.arrayBuffer())),
179
+ set: (key, value) => Effect.flatMap(nameOf("set", key), (name) => tryAsync("set", key, async () => writeAtomic(await dir.getFileHandle(name, { create: true }), value))),
180
+ remove: (key) => Effect.flatMap(nameOf("remove", key), (name) => tryAsync("remove", key, () => removeName(name))),
181
+ has: (key) => Effect.flatMap(nameOf("has", key), (name) => tryAsync("has", key, async () => {
182
+ try {
183
+ await dir.getFileHandle(name);
184
+ return true;
185
+ }
186
+ catch (cause) {
187
+ if (isNotFound(cause))
188
+ return false;
189
+ throw cause;
190
+ }
191
+ })),
192
+ clear: tryAsync("clear", undefined, async () => {
193
+ for (const name of await listNames(dir))
194
+ await removeName(name);
195
+ }),
196
+ clearPrefix: (prefix) => tryAsync("clearPrefix", prefix, async () => {
197
+ for (const name of await listNames(dir))
198
+ if (decodeKey(name).startsWith(prefix))
199
+ await removeName(name);
200
+ }),
201
+ size: tryAsync("size", undefined, async () => (await listNames(dir)).length),
202
+ keys: tryAsync("keys", undefined, async () => (await listNames(dir)).map((name) => decodeKey(name)))
203
+ });
204
+ });
205
+ /** `KeyValueStore` over OPFS. */
206
+ export const layer = (options) => Layer.effect(KeyValueStore.KeyValueStore, make(options));
207
+ //# sourceMappingURL=KeyValueStoreOpfs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueStoreOpfs.js","sources":["../../src/lifecycle/KeyValueStoreOpfs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,aAAa,MAAM,kCAAkC,CAAA;AAEjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAChD,yGAAyG;AACzG,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;AAElC,MAAM,MAAM,GAAG,IAAI,CAAA;AASnB,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;AACjC,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;AAC7D,MAAM,IAAI,GAAG,iBAAiB,CAAA;AAE9B,0EAA0E;AAC1E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE;IAC/C,IAAI,GAAG,GAAG,MAAM,CAAA;IAChB,KAAK,MAAM,E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 /**
2
+ * The crash-safe transaction lifecycle on top of the core capability services.
3
+ *
4
+ * const effects = yield* Lifecycle.run(recipe, { signer })
5
+ *
6
+ * `run` = core `Tx.build` -> sign -> journal -> `submit`. Each step is also
7
+ * exported for flows that stop in between.
8
+ *
9
+ * Rules (ported from `sui-effect`, the predecessor):
10
+ * - **Submit never rebuilds.** The `Signed` journal entry is written before the
11
+ * first execute; a retryable transport failure or timeout re-sends the
12
+ * identical bytes (one digest: they land at most once); when retries run out
13
+ * `reconcile` decides. Once bytes may have been sent, no transport error
14
+ * escapes: the answer is `Executed`, `ExecutionFailed`, `NotApplied` or
15
+ * `SubmissionUnknown` (which carries the bytes).
16
+ * - **Objects, never history listings, are evidence.** `NotApplied` needs proof:
17
+ * `inputConsumed` (another transaction's own effects consumed exactly a
18
+ * version these bytes pinned) or `expired` (window closed, then a miss, then
19
+ * after `reconcileRecheck` both again, on a node whose history covers the
20
+ * window). Positive evidence (a pinned object last mutated by *this* digest)
21
+ * vetoes `expired`.
22
+ * - **The journal never changes an answer.** `JournalError` only escapes from
23
+ * the `Signed` write, before anything was sent; later write failures are
24
+ * logged and the outcome stands.
25
+ */
26
+ import type { Address } from "../Address.ts";
27
+ import { Chain } from "../Chain.ts";
28
+ import { Objects } from "../Objects.ts";
29
+ import * as Resolve from "../Resolve.ts";
30
+ import { RpcError } from "../RpcError.ts";
31
+ import * as Signer from "../Signer.ts";
32
+ import { type Effects, type IncludeOptions, Transactions } from "../Transactions.ts";
33
+ import * as Tx from "../Tx.ts";
34
+ import * as Duration from "effect/Duration";
35
+ import * as Effect from "effect/Effect";
36
+ import * as Option from "effect/Option";
37
+ import { DigestMismatch, ExecutionFailed, type JournalError, NotApplied, type Reconciled, SubmissionUnknown, type SubmitError } from "./Outcome.ts";
38
+ import * as Signed from "./SignedTransaction.ts";
39
+ type SignedTransaction = Signed.SignedTransaction;
40
+ /** What the lifecycle reads from the chain. */
41
+ export type Services = Transactions | Objects | Chain;
42
+ type Settled = ExecutionFailed | NotApplied | SubmissionUnknown;
43
+ /** One line for a failure, never bytes. */
44
+ export declare const describe: (error: unknown) => string;
45
+ /**
46
+ * Ask for `digest` every `interval` until it is served or `timeout` passes.
47
+ * `None` means every lookup missed; a transport failure that lasted to the
48
+ * deadline (or was not retryable) is returned as the failure, because it is
49
+ * not a miss. `include` adds those parts to the effects.
50
+ */
51
+ export declare const awaitTransaction: (digest: string, options: {
52
+ readonly timeout: Duration.Input;
53
+ readonly interval: Duration.Input;
54
+ } & IncludeOptions) => Effect.Effect<Option.Option<Effects>, RpcError, Transactions>;
55
+ export type ReconcileInput = SignedTransaction | SubmissionUnknown | string;
56
+ /**
57
+ * Decide what happened to a transaction. Found is `Executed` / `ExecutionFailed`;
58
+ * not found is `NotApplied` only on evidence, otherwise `SubmissionUnknown`.
59
+ * A bare digest uses the signed bytes the journal holds for it (an unresolved
60
+ * entry); without them it can never be proven absent. A settled journal entry is never
61
+ * contradicted by a weaker answer; a terminal answer settles an unresolved one.
62
+ * Signed bytes whose digest does not match fail with `DigestMismatch`.
63
+ * `include` adds those parts to the effects; without it, the `include` the
64
+ * journal recorded for the submission is used.
65
+ */
66
+ export declare const reconcile: (input: ReconcileInput, options?: IncludeOptions | undefined) => Effect.Effect<Effects, DigestMismatch | Settled, Services>;
67
+ /**
68
+ * Send signed bytes and find out what happened. Re-sends only the identical
69
+ * bytes; ends in `Executed`, `ExecutionFailed`, `NotApplied` (proven, or
70
+ * `refused` on the first send of bytes the journal has never seen) or
71
+ * `SubmissionUnknown`. Bytes the journal already holds are treated as a
72
+ * re-send (see `resubmit`); bytes built for another chain than the node's are
73
+ * not sent (`SubmissionUnknown`). `JournalError` only from the `Signed` write
74
+ * before bytes the journal has never seen (a journal that cannot be read is
75
+ * `SubmissionUnknown`: the bytes may have been sent before); `DigestMismatch`
76
+ * if the digest is not the bytes'. `include` (`["events", "balanceChanges"]`)
77
+ * adds those to the effects, and is journalled with the bytes so a later
78
+ * reconcile (`reconcileAll` after a crash) reads them too.
79
+ */
80
+ export declare const submit: (input: {
81
+ readonly bytes: Uint8Array<ArrayBufferLike>;
82
+ readonly digest: string;
83
+ readonly signatures: readonly Uint8Array<ArrayBufferLike>[];
84
+ readonly chain?: string;
85
+ }, options?: IncludeOptions | undefined) => Effect.Effect<Effects, SubmitError, Services>;
86
+ export interface ResubmitOptions extends IncludeOptions {
87
+ /**
88
+ * Re-send bytes the journal records as `NotApplied{refused}`. A refusal
89
+ * means only that this process will not send them again on its own; the
90
+ * same bytes can be valid later (e.g. once the sender is funded), until
91
+ * their window closes. Default false.
92
+ */
93
+ readonly retryRefused?: boolean;
94
+ }
95
+ /**
96
+ * Re-send the identical bytes. Refuses when the journal already says
97
+ * `NotApplied` (unless `retryRefused` and the evidence is `refused`);
98
+ * reconciles instead (journal winning) when the journal says it executed, the
99
+ * bytes name another chain, or their window has closed. Bytes not given
100
+ * (a `SubmissionUnknown` without them) are taken from the journal, as is
101
+ * `include` when not given. Never raises `JournalError`: the bytes may
102
+ * already be out.
103
+ */
104
+ export declare const resubmit: (input: {
105
+ readonly bytes: Uint8Array<ArrayBufferLike>;
106
+ readonly digest: string;
107
+ readonly signatures: readonly Uint8Array<ArrayBufferLike>[];
108
+ readonly chain?: string;
109
+ } | SubmissionUnknown, options?: ResubmitOptions | undefined) => Effect.Effect<Effects, Tx.ExecutionFailed | NotApplied | SubmissionUnknown | DigestMismatch, Services>;
110
+ export interface ReconcileAllOptions {
111
+ /** Re-send an entry still unknown after reconciling, as identical bytes. Default false. */
112
+ readonly resubmit?: boolean;
113
+ /** Entries reconciled at once. Default 8. */
114
+ readonly concurrency?: number;
115
+ }
116
+ /**
117
+ * Settle every unresolved journal entry: the startup call after a crash. Each
118
+ * entry gets `reconcile`'s rules (with one lookup, not `lookupTimeout` of
119
+ * polling: entries left over from a crash are old) and the journal is updated,
120
+ * `concurrency` entries at a time; with `{ resubmit: true }` an entry still
121
+ * unknown is re-sent as identical bytes. Entries the journal cannot read are
122
+ * reported as `Corrupt` (drop them with `Journal.remove`), never a failure of
123
+ * the whole call. Fails only when the journal cannot be listed.
124
+ */
125
+ export declare const reconcileAll: (options?: ReconcileAllOptions | undefined) => Effect.Effect<readonly Reconciled[], JournalError, Services>;
126
+ /**
127
+ * Sign transaction data (or its bytes) with every signer, concurrently.
128
+ * `chain` is recorded for expirations that name none. A signer that is
129
+ * neither the sender nor the gas owner is `Tx.SignerMismatch` before anyone
130
+ * signs, as in `Tx.execute` (an alias signs through `AddressAlias.signer`);
131
+ * bytes that do not parse as `TransactionData` are signed unchecked.
132
+ */
133
+ export declare const sign: (data: Uint8Array<ArrayBufferLike> | ({
134
+ readonly kind: {
135
+ readonly inputs: readonly import("@unconfirmed/effect-bcs/Bcs").EnumType<{
136
+ readonly Pure: import("effect/Schema").Struct<{
137
+ readonly bytes: import("effect/Schema").Uint8Array;
138
+ }>;
139
+ readonly Object: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
140
+ readonly ImmOrOwnedObject: import("effect/Schema").Struct<{
141
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
142
+ readonly version: import("effect/Schema").BigInt;
143
+ readonly digest: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
144
+ }>;
145
+ readonly SharedObject: import("effect/Schema").Struct<{
146
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
147
+ readonly initialSharedVersion: import("effect/Schema").BigInt;
148
+ readonly mutability: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
149
+ readonly Immutable: null;
150
+ readonly Mutable: null;
151
+ readonly NonExclusiveWrite: null;
152
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
153
+ readonly Immutable: null;
154
+ readonly Mutable: null;
155
+ readonly NonExclusiveWrite: null;
156
+ }>>;
157
+ }>;
158
+ readonly Receiving: import("effect/Schema").Struct<{
159
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
160
+ readonly version: import("effect/Schema").BigInt;
161
+ readonly digest: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
162
+ }>;
163
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
164
+ readonly ImmOrOwnedObject: import("effect/Schema").Struct<{
165
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
166
+ readonly version: import("effect/Schema").BigInt;
167
+ readonly digest: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
168
+ }>;
169
+ readonly SharedObject: import("effect/Schema").Struct<{
170
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
171
+ readonly initialSharedVersion: import("effect/Schema").BigInt;
172
+ readonly mutability: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
173
+ readonly Immutable: null;
174
+ readonly Mutable: null;
175
+ readonly NonExclusiveWrite: null;
176
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
177
+ readonly Immutable: null;
178
+ readonly Mutable: null;
179
+ readonly NonExclusiveWrite: null;
180
+ }>>;
181
+ }>;
182
+ readonly Receiving: import("effect/Schema").Struct<{
183
+ readonly objectId: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
184
+ readonly version: import("effect/Schema").BigInt;
185
+ readonly digest: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
186
+ }>;
187
+ }>>;
188
+ readonly FundsWithdrawal: import("effect/Schema").Struct<{
189
+ readonly reservation: import("@unconfirmed/effect-bcs").BcsSchema<{
190
+ readonly _tag: "MaxAmountU64";
191
+ readonly value: bigint;
192
+ }, {
193
+ readonly _tag: "MaxAmountU64";
194
+ readonly value: bigint;
195
+ }>;
196
+ readonly typeArg: import("@unconfirmed/effect-bcs").BcsSchema<{
197
+ readonly _tag: "Balance";
198
+ readonly value: import("../TypeTag.ts").TypeTag;
199
+ }, {
200
+ readonly _tag: "Balance";
201
+ readonly value: any;
202
+ }>;
203
+ readonly withdrawFrom: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
204
+ readonly Sender: null;
205
+ readonly Sponsor: null;
206
+ readonly SenderAllowance: import("effect/Schema").Struct<{
207
+ readonly funder: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
208
+ readonly allowance: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
209
+ }>;
210
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
211
+ readonly Sender: null;
212
+ readonly Sponsor: null;
213
+ readonly SenderAllowance: import("effect/Schema").Struct<{
214
+ readonly funder: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
215
+ readonly allowance: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
216
+ }>;
217
+ }>>;
218
+ }>;
219
+ }>[];
220
+ readonly commands: readonly import("@unconfirmed/effect-bcs/Bcs").EnumType<{
221
+ readonly MoveCall: import("effect/Schema").Struct<{
222
+ readonly package: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
223
+ readonly module: import("effect/Schema").String;
224
+ readonly function: import("effect/Schema").String;
225
+ readonly typeArguments: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("../TypeTag.ts").TypeTag, any>>;
226
+ readonly arguments: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
227
+ readonly GasCoin: null;
228
+ readonly Input: import("effect/Schema").Int;
229
+ readonly Result: import("effect/Schema").Int;
230
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
231
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
232
+ readonly GasCoin: null;
233
+ readonly Input: import("effect/Schema").Int;
234
+ readonly Result: import("effect/Schema").Int;
235
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
236
+ }>>>;
237
+ }>;
238
+ readonly TransferObjects: import("effect/Schema").Struct<{
239
+ readonly objects: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
240
+ readonly GasCoin: null;
241
+ readonly Input: import("effect/Schema").Int;
242
+ readonly Result: import("effect/Schema").Int;
243
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
244
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
245
+ readonly GasCoin: null;
246
+ readonly Input: import("effect/Schema").Int;
247
+ readonly Result: import("effect/Schema").Int;
248
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
249
+ }>>>;
250
+ readonly address: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
251
+ readonly GasCoin: null;
252
+ readonly Input: import("effect/Schema").Int;
253
+ readonly Result: import("effect/Schema").Int;
254
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
255
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
256
+ readonly GasCoin: null;
257
+ readonly Input: import("effect/Schema").Int;
258
+ readonly Result: import("effect/Schema").Int;
259
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
260
+ }>>;
261
+ }>;
262
+ readonly SplitCoins: import("effect/Schema").Struct<{
263
+ readonly coin: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
264
+ readonly GasCoin: null;
265
+ readonly Input: import("effect/Schema").Int;
266
+ readonly Result: import("effect/Schema").Int;
267
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
268
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
269
+ readonly GasCoin: null;
270
+ readonly Input: import("effect/Schema").Int;
271
+ readonly Result: import("effect/Schema").Int;
272
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
273
+ }>>;
274
+ readonly amounts: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
275
+ readonly GasCoin: null;
276
+ readonly Input: import("effect/Schema").Int;
277
+ readonly Result: import("effect/Schema").Int;
278
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
279
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
280
+ readonly GasCoin: null;
281
+ readonly Input: import("effect/Schema").Int;
282
+ readonly Result: import("effect/Schema").Int;
283
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
284
+ }>>>;
285
+ }>;
286
+ readonly MergeCoins: import("effect/Schema").Struct<{
287
+ readonly destination: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
288
+ readonly GasCoin: null;
289
+ readonly Input: import("effect/Schema").Int;
290
+ readonly Result: import("effect/Schema").Int;
291
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
292
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
293
+ readonly GasCoin: null;
294
+ readonly Input: import("effect/Schema").Int;
295
+ readonly Result: import("effect/Schema").Int;
296
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
297
+ }>>;
298
+ readonly sources: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
299
+ readonly GasCoin: null;
300
+ readonly Input: import("effect/Schema").Int;
301
+ readonly Result: import("effect/Schema").Int;
302
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
303
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
304
+ readonly GasCoin: null;
305
+ readonly Input: import("effect/Schema").Int;
306
+ readonly Result: import("effect/Schema").Int;
307
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
308
+ }>>>;
309
+ }>;
310
+ readonly Publish: import("effect/Schema").Struct<{
311
+ readonly modules: import("effect/Schema").$Array<import("effect/Schema").Uint8Array>;
312
+ readonly dependencies: import("effect/Schema").$Array<import("effect/Schema").brand<import("effect/Schema").String, "Address">>;
313
+ }>;
314
+ readonly MakeMoveVec: import("effect/Schema").Struct<{
315
+ readonly type: import("effect/Schema").Option<import("@unconfirmed/effect-bcs").BcsSchema<import("../TypeTag.ts").TypeTag, any>>;
316
+ readonly elements: import("effect/Schema").$Array<import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
317
+ readonly GasCoin: null;
318
+ readonly Input: import("effect/Schema").Int;
319
+ readonly Result: import("effect/Schema").Int;
320
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
321
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
322
+ readonly GasCoin: null;
323
+ readonly Input: import("effect/Schema").Int;
324
+ readonly Result: import("effect/Schema").Int;
325
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
326
+ }>>>;
327
+ }>;
328
+ readonly Upgrade: import("effect/Schema").Struct<{
329
+ readonly modules: import("effect/Schema").$Array<import("effect/Schema").Uint8Array>;
330
+ readonly dependencies: import("effect/Schema").$Array<import("effect/Schema").brand<import("effect/Schema").String, "Address">>;
331
+ readonly package: import("effect/Schema").brand<import("effect/Schema").String, "Address">;
332
+ readonly ticket: import("@unconfirmed/effect-bcs").BcsSchema<import("@unconfirmed/effect-bcs/Bcs").EnumType<{
333
+ readonly GasCoin: null;
334
+ readonly Input: import("effect/Schema").Int;
335
+ readonly Result: import("effect/Schema").Int;
336
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
337
+ }>, import("@unconfirmed/effect-bcs/Bcs").EnumEncoded<{
338
+ readonly GasCoin: null;
339
+ readonly Input: import("effect/Schema").Int;
340
+ readonly Result: import("effect/Schema").Int;
341
+ readonly NestedResult: import("effect/Schema").Tuple<readonly [import("effect/Schema").Int, import("effect/Schema").Int]>;
342
+ }>>;
343
+ }>;
344
+ }>[];
345
+ } & {
346
+ readonly _tag: "ProgrammableTransaction";
347
+ };
348
+ readonly sender: string & import("effect/Brand").Brand<"Address">;
349
+ readonly gasData: {
350
+ readonly payment: readonly {
351
+ readonly objectId: string & import("effect/Brand").Brand<"Address">;
352
+ readonly version: bigint;
353
+ readonly digest: string & import("effect/Brand").Brand<"Digest">;
354
+ }[];
355
+ readonly owner: string & import("effect/Brand").Brand<"Address">;
356
+ readonly price: bigint;
357
+ readonly budget: bigint;
358
+ };
359
+ readonly expiration: import("@unconfirmed/effect-bcs/Bcs").EnumType<{
360
+ readonly None: null;
361
+ readonly Epoch: import("effect/Schema").BigInt;
362
+ readonly ValidDuring: import("effect/Schema").Struct<{
363
+ minEpoch: import("effect/Schema").Option<import("effect/Schema").BigInt>;
364
+ maxEpoch: import("effect/Schema").Option<import("effect/Schema").BigInt>;
365
+ minTimestamp: import("effect/Schema").Option<import("effect/Schema").BigInt>;
366
+ maxTimestamp: import("effect/Schema").Option<import("effect/Schema").BigInt>;
367
+ chain: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
368
+ nonce: import("effect/Schema").Int;
369
+ }>;
370
+ readonly Validity: import("effect/Schema").Struct<{
371
+ readonly allowedProposers: import("effect/Schema").Option<import("effect/Schema").Struct<{
372
+ readonly epoch: import("effect/Schema").BigInt;
373
+ readonly proposers: import("effect/Schema").$Array<import("effect/Schema").Int>;
374
+ }>>;
375
+ readonly minEpoch: import("effect/Schema").Option<import("effect/Schema").BigInt>;
376
+ readonly maxEpoch: import("effect/Schema").Option<import("effect/Schema").BigInt>;
377
+ readonly minTimestamp: import("effect/Schema").Option<import("effect/Schema").BigInt>;
378
+ readonly maxTimestamp: import("effect/Schema").Option<import("effect/Schema").BigInt>;
379
+ readonly chain: import("effect/Schema").brand<import("effect/Schema").String, "Digest">;
380
+ readonly nonce: import("effect/Schema").Int;
381
+ }>;
382
+ }>;
383
+ } & {
384
+ readonly _tag: "V1";
385
+ }), signers: Signer.Signer | readonly Signer.Signer[], options?: {
386
+ readonly chain?: string;
387
+ } | undefined) => Effect.Effect<{
388
+ readonly bytes: Uint8Array<ArrayBufferLike>;
389
+ readonly digest: string;
390
+ readonly signatures: readonly Uint8Array<ArrayBufferLike>[];
391
+ readonly chain?: string;
392
+ }, Signer.SigningError | Tx.SignerMismatch, never>;
393
+ export interface RunOptions<E = never, R = never> extends Omit<Tx.ResolveOptions<E, R>, "sender">, IncludeOptions {
394
+ readonly signer: Signer.Signer;
395
+ /** Defaults to the signer's address. */
396
+ readonly sender?: Address;
397
+ /** Extra signers, e.g. a sponsor when `gasOwner` is not the sender. */
398
+ readonly cosigners?: ReadonlyArray<Signer.Signer>;
399
+ }
400
+ /**
401
+ * Build (core `Tx.build`), sign, journal, submit. Unless given, the expiration
402
+ * is `ValidDuring` this epoch and the next, so the expiry rule can settle the
403
+ * bytes even when they pin nothing. `include` (`["events", "balanceChanges"]`)
404
+ * adds those to the effects (see `submit`).
405
+ *
406
+ * A signer (or cosigner) that is neither the sender nor the gas owner is
407
+ * `Tx.SignerMismatch` before any network call, as in `Tx.run`.
408
+ *
409
+ * Holds the `SenderLock` of the sender (and a distinct gas owner) for the
410
+ * build, and through signing and submission when the bytes pin a versioned
411
+ * object or gas payment; bytes that pin nothing are signed and sent after the
412
+ * lock is released.
413
+ */
414
+ export declare const run: <A, E1, R1, E2 = never, R2 = never>(recipe: Effect.Effect<A, E1, R1>, options: RunOptions<E2, R2>) => Effect.Effect<Effects, import("../Objects.ts").ObjectNotFound | Resolve.InvalidTransaction | Resolve.GasEstimationFailed | Resolve.ResolutionRejected | Resolve.GasBudgetExceeded | Resolve.InsufficientBalance | Resolve.InvalidBalanceIntent | Resolve.AllowanceError | Resolve.DefaultPaymentError | Signer.SigningError | Tx.SignerMismatch | SubmitError | E1 | E2, import("../Packages.ts").Packages | import("../Coins.ts").Coins | Services | Exclude<Exclude<R1, import("../Ptb.ts").PtbBuilder>, import("effect/Tracer").ParentSpan> | Exclude<Exclude<R2, import("effect/Tracer").ParentSpan>, import("effect/Tracer").ParentSpan>>;
415
+ export {};
416
+ //# sourceMappingURL=Lifecycle.d.ts.map