@cogcoin/client 0.5.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 (289) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +136 -0
  3. package/dist/app-paths.d.ts +38 -0
  4. package/dist/app-paths.js +121 -0
  5. package/dist/art/banner.txt +13 -0
  6. package/dist/art/scroll.txt +13 -0
  7. package/dist/art/train-car.txt +6 -0
  8. package/dist/art/train-smoke.txt +6 -0
  9. package/dist/art/train.txt +6 -0
  10. package/dist/bitcoind/bootstrap/chainstate.d.ts +4 -0
  11. package/dist/bitcoind/bootstrap/chainstate.js +13 -0
  12. package/dist/bitcoind/bootstrap/constants.d.ts +7 -0
  13. package/dist/bitcoind/bootstrap/constants.js +12 -0
  14. package/dist/bitcoind/bootstrap/controller.d.ts +29 -0
  15. package/dist/bitcoind/bootstrap/controller.js +101 -0
  16. package/dist/bitcoind/bootstrap/download.d.ts +2 -0
  17. package/dist/bitcoind/bootstrap/download.js +196 -0
  18. package/dist/bitcoind/bootstrap/headers.d.ts +13 -0
  19. package/dist/bitcoind/bootstrap/headers.js +61 -0
  20. package/dist/bitcoind/bootstrap/paths.d.ts +4 -0
  21. package/dist/bitcoind/bootstrap/paths.js +15 -0
  22. package/dist/bitcoind/bootstrap/snapshot-file.d.ts +7 -0
  23. package/dist/bitcoind/bootstrap/snapshot-file.js +42 -0
  24. package/dist/bitcoind/bootstrap/state.d.ts +40 -0
  25. package/dist/bitcoind/bootstrap/state.js +70 -0
  26. package/dist/bitcoind/bootstrap/types.d.ts +28 -0
  27. package/dist/bitcoind/bootstrap/types.js +1 -0
  28. package/dist/bitcoind/bootstrap.d.ts +8 -0
  29. package/dist/bitcoind/bootstrap.js +7 -0
  30. package/dist/bitcoind/client/factory.d.ts +3 -0
  31. package/dist/bitcoind/client/factory.js +57 -0
  32. package/dist/bitcoind/client/follow-block-times.d.ts +8 -0
  33. package/dist/bitcoind/client/follow-block-times.js +25 -0
  34. package/dist/bitcoind/client/follow-loop.d.ts +10 -0
  35. package/dist/bitcoind/client/follow-loop.js +57 -0
  36. package/dist/bitcoind/client/internal-types.d.ts +63 -0
  37. package/dist/bitcoind/client/internal-types.js +18 -0
  38. package/dist/bitcoind/client/managed-client.d.ts +20 -0
  39. package/dist/bitcoind/client/managed-client.js +197 -0
  40. package/dist/bitcoind/client/rate-tracker.d.ts +2 -0
  41. package/dist/bitcoind/client/rate-tracker.js +24 -0
  42. package/dist/bitcoind/client/sync-engine.d.ts +3 -0
  43. package/dist/bitcoind/client/sync-engine.js +143 -0
  44. package/dist/bitcoind/client.d.ts +1 -0
  45. package/dist/bitcoind/client.js +1 -0
  46. package/dist/bitcoind/errors.d.ts +1 -0
  47. package/dist/bitcoind/errors.js +49 -0
  48. package/dist/bitcoind/index.d.ts +2 -0
  49. package/dist/bitcoind/index.js +1 -0
  50. package/dist/bitcoind/indexer-daemon-main.d.ts +1 -0
  51. package/dist/bitcoind/indexer-daemon-main.js +472 -0
  52. package/dist/bitcoind/indexer-daemon.d.ts +107 -0
  53. package/dist/bitcoind/indexer-daemon.js +391 -0
  54. package/dist/bitcoind/node.d.ts +8 -0
  55. package/dist/bitcoind/node.js +219 -0
  56. package/dist/bitcoind/normalize.d.ts +3 -0
  57. package/dist/bitcoind/normalize.js +47 -0
  58. package/dist/bitcoind/progress/assets.d.ts +10 -0
  59. package/dist/bitcoind/progress/assets.js +90 -0
  60. package/dist/bitcoind/progress/constants.d.ts +48 -0
  61. package/dist/bitcoind/progress/constants.js +53 -0
  62. package/dist/bitcoind/progress/controller.d.ts +28 -0
  63. package/dist/bitcoind/progress/controller.js +188 -0
  64. package/dist/bitcoind/progress/follow-scene.d.ts +40 -0
  65. package/dist/bitcoind/progress/follow-scene.js +367 -0
  66. package/dist/bitcoind/progress/formatting.d.ts +23 -0
  67. package/dist/bitcoind/progress/formatting.js +227 -0
  68. package/dist/bitcoind/progress/quote-scene.d.ts +4 -0
  69. package/dist/bitcoind/progress/quote-scene.js +137 -0
  70. package/dist/bitcoind/progress/train-scene.d.ts +9 -0
  71. package/dist/bitcoind/progress/train-scene.js +92 -0
  72. package/dist/bitcoind/progress/tty-renderer.d.ts +18 -0
  73. package/dist/bitcoind/progress/tty-renderer.js +150 -0
  74. package/dist/bitcoind/progress.d.ts +7 -0
  75. package/dist/bitcoind/progress.js +7 -0
  76. package/dist/bitcoind/quotes.d.ts +24 -0
  77. package/dist/bitcoind/quotes.js +195 -0
  78. package/dist/bitcoind/rpc.d.ts +71 -0
  79. package/dist/bitcoind/rpc.js +322 -0
  80. package/dist/bitcoind/service-paths.d.ts +19 -0
  81. package/dist/bitcoind/service-paths.js +49 -0
  82. package/dist/bitcoind/service.d.ts +40 -0
  83. package/dist/bitcoind/service.js +735 -0
  84. package/dist/bitcoind/testing.d.ts +9 -0
  85. package/dist/bitcoind/testing.js +9 -0
  86. package/dist/bitcoind/types.d.ts +396 -0
  87. package/dist/bitcoind/types.js +3 -0
  88. package/dist/bytes.d.ts +9 -0
  89. package/dist/bytes.js +36 -0
  90. package/dist/cli/commands/follow.d.ts +2 -0
  91. package/dist/cli/commands/follow.js +43 -0
  92. package/dist/cli/commands/mining-admin.d.ts +2 -0
  93. package/dist/cli/commands/mining-admin.js +92 -0
  94. package/dist/cli/commands/mining-read.d.ts +2 -0
  95. package/dist/cli/commands/mining-read.js +173 -0
  96. package/dist/cli/commands/mining-runtime.d.ts +2 -0
  97. package/dist/cli/commands/mining-runtime.js +108 -0
  98. package/dist/cli/commands/status.d.ts +2 -0
  99. package/dist/cli/commands/status.js +31 -0
  100. package/dist/cli/commands/sync.d.ts +2 -0
  101. package/dist/cli/commands/sync.js +52 -0
  102. package/dist/cli/commands/wallet-admin.d.ts +2 -0
  103. package/dist/cli/commands/wallet-admin.js +175 -0
  104. package/dist/cli/commands/wallet-mutation.d.ts +2 -0
  105. package/dist/cli/commands/wallet-mutation.js +681 -0
  106. package/dist/cli/commands/wallet-read.d.ts +2 -0
  107. package/dist/cli/commands/wallet-read.js +265 -0
  108. package/dist/cli/context.d.ts +3 -0
  109. package/dist/cli/context.js +75 -0
  110. package/dist/cli/io.d.ts +3 -0
  111. package/dist/cli/io.js +12 -0
  112. package/dist/cli/mining-format.d.ts +5 -0
  113. package/dist/cli/mining-format.js +156 -0
  114. package/dist/cli/mining-json.d.ts +49 -0
  115. package/dist/cli/mining-json.js +89 -0
  116. package/dist/cli/mutation-command-groups.d.ts +15 -0
  117. package/dist/cli/mutation-command-groups.js +71 -0
  118. package/dist/cli/mutation-json.d.ts +430 -0
  119. package/dist/cli/mutation-json.js +311 -0
  120. package/dist/cli/mutation-resolved-json.d.ts +124 -0
  121. package/dist/cli/mutation-resolved-json.js +129 -0
  122. package/dist/cli/mutation-success.d.ts +20 -0
  123. package/dist/cli/mutation-success.js +47 -0
  124. package/dist/cli/mutation-text-format.d.ts +22 -0
  125. package/dist/cli/mutation-text-format.js +171 -0
  126. package/dist/cli/mutation-text-write.d.ts +13 -0
  127. package/dist/cli/mutation-text-write.js +16 -0
  128. package/dist/cli/output.d.ts +185 -0
  129. package/dist/cli/output.js +1085 -0
  130. package/dist/cli/parse.d.ts +3 -0
  131. package/dist/cli/parse.js +971 -0
  132. package/dist/cli/preview-json.d.ts +416 -0
  133. package/dist/cli/preview-json.js +293 -0
  134. package/dist/cli/prompt.d.ts +3 -0
  135. package/dist/cli/prompt.js +33 -0
  136. package/dist/cli/read-json.d.ts +187 -0
  137. package/dist/cli/read-json.js +675 -0
  138. package/dist/cli/runner.d.ts +2 -0
  139. package/dist/cli/runner.js +129 -0
  140. package/dist/cli/signals.d.ts +3 -0
  141. package/dist/cli/signals.js +63 -0
  142. package/dist/cli/status-format.d.ts +2 -0
  143. package/dist/cli/status-format.js +48 -0
  144. package/dist/cli/types.d.ts +148 -0
  145. package/dist/cli/types.js +2 -0
  146. package/dist/cli/wallet-format.d.ts +29 -0
  147. package/dist/cli/wallet-format.js +637 -0
  148. package/dist/cli/workflow-hints.d.ts +13 -0
  149. package/dist/cli/workflow-hints.js +94 -0
  150. package/dist/cli-runner.d.ts +3 -0
  151. package/dist/cli-runner.js +3 -0
  152. package/dist/cli.d.ts +2 -0
  153. package/dist/cli.js +6 -0
  154. package/dist/client/default-client.d.ts +11 -0
  155. package/dist/client/default-client.js +118 -0
  156. package/dist/client/factory.d.ts +2 -0
  157. package/dist/client/factory.js +15 -0
  158. package/dist/client/initialization.d.ts +6 -0
  159. package/dist/client/initialization.js +30 -0
  160. package/dist/client/persistence.d.ts +5 -0
  161. package/dist/client/persistence.js +28 -0
  162. package/dist/client/store-adapter.d.ts +3 -0
  163. package/dist/client/store-adapter.js +20 -0
  164. package/dist/client.d.ts +2 -0
  165. package/dist/client.js +2 -0
  166. package/dist/index.d.ts +2 -0
  167. package/dist/index.js +1 -0
  168. package/dist/passive-status.d.ts +36 -0
  169. package/dist/passive-status.js +100 -0
  170. package/dist/sqlite/better-sqlite3.d.ts +26 -0
  171. package/dist/sqlite/better-sqlite3.js +4 -0
  172. package/dist/sqlite/checkpoints.d.ts +11 -0
  173. package/dist/sqlite/checkpoints.js +27 -0
  174. package/dist/sqlite/driver.d.ts +17 -0
  175. package/dist/sqlite/driver.js +98 -0
  176. package/dist/sqlite/index.d.ts +4 -0
  177. package/dist/sqlite/index.js +9 -0
  178. package/dist/sqlite/migrate.d.ts +2 -0
  179. package/dist/sqlite/migrate.js +37 -0
  180. package/dist/sqlite/store.d.ts +3 -0
  181. package/dist/sqlite/store.js +122 -0
  182. package/dist/sqlite/tip-meta.d.ts +26 -0
  183. package/dist/sqlite/tip-meta.js +97 -0
  184. package/dist/sqlite/types.d.ts +10 -0
  185. package/dist/sqlite/types.js +1 -0
  186. package/dist/types.d.ts +55 -0
  187. package/dist/types.js +1 -0
  188. package/dist/wallet/archive.d.ts +4 -0
  189. package/dist/wallet/archive.js +39 -0
  190. package/dist/wallet/cogop/constants.d.ts +32 -0
  191. package/dist/wallet/cogop/constants.js +32 -0
  192. package/dist/wallet/cogop/index.d.ts +32 -0
  193. package/dist/wallet/cogop/index.js +213 -0
  194. package/dist/wallet/cogop/numeric.d.ts +3 -0
  195. package/dist/wallet/cogop/numeric.js +24 -0
  196. package/dist/wallet/cogop/scriptpubkey.d.ts +2 -0
  197. package/dist/wallet/cogop/scriptpubkey.js +13 -0
  198. package/dist/wallet/cogop/validate-name.d.ts +2 -0
  199. package/dist/wallet/cogop/validate-name.js +18 -0
  200. package/dist/wallet/fs/atomic.d.ts +6 -0
  201. package/dist/wallet/fs/atomic.js +46 -0
  202. package/dist/wallet/fs/lock.d.ts +19 -0
  203. package/dist/wallet/fs/lock.js +61 -0
  204. package/dist/wallet/fs/status-file.d.ts +1 -0
  205. package/dist/wallet/fs/status-file.js +4 -0
  206. package/dist/wallet/lifecycle.d.ts +193 -0
  207. package/dist/wallet/lifecycle.js +1475 -0
  208. package/dist/wallet/material.d.ts +45 -0
  209. package/dist/wallet/material.js +118 -0
  210. package/dist/wallet/mining/config.d.ts +18 -0
  211. package/dist/wallet/mining/config.js +44 -0
  212. package/dist/wallet/mining/constants.d.ts +24 -0
  213. package/dist/wallet/mining/constants.js +24 -0
  214. package/dist/wallet/mining/control.d.ts +53 -0
  215. package/dist/wallet/mining/control.js +758 -0
  216. package/dist/wallet/mining/coordination.d.ts +40 -0
  217. package/dist/wallet/mining/coordination.js +121 -0
  218. package/dist/wallet/mining/hook-protocol.d.ts +47 -0
  219. package/dist/wallet/mining/hook-protocol.js +161 -0
  220. package/dist/wallet/mining/hook-runner.d.ts +1 -0
  221. package/dist/wallet/mining/hook-runner.js +52 -0
  222. package/dist/wallet/mining/hooks.d.ts +38 -0
  223. package/dist/wallet/mining/hooks.js +520 -0
  224. package/dist/wallet/mining/index.d.ts +8 -0
  225. package/dist/wallet/mining/index.js +6 -0
  226. package/dist/wallet/mining/runner.d.ts +155 -0
  227. package/dist/wallet/mining/runner.js +2574 -0
  228. package/dist/wallet/mining/runtime-artifacts.d.ts +17 -0
  229. package/dist/wallet/mining/runtime-artifacts.js +166 -0
  230. package/dist/wallet/mining/sentences.d.ts +23 -0
  231. package/dist/wallet/mining/sentences.js +281 -0
  232. package/dist/wallet/mining/state.d.ts +9 -0
  233. package/dist/wallet/mining/state.js +75 -0
  234. package/dist/wallet/mining/types.d.ts +141 -0
  235. package/dist/wallet/mining/types.js +1 -0
  236. package/dist/wallet/mining/visualizer.d.ts +19 -0
  237. package/dist/wallet/mining/visualizer.js +134 -0
  238. package/dist/wallet/mining/worker-main.d.ts +1 -0
  239. package/dist/wallet/mining/worker-main.js +17 -0
  240. package/dist/wallet/read/context.d.ts +20 -0
  241. package/dist/wallet/read/context.js +532 -0
  242. package/dist/wallet/read/filter.d.ts +9 -0
  243. package/dist/wallet/read/filter.js +42 -0
  244. package/dist/wallet/read/index.d.ts +4 -0
  245. package/dist/wallet/read/index.js +3 -0
  246. package/dist/wallet/read/project.d.ts +11 -0
  247. package/dist/wallet/read/project.js +300 -0
  248. package/dist/wallet/read/types.d.ts +144 -0
  249. package/dist/wallet/read/types.js +1 -0
  250. package/dist/wallet/runtime.d.ts +26 -0
  251. package/dist/wallet/runtime.js +28 -0
  252. package/dist/wallet/state/crypto.d.ts +31 -0
  253. package/dist/wallet/state/crypto.js +127 -0
  254. package/dist/wallet/state/provider.d.ts +37 -0
  255. package/dist/wallet/state/provider.js +312 -0
  256. package/dist/wallet/state/session.d.ts +12 -0
  257. package/dist/wallet/state/session.js +23 -0
  258. package/dist/wallet/state/storage.d.ts +19 -0
  259. package/dist/wallet/state/storage.js +55 -0
  260. package/dist/wallet/tx/anchor.d.ts +40 -0
  261. package/dist/wallet/tx/anchor.js +1210 -0
  262. package/dist/wallet/tx/cog.d.ts +92 -0
  263. package/dist/wallet/tx/cog.js +1055 -0
  264. package/dist/wallet/tx/common.d.ts +89 -0
  265. package/dist/wallet/tx/common.js +156 -0
  266. package/dist/wallet/tx/confirm.d.ts +15 -0
  267. package/dist/wallet/tx/confirm.js +24 -0
  268. package/dist/wallet/tx/domain-admin.d.ts +105 -0
  269. package/dist/wallet/tx/domain-admin.js +869 -0
  270. package/dist/wallet/tx/domain-market.d.ts +112 -0
  271. package/dist/wallet/tx/domain-market.js +1365 -0
  272. package/dist/wallet/tx/field.d.ts +101 -0
  273. package/dist/wallet/tx/field.js +1853 -0
  274. package/dist/wallet/tx/identity-selector.d.ts +12 -0
  275. package/dist/wallet/tx/identity-selector.js +52 -0
  276. package/dist/wallet/tx/index.d.ts +7 -0
  277. package/dist/wallet/tx/index.js +7 -0
  278. package/dist/wallet/tx/journal.d.ts +5 -0
  279. package/dist/wallet/tx/journal.js +31 -0
  280. package/dist/wallet/tx/register.d.ts +68 -0
  281. package/dist/wallet/tx/register.js +952 -0
  282. package/dist/wallet/tx/reputation.d.ts +72 -0
  283. package/dist/wallet/tx/reputation.js +693 -0
  284. package/dist/wallet/tx/targets.d.ts +7 -0
  285. package/dist/wallet/tx/targets.js +122 -0
  286. package/dist/wallet/types.d.ts +249 -0
  287. package/dist/wallet/types.js +1 -0
  288. package/dist/writing_quotes.json +1654 -0
  289. package/package.json +78 -0
@@ -0,0 +1,15 @@
1
+ import type { CommandName } from "./types.js";
2
+ export declare const walletMutationCommands: readonly ["anchor", "domain-anchor", "register", "domain-register", "transfer", "domain-transfer", "sell", "domain-sell", "unsell", "domain-unsell", "buy", "domain-buy", "domain-endpoint-set", "domain-endpoint-clear", "domain-delegate-set", "domain-delegate-clear", "domain-miner-set", "domain-miner-clear", "domain-canonical", "field-create", "field-set", "field-clear", "send", "cog-send", "claim", "cog-claim", "reclaim", "cog-reclaim", "cog-lock", "rep-give", "rep-revoke"];
3
+ export type WalletMutationCommand = (typeof walletMutationCommands)[number];
4
+ export declare function isWalletMutationCommand(command: CommandName | null): command is WalletMutationCommand;
5
+ export declare function isAnchorMutationCommand(command: CommandName | null): command is "anchor" | "domain-anchor";
6
+ export declare function isRegisterMutationCommand(command: CommandName | null): command is "register" | "domain-register";
7
+ export declare function isTransferMutationCommand(command: CommandName | null): command is "transfer" | "domain-transfer";
8
+ export declare function isSellMutationCommand(command: CommandName | null): command is "sell" | "domain-sell";
9
+ export declare function isUnsellMutationCommand(command: CommandName | null): command is "unsell" | "domain-unsell";
10
+ export declare function isSellOrUnsellMutationCommand(command: CommandName | null): command is "sell" | "domain-sell" | "unsell" | "domain-unsell";
11
+ export declare function isBuyMutationCommand(command: CommandName | null): command is "buy" | "domain-buy";
12
+ export declare function isSendMutationCommand(command: CommandName | null): command is "send" | "cog-send";
13
+ export declare function isClaimMutationCommand(command: CommandName | null): command is "claim" | "cog-claim";
14
+ export declare function isReclaimMutationCommand(command: CommandName | null): command is "reclaim" | "cog-reclaim";
15
+ export declare function isReputationMutationCommand(command: CommandName | null): command is "rep-give" | "rep-revoke";
@@ -0,0 +1,71 @@
1
+ export const walletMutationCommands = [
2
+ "anchor",
3
+ "domain-anchor",
4
+ "register",
5
+ "domain-register",
6
+ "transfer",
7
+ "domain-transfer",
8
+ "sell",
9
+ "domain-sell",
10
+ "unsell",
11
+ "domain-unsell",
12
+ "buy",
13
+ "domain-buy",
14
+ "domain-endpoint-set",
15
+ "domain-endpoint-clear",
16
+ "domain-delegate-set",
17
+ "domain-delegate-clear",
18
+ "domain-miner-set",
19
+ "domain-miner-clear",
20
+ "domain-canonical",
21
+ "field-create",
22
+ "field-set",
23
+ "field-clear",
24
+ "send",
25
+ "cog-send",
26
+ "claim",
27
+ "cog-claim",
28
+ "reclaim",
29
+ "cog-reclaim",
30
+ "cog-lock",
31
+ "rep-give",
32
+ "rep-revoke",
33
+ ];
34
+ const walletMutationCommandSet = new Set(walletMutationCommands);
35
+ export function isWalletMutationCommand(command) {
36
+ return command !== null
37
+ && walletMutationCommandSet.has(command);
38
+ }
39
+ export function isAnchorMutationCommand(command) {
40
+ return command === "anchor" || command === "domain-anchor";
41
+ }
42
+ export function isRegisterMutationCommand(command) {
43
+ return command === "register" || command === "domain-register";
44
+ }
45
+ export function isTransferMutationCommand(command) {
46
+ return command === "transfer" || command === "domain-transfer";
47
+ }
48
+ export function isSellMutationCommand(command) {
49
+ return command === "sell" || command === "domain-sell";
50
+ }
51
+ export function isUnsellMutationCommand(command) {
52
+ return command === "unsell" || command === "domain-unsell";
53
+ }
54
+ export function isSellOrUnsellMutationCommand(command) {
55
+ return isSellMutationCommand(command) || isUnsellMutationCommand(command);
56
+ }
57
+ export function isBuyMutationCommand(command) {
58
+ return command === "buy" || command === "domain-buy";
59
+ }
60
+ export function isSendMutationCommand(command) {
61
+ return command === "send" || command === "cog-send";
62
+ }
63
+ export function isClaimMutationCommand(command) {
64
+ return command === "claim" || command === "cog-claim";
65
+ }
66
+ export function isReclaimMutationCommand(command) {
67
+ return command === "reclaim" || command === "cog-reclaim";
68
+ }
69
+ export function isReputationMutationCommand(command) {
70
+ return command === "rep-give" || command === "rep-revoke";
71
+ }
@@ -0,0 +1,430 @@
1
+ import type { AnchorDomainResult, CogMutationResult, DomainAdminMutationResult, DomainMarketMutationResult, FieldMutationResult, RegisterDomainResult, ReputationMutationResult } from "../wallet/tx/index.js";
2
+ import type { WalletInitializationResult, WalletExportResult, WalletImportResult, WalletRepairResult, WalletUnlockResult } from "../wallet/lifecycle.js";
3
+ export declare function buildSingleTxMutationData(options: {
4
+ kind: string;
5
+ localStatus: string;
6
+ txid: string | null | undefined;
7
+ wtxid?: string | null | undefined;
8
+ reusedExisting: boolean;
9
+ intent: Record<string, unknown>;
10
+ journalKind?: string | null;
11
+ intentFingerprintHex?: string | null;
12
+ }): {
13
+ resultType: "single-tx-mutation";
14
+ mutation: {
15
+ kind: string;
16
+ journalKind: string;
17
+ localStatus: string;
18
+ reusedExisting: boolean;
19
+ intentFingerprintHex: string | null;
20
+ };
21
+ transaction: {
22
+ txid: string | null;
23
+ wtxid: string | null;
24
+ };
25
+ intent: Record<string, unknown>;
26
+ };
27
+ export declare function buildFamilyMutationData(options: {
28
+ familyKind: string;
29
+ familyStatus: string;
30
+ reusedExisting: boolean;
31
+ intent: Record<string, unknown>;
32
+ currentStep?: string | null;
33
+ tx1Txid?: string | null | undefined;
34
+ tx1Wtxid?: string | null | undefined;
35
+ tx2Txid?: string | null | undefined;
36
+ tx2Wtxid?: string | null | undefined;
37
+ intentFingerprintHex?: string | null;
38
+ }): {
39
+ resultType: "family-mutation";
40
+ family: {
41
+ kind: string;
42
+ localStatus: string;
43
+ reusedExisting: boolean;
44
+ currentStep: string | null;
45
+ intentFingerprintHex: string | null;
46
+ };
47
+ transactions: {
48
+ tx1: {
49
+ txid: string | null;
50
+ wtxid: string | null;
51
+ };
52
+ tx2: {
53
+ txid: string | null;
54
+ wtxid: string | null;
55
+ };
56
+ };
57
+ intent: Record<string, unknown>;
58
+ };
59
+ export declare function buildStateChangeData(options: {
60
+ kind: string;
61
+ state: Record<string, unknown>;
62
+ before?: Record<string, unknown> | null;
63
+ after?: Record<string, unknown> | null;
64
+ }): {
65
+ resultType: "state-change";
66
+ stateChange: {
67
+ kind: string;
68
+ before: Record<string, unknown> | null;
69
+ after: Record<string, unknown> | null;
70
+ };
71
+ state: Record<string, unknown>;
72
+ };
73
+ export declare function buildOperationData(options: {
74
+ kind: string;
75
+ state?: Record<string, unknown> | null;
76
+ operation: Record<string, unknown>;
77
+ }): {
78
+ resultType: "operation";
79
+ operation: {
80
+ kind: string;
81
+ };
82
+ state: Record<string, unknown> | null;
83
+ };
84
+ export declare function buildRegisterMutationData(result: RegisterDomainResult, options: {
85
+ forceRace: boolean;
86
+ fromIdentity: string | null;
87
+ }): {
88
+ resolved: {
89
+ path: "root" | "subdomain";
90
+ parentDomainName: string | null;
91
+ sender: {
92
+ selector: string;
93
+ localIndex: number;
94
+ scriptPubKeyHex: string;
95
+ address: string;
96
+ };
97
+ economicEffect: {
98
+ kind: "treasury-payment" | "cog-burn";
99
+ amount: string | null;
100
+ };
101
+ };
102
+ resultType: "single-tx-mutation";
103
+ mutation: {
104
+ kind: string;
105
+ journalKind: string;
106
+ localStatus: string;
107
+ reusedExisting: boolean;
108
+ intentFingerprintHex: string | null;
109
+ };
110
+ transaction: {
111
+ txid: string | null;
112
+ wtxid: string | null;
113
+ };
114
+ intent: Record<string, unknown>;
115
+ };
116
+ export declare function buildDomainMarketMutationData(result: DomainMarketMutationResult, options: {
117
+ commandKind: "transfer" | "sell" | "unsell" | "buy";
118
+ fromIdentity?: string | null;
119
+ }): {
120
+ resolved: {
121
+ buyer: {
122
+ selector: string;
123
+ localIndex: number;
124
+ scriptPubKeyHex: string;
125
+ address: string;
126
+ } | null;
127
+ seller: {
128
+ scriptPubKeyHex: string;
129
+ address: string | null;
130
+ } | null;
131
+ sender?: undefined;
132
+ recipient?: undefined;
133
+ economicEffect?: undefined;
134
+ } | {
135
+ sender: {
136
+ selector: string;
137
+ localIndex: number;
138
+ scriptPubKeyHex: string;
139
+ address: string;
140
+ };
141
+ recipient: {
142
+ scriptPubKeyHex: string;
143
+ address: string | null;
144
+ opaque: boolean;
145
+ } | null;
146
+ economicEffect: {
147
+ kind: "ownership-transfer";
148
+ clearsListing: boolean;
149
+ listedPriceCogtoshi?: undefined;
150
+ } | {
151
+ kind: "listing-set" | "listing-clear";
152
+ listedPriceCogtoshi: string;
153
+ clearsListing?: undefined;
154
+ };
155
+ buyer?: undefined;
156
+ seller?: undefined;
157
+ } | null;
158
+ resultType: "single-tx-mutation";
159
+ mutation: {
160
+ kind: string;
161
+ journalKind: string;
162
+ localStatus: string;
163
+ reusedExisting: boolean;
164
+ intentFingerprintHex: string | null;
165
+ };
166
+ transaction: {
167
+ txid: string | null;
168
+ wtxid: string | null;
169
+ };
170
+ intent: Record<string, unknown>;
171
+ };
172
+ export declare function buildCogMutationData(result: CogMutationResult, options: {
173
+ commandKind: "send" | "claim" | "reclaim" | "cog-lock";
174
+ fromIdentity: string | null;
175
+ timeoutBlocksOrDuration?: string | null;
176
+ timeoutHeight?: string | null;
177
+ conditionHex?: string | null;
178
+ }): {
179
+ resolved: {
180
+ claimPath?: import("../wallet/tx/cog.js").CogResolvedClaimPath | null | undefined;
181
+ sender: {
182
+ selector: string;
183
+ localIndex: number;
184
+ scriptPubKeyHex: string;
185
+ address: string;
186
+ };
187
+ };
188
+ resultType: "single-tx-mutation";
189
+ mutation: {
190
+ kind: string;
191
+ journalKind: string;
192
+ localStatus: string;
193
+ reusedExisting: boolean;
194
+ intentFingerprintHex: string | null;
195
+ };
196
+ transaction: {
197
+ txid: string | null;
198
+ wtxid: string | null;
199
+ };
200
+ intent: Record<string, unknown>;
201
+ };
202
+ export declare function buildAnchorMutationData(result: AnchorDomainResult, options: {
203
+ foundingMessageText: string | null;
204
+ }): {
205
+ resultType: "family-mutation";
206
+ family: {
207
+ kind: string;
208
+ localStatus: string;
209
+ reusedExisting: boolean;
210
+ currentStep: string | null;
211
+ intentFingerprintHex: string | null;
212
+ };
213
+ transactions: {
214
+ tx1: {
215
+ txid: string | null;
216
+ wtxid: string | null;
217
+ };
218
+ tx2: {
219
+ txid: string | null;
220
+ wtxid: string | null;
221
+ };
222
+ };
223
+ intent: Record<string, unknown>;
224
+ };
225
+ export declare function buildDomainAdminMutationData(result: DomainAdminMutationResult, options: {
226
+ commandKind: "domain-endpoint-set" | "domain-endpoint-clear" | "domain-delegate-set" | "domain-delegate-clear" | "domain-miner-set" | "domain-miner-clear" | "domain-canonical";
227
+ }): {
228
+ resolved: {
229
+ sender: {
230
+ selector: string;
231
+ localIndex: number;
232
+ scriptPubKeyHex: string;
233
+ address: string;
234
+ };
235
+ target: {
236
+ scriptPubKeyHex: string;
237
+ address: string | null;
238
+ opaque: boolean;
239
+ } | null;
240
+ effect: {
241
+ kind: "endpoint-set";
242
+ byteLength: number;
243
+ } | {
244
+ kind: "endpoint-clear" | "delegate-set" | "delegate-clear" | "miner-set" | "miner-clear" | "canonicalize-owner";
245
+ byteLength?: undefined;
246
+ };
247
+ } | null;
248
+ resultType: "single-tx-mutation";
249
+ mutation: {
250
+ kind: string;
251
+ journalKind: string;
252
+ localStatus: string;
253
+ reusedExisting: boolean;
254
+ intentFingerprintHex: string | null;
255
+ };
256
+ transaction: {
257
+ txid: string | null;
258
+ wtxid: string | null;
259
+ };
260
+ intent: Record<string, unknown>;
261
+ };
262
+ export declare function buildFieldMutationData(result: FieldMutationResult): {
263
+ resolved: {
264
+ sender: {
265
+ selector: string;
266
+ localIndex: number;
267
+ scriptPubKeyHex: string;
268
+ address: string;
269
+ };
270
+ path: import("../wallet/tx/field.js").FieldResolvedPath;
271
+ value: {
272
+ format: number;
273
+ byteLength: number;
274
+ } | null;
275
+ effect: {
276
+ kind: "create-and-initialize-field";
277
+ tx1BurnCogtoshi: "100";
278
+ tx2AdditionalBurnCogtoshi: "1";
279
+ burnCogtoshi?: undefined;
280
+ } | {
281
+ kind: "create-empty-field" | "write-field-value" | "clear-field-value";
282
+ burnCogtoshi: "0" | "1" | "100";
283
+ tx1BurnCogtoshi?: undefined;
284
+ tx2AdditionalBurnCogtoshi?: undefined;
285
+ };
286
+ } | null;
287
+ resultType: "family-mutation";
288
+ family: {
289
+ kind: string;
290
+ localStatus: string;
291
+ reusedExisting: boolean;
292
+ currentStep: string | null;
293
+ intentFingerprintHex: string | null;
294
+ };
295
+ transactions: {
296
+ tx1: {
297
+ txid: string | null;
298
+ wtxid: string | null;
299
+ };
300
+ tx2: {
301
+ txid: string | null;
302
+ wtxid: string | null;
303
+ };
304
+ };
305
+ intent: Record<string, unknown>;
306
+ } | {
307
+ resolved: {
308
+ sender: {
309
+ selector: string;
310
+ localIndex: number;
311
+ scriptPubKeyHex: string;
312
+ address: string;
313
+ };
314
+ path: import("../wallet/tx/field.js").FieldResolvedPath;
315
+ value: {
316
+ format: number;
317
+ byteLength: number;
318
+ } | null;
319
+ effect: {
320
+ kind: "create-and-initialize-field";
321
+ tx1BurnCogtoshi: "100";
322
+ tx2AdditionalBurnCogtoshi: "1";
323
+ burnCogtoshi?: undefined;
324
+ } | {
325
+ kind: "create-empty-field" | "write-field-value" | "clear-field-value";
326
+ burnCogtoshi: "0" | "1" | "100";
327
+ tx1BurnCogtoshi?: undefined;
328
+ tx2AdditionalBurnCogtoshi?: undefined;
329
+ };
330
+ } | null;
331
+ resultType: "single-tx-mutation";
332
+ mutation: {
333
+ kind: string;
334
+ journalKind: string;
335
+ localStatus: string;
336
+ reusedExisting: boolean;
337
+ intentFingerprintHex: string | null;
338
+ };
339
+ transaction: {
340
+ txid: string | null;
341
+ wtxid: string | null;
342
+ };
343
+ intent: Record<string, unknown>;
344
+ };
345
+ export declare function buildReputationMutationData(result: ReputationMutationResult): {
346
+ resolved: {
347
+ sender: {
348
+ selector: string;
349
+ localIndex: number;
350
+ scriptPubKeyHex: string;
351
+ address: string;
352
+ };
353
+ effect: {
354
+ kind: "give-support" | "revoke-support";
355
+ burnCogtoshi: string;
356
+ };
357
+ review: {
358
+ included: boolean;
359
+ byteLength: number | null;
360
+ };
361
+ selfStake: boolean;
362
+ } | null;
363
+ resultType: "single-tx-mutation";
364
+ mutation: {
365
+ kind: string;
366
+ journalKind: string;
367
+ localStatus: string;
368
+ reusedExisting: boolean;
369
+ intentFingerprintHex: string | null;
370
+ };
371
+ transaction: {
372
+ txid: string | null;
373
+ wtxid: string | null;
374
+ };
375
+ intent: Record<string, unknown>;
376
+ };
377
+ export declare function buildWalletLockMutationData(result: {
378
+ walletRootId: string | null;
379
+ }): {
380
+ resultType: "state-change";
381
+ stateChange: {
382
+ kind: string;
383
+ before: Record<string, unknown> | null;
384
+ after: Record<string, unknown> | null;
385
+ };
386
+ state: Record<string, unknown>;
387
+ };
388
+ export declare function buildInitMutationData(result: WalletInitializationResult): {
389
+ resultType: "state-change";
390
+ stateChange: {
391
+ kind: string;
392
+ before: Record<string, unknown> | null;
393
+ after: Record<string, unknown> | null;
394
+ };
395
+ state: Record<string, unknown>;
396
+ };
397
+ export declare function buildUnlockMutationData(result: WalletUnlockResult): {
398
+ resultType: "state-change";
399
+ stateChange: {
400
+ kind: string;
401
+ before: Record<string, unknown> | null;
402
+ after: Record<string, unknown> | null;
403
+ };
404
+ state: Record<string, unknown>;
405
+ };
406
+ export declare function buildWalletExportMutationData(result: WalletExportResult): {
407
+ resultType: "operation";
408
+ operation: {
409
+ kind: string;
410
+ };
411
+ state: Record<string, unknown> | null;
412
+ };
413
+ export declare function buildWalletImportMutationData(result: WalletImportResult): {
414
+ resultType: "state-change";
415
+ stateChange: {
416
+ kind: string;
417
+ before: Record<string, unknown> | null;
418
+ after: Record<string, unknown> | null;
419
+ };
420
+ state: Record<string, unknown>;
421
+ };
422
+ export declare function buildRepairMutationData(result: WalletRepairResult): {
423
+ resultType: "state-change";
424
+ stateChange: {
425
+ kind: string;
426
+ before: Record<string, unknown> | null;
427
+ after: Record<string, unknown> | null;
428
+ };
429
+ state: Record<string, unknown>;
430
+ };