@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.
- package/LICENSE +21 -0
- package/README.md +136 -0
- package/dist/app-paths.d.ts +38 -0
- package/dist/app-paths.js +121 -0
- package/dist/art/banner.txt +13 -0
- package/dist/art/scroll.txt +13 -0
- package/dist/art/train-car.txt +6 -0
- package/dist/art/train-smoke.txt +6 -0
- package/dist/art/train.txt +6 -0
- package/dist/bitcoind/bootstrap/chainstate.d.ts +4 -0
- package/dist/bitcoind/bootstrap/chainstate.js +13 -0
- package/dist/bitcoind/bootstrap/constants.d.ts +7 -0
- package/dist/bitcoind/bootstrap/constants.js +12 -0
- package/dist/bitcoind/bootstrap/controller.d.ts +29 -0
- package/dist/bitcoind/bootstrap/controller.js +101 -0
- package/dist/bitcoind/bootstrap/download.d.ts +2 -0
- package/dist/bitcoind/bootstrap/download.js +196 -0
- package/dist/bitcoind/bootstrap/headers.d.ts +13 -0
- package/dist/bitcoind/bootstrap/headers.js +61 -0
- package/dist/bitcoind/bootstrap/paths.d.ts +4 -0
- package/dist/bitcoind/bootstrap/paths.js +15 -0
- package/dist/bitcoind/bootstrap/snapshot-file.d.ts +7 -0
- package/dist/bitcoind/bootstrap/snapshot-file.js +42 -0
- package/dist/bitcoind/bootstrap/state.d.ts +40 -0
- package/dist/bitcoind/bootstrap/state.js +70 -0
- package/dist/bitcoind/bootstrap/types.d.ts +28 -0
- package/dist/bitcoind/bootstrap/types.js +1 -0
- package/dist/bitcoind/bootstrap.d.ts +8 -0
- package/dist/bitcoind/bootstrap.js +7 -0
- package/dist/bitcoind/client/factory.d.ts +3 -0
- package/dist/bitcoind/client/factory.js +57 -0
- package/dist/bitcoind/client/follow-block-times.d.ts +8 -0
- package/dist/bitcoind/client/follow-block-times.js +25 -0
- package/dist/bitcoind/client/follow-loop.d.ts +10 -0
- package/dist/bitcoind/client/follow-loop.js +57 -0
- package/dist/bitcoind/client/internal-types.d.ts +63 -0
- package/dist/bitcoind/client/internal-types.js +18 -0
- package/dist/bitcoind/client/managed-client.d.ts +20 -0
- package/dist/bitcoind/client/managed-client.js +197 -0
- package/dist/bitcoind/client/rate-tracker.d.ts +2 -0
- package/dist/bitcoind/client/rate-tracker.js +24 -0
- package/dist/bitcoind/client/sync-engine.d.ts +3 -0
- package/dist/bitcoind/client/sync-engine.js +143 -0
- package/dist/bitcoind/client.d.ts +1 -0
- package/dist/bitcoind/client.js +1 -0
- package/dist/bitcoind/errors.d.ts +1 -0
- package/dist/bitcoind/errors.js +49 -0
- package/dist/bitcoind/index.d.ts +2 -0
- package/dist/bitcoind/index.js +1 -0
- package/dist/bitcoind/indexer-daemon-main.d.ts +1 -0
- package/dist/bitcoind/indexer-daemon-main.js +472 -0
- package/dist/bitcoind/indexer-daemon.d.ts +107 -0
- package/dist/bitcoind/indexer-daemon.js +391 -0
- package/dist/bitcoind/node.d.ts +8 -0
- package/dist/bitcoind/node.js +219 -0
- package/dist/bitcoind/normalize.d.ts +3 -0
- package/dist/bitcoind/normalize.js +47 -0
- package/dist/bitcoind/progress/assets.d.ts +10 -0
- package/dist/bitcoind/progress/assets.js +90 -0
- package/dist/bitcoind/progress/constants.d.ts +48 -0
- package/dist/bitcoind/progress/constants.js +53 -0
- package/dist/bitcoind/progress/controller.d.ts +28 -0
- package/dist/bitcoind/progress/controller.js +188 -0
- package/dist/bitcoind/progress/follow-scene.d.ts +40 -0
- package/dist/bitcoind/progress/follow-scene.js +367 -0
- package/dist/bitcoind/progress/formatting.d.ts +23 -0
- package/dist/bitcoind/progress/formatting.js +227 -0
- package/dist/bitcoind/progress/quote-scene.d.ts +4 -0
- package/dist/bitcoind/progress/quote-scene.js +137 -0
- package/dist/bitcoind/progress/train-scene.d.ts +9 -0
- package/dist/bitcoind/progress/train-scene.js +92 -0
- package/dist/bitcoind/progress/tty-renderer.d.ts +18 -0
- package/dist/bitcoind/progress/tty-renderer.js +150 -0
- package/dist/bitcoind/progress.d.ts +7 -0
- package/dist/bitcoind/progress.js +7 -0
- package/dist/bitcoind/quotes.d.ts +24 -0
- package/dist/bitcoind/quotes.js +195 -0
- package/dist/bitcoind/rpc.d.ts +71 -0
- package/dist/bitcoind/rpc.js +322 -0
- package/dist/bitcoind/service-paths.d.ts +19 -0
- package/dist/bitcoind/service-paths.js +49 -0
- package/dist/bitcoind/service.d.ts +40 -0
- package/dist/bitcoind/service.js +735 -0
- package/dist/bitcoind/testing.d.ts +9 -0
- package/dist/bitcoind/testing.js +9 -0
- package/dist/bitcoind/types.d.ts +396 -0
- package/dist/bitcoind/types.js +3 -0
- package/dist/bytes.d.ts +9 -0
- package/dist/bytes.js +36 -0
- package/dist/cli/commands/follow.d.ts +2 -0
- package/dist/cli/commands/follow.js +43 -0
- package/dist/cli/commands/mining-admin.d.ts +2 -0
- package/dist/cli/commands/mining-admin.js +92 -0
- package/dist/cli/commands/mining-read.d.ts +2 -0
- package/dist/cli/commands/mining-read.js +173 -0
- package/dist/cli/commands/mining-runtime.d.ts +2 -0
- package/dist/cli/commands/mining-runtime.js +108 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.js +31 -0
- package/dist/cli/commands/sync.d.ts +2 -0
- package/dist/cli/commands/sync.js +52 -0
- package/dist/cli/commands/wallet-admin.d.ts +2 -0
- package/dist/cli/commands/wallet-admin.js +175 -0
- package/dist/cli/commands/wallet-mutation.d.ts +2 -0
- package/dist/cli/commands/wallet-mutation.js +681 -0
- package/dist/cli/commands/wallet-read.d.ts +2 -0
- package/dist/cli/commands/wallet-read.js +265 -0
- package/dist/cli/context.d.ts +3 -0
- package/dist/cli/context.js +75 -0
- package/dist/cli/io.d.ts +3 -0
- package/dist/cli/io.js +12 -0
- package/dist/cli/mining-format.d.ts +5 -0
- package/dist/cli/mining-format.js +156 -0
- package/dist/cli/mining-json.d.ts +49 -0
- package/dist/cli/mining-json.js +89 -0
- package/dist/cli/mutation-command-groups.d.ts +15 -0
- package/dist/cli/mutation-command-groups.js +71 -0
- package/dist/cli/mutation-json.d.ts +430 -0
- package/dist/cli/mutation-json.js +311 -0
- package/dist/cli/mutation-resolved-json.d.ts +124 -0
- package/dist/cli/mutation-resolved-json.js +129 -0
- package/dist/cli/mutation-success.d.ts +20 -0
- package/dist/cli/mutation-success.js +47 -0
- package/dist/cli/mutation-text-format.d.ts +22 -0
- package/dist/cli/mutation-text-format.js +171 -0
- package/dist/cli/mutation-text-write.d.ts +13 -0
- package/dist/cli/mutation-text-write.js +16 -0
- package/dist/cli/output.d.ts +185 -0
- package/dist/cli/output.js +1085 -0
- package/dist/cli/parse.d.ts +3 -0
- package/dist/cli/parse.js +971 -0
- package/dist/cli/preview-json.d.ts +416 -0
- package/dist/cli/preview-json.js +293 -0
- package/dist/cli/prompt.d.ts +3 -0
- package/dist/cli/prompt.js +33 -0
- package/dist/cli/read-json.d.ts +187 -0
- package/dist/cli/read-json.js +675 -0
- package/dist/cli/runner.d.ts +2 -0
- package/dist/cli/runner.js +129 -0
- package/dist/cli/signals.d.ts +3 -0
- package/dist/cli/signals.js +63 -0
- package/dist/cli/status-format.d.ts +2 -0
- package/dist/cli/status-format.js +48 -0
- package/dist/cli/types.d.ts +148 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/wallet-format.d.ts +29 -0
- package/dist/cli/wallet-format.js +637 -0
- package/dist/cli/workflow-hints.d.ts +13 -0
- package/dist/cli/workflow-hints.js +94 -0
- package/dist/cli-runner.d.ts +3 -0
- package/dist/cli-runner.js +3 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +6 -0
- package/dist/client/default-client.d.ts +11 -0
- package/dist/client/default-client.js +118 -0
- package/dist/client/factory.d.ts +2 -0
- package/dist/client/factory.js +15 -0
- package/dist/client/initialization.d.ts +6 -0
- package/dist/client/initialization.js +30 -0
- package/dist/client/persistence.d.ts +5 -0
- package/dist/client/persistence.js +28 -0
- package/dist/client/store-adapter.d.ts +3 -0
- package/dist/client/store-adapter.js +20 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/passive-status.d.ts +36 -0
- package/dist/passive-status.js +100 -0
- package/dist/sqlite/better-sqlite3.d.ts +26 -0
- package/dist/sqlite/better-sqlite3.js +4 -0
- package/dist/sqlite/checkpoints.d.ts +11 -0
- package/dist/sqlite/checkpoints.js +27 -0
- package/dist/sqlite/driver.d.ts +17 -0
- package/dist/sqlite/driver.js +98 -0
- package/dist/sqlite/index.d.ts +4 -0
- package/dist/sqlite/index.js +9 -0
- package/dist/sqlite/migrate.d.ts +2 -0
- package/dist/sqlite/migrate.js +37 -0
- package/dist/sqlite/store.d.ts +3 -0
- package/dist/sqlite/store.js +122 -0
- package/dist/sqlite/tip-meta.d.ts +26 -0
- package/dist/sqlite/tip-meta.js +97 -0
- package/dist/sqlite/types.d.ts +10 -0
- package/dist/sqlite/types.js +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.js +1 -0
- package/dist/wallet/archive.d.ts +4 -0
- package/dist/wallet/archive.js +39 -0
- package/dist/wallet/cogop/constants.d.ts +32 -0
- package/dist/wallet/cogop/constants.js +32 -0
- package/dist/wallet/cogop/index.d.ts +32 -0
- package/dist/wallet/cogop/index.js +213 -0
- package/dist/wallet/cogop/numeric.d.ts +3 -0
- package/dist/wallet/cogop/numeric.js +24 -0
- package/dist/wallet/cogop/scriptpubkey.d.ts +2 -0
- package/dist/wallet/cogop/scriptpubkey.js +13 -0
- package/dist/wallet/cogop/validate-name.d.ts +2 -0
- package/dist/wallet/cogop/validate-name.js +18 -0
- package/dist/wallet/fs/atomic.d.ts +6 -0
- package/dist/wallet/fs/atomic.js +46 -0
- package/dist/wallet/fs/lock.d.ts +19 -0
- package/dist/wallet/fs/lock.js +61 -0
- package/dist/wallet/fs/status-file.d.ts +1 -0
- package/dist/wallet/fs/status-file.js +4 -0
- package/dist/wallet/lifecycle.d.ts +193 -0
- package/dist/wallet/lifecycle.js +1475 -0
- package/dist/wallet/material.d.ts +45 -0
- package/dist/wallet/material.js +118 -0
- package/dist/wallet/mining/config.d.ts +18 -0
- package/dist/wallet/mining/config.js +44 -0
- package/dist/wallet/mining/constants.d.ts +24 -0
- package/dist/wallet/mining/constants.js +24 -0
- package/dist/wallet/mining/control.d.ts +53 -0
- package/dist/wallet/mining/control.js +758 -0
- package/dist/wallet/mining/coordination.d.ts +40 -0
- package/dist/wallet/mining/coordination.js +121 -0
- package/dist/wallet/mining/hook-protocol.d.ts +47 -0
- package/dist/wallet/mining/hook-protocol.js +161 -0
- package/dist/wallet/mining/hook-runner.d.ts +1 -0
- package/dist/wallet/mining/hook-runner.js +52 -0
- package/dist/wallet/mining/hooks.d.ts +38 -0
- package/dist/wallet/mining/hooks.js +520 -0
- package/dist/wallet/mining/index.d.ts +8 -0
- package/dist/wallet/mining/index.js +6 -0
- package/dist/wallet/mining/runner.d.ts +155 -0
- package/dist/wallet/mining/runner.js +2574 -0
- package/dist/wallet/mining/runtime-artifacts.d.ts +17 -0
- package/dist/wallet/mining/runtime-artifacts.js +166 -0
- package/dist/wallet/mining/sentences.d.ts +23 -0
- package/dist/wallet/mining/sentences.js +281 -0
- package/dist/wallet/mining/state.d.ts +9 -0
- package/dist/wallet/mining/state.js +75 -0
- package/dist/wallet/mining/types.d.ts +141 -0
- package/dist/wallet/mining/types.js +1 -0
- package/dist/wallet/mining/visualizer.d.ts +19 -0
- package/dist/wallet/mining/visualizer.js +134 -0
- package/dist/wallet/mining/worker-main.d.ts +1 -0
- package/dist/wallet/mining/worker-main.js +17 -0
- package/dist/wallet/read/context.d.ts +20 -0
- package/dist/wallet/read/context.js +532 -0
- package/dist/wallet/read/filter.d.ts +9 -0
- package/dist/wallet/read/filter.js +42 -0
- package/dist/wallet/read/index.d.ts +4 -0
- package/dist/wallet/read/index.js +3 -0
- package/dist/wallet/read/project.d.ts +11 -0
- package/dist/wallet/read/project.js +300 -0
- package/dist/wallet/read/types.d.ts +144 -0
- package/dist/wallet/read/types.js +1 -0
- package/dist/wallet/runtime.d.ts +26 -0
- package/dist/wallet/runtime.js +28 -0
- package/dist/wallet/state/crypto.d.ts +31 -0
- package/dist/wallet/state/crypto.js +127 -0
- package/dist/wallet/state/provider.d.ts +37 -0
- package/dist/wallet/state/provider.js +312 -0
- package/dist/wallet/state/session.d.ts +12 -0
- package/dist/wallet/state/session.js +23 -0
- package/dist/wallet/state/storage.d.ts +19 -0
- package/dist/wallet/state/storage.js +55 -0
- package/dist/wallet/tx/anchor.d.ts +40 -0
- package/dist/wallet/tx/anchor.js +1210 -0
- package/dist/wallet/tx/cog.d.ts +92 -0
- package/dist/wallet/tx/cog.js +1055 -0
- package/dist/wallet/tx/common.d.ts +89 -0
- package/dist/wallet/tx/common.js +156 -0
- package/dist/wallet/tx/confirm.d.ts +15 -0
- package/dist/wallet/tx/confirm.js +24 -0
- package/dist/wallet/tx/domain-admin.d.ts +105 -0
- package/dist/wallet/tx/domain-admin.js +869 -0
- package/dist/wallet/tx/domain-market.d.ts +112 -0
- package/dist/wallet/tx/domain-market.js +1365 -0
- package/dist/wallet/tx/field.d.ts +101 -0
- package/dist/wallet/tx/field.js +1853 -0
- package/dist/wallet/tx/identity-selector.d.ts +12 -0
- package/dist/wallet/tx/identity-selector.js +52 -0
- package/dist/wallet/tx/index.d.ts +7 -0
- package/dist/wallet/tx/index.js +7 -0
- package/dist/wallet/tx/journal.d.ts +5 -0
- package/dist/wallet/tx/journal.js +31 -0
- package/dist/wallet/tx/register.d.ts +68 -0
- package/dist/wallet/tx/register.js +952 -0
- package/dist/wallet/tx/reputation.d.ts +72 -0
- package/dist/wallet/tx/reputation.js +693 -0
- package/dist/wallet/tx/targets.d.ts +7 -0
- package/dist/wallet/tx/targets.js +122 -0
- package/dist/wallet/types.d.ts +249 -0
- package/dist/wallet/types.js +1 -0
- package/dist/writing_quotes.json +1654 -0
- package/package.json +78 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createInterface } from "node:readline/promises";
|
|
2
|
+
const CLEAR_SENSITIVE_DISPLAY_SEQUENCE = "\u001B[2J\u001B[3J\u001B[H";
|
|
3
|
+
export function createTerminalPrompter(input, output) {
|
|
4
|
+
return {
|
|
5
|
+
isInteractive: Boolean(input.isTTY && output.isTTY),
|
|
6
|
+
writeLine(message) {
|
|
7
|
+
output.write(`${message}\n`);
|
|
8
|
+
},
|
|
9
|
+
async prompt(message) {
|
|
10
|
+
if (!("on" in input) || !("off" in input)) {
|
|
11
|
+
throw new Error("wallet_prompt_input_unavailable");
|
|
12
|
+
}
|
|
13
|
+
const readline = createInterface({
|
|
14
|
+
input: input,
|
|
15
|
+
output: output,
|
|
16
|
+
});
|
|
17
|
+
try {
|
|
18
|
+
return await readline.question(message);
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
readline.close();
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
clearSensitiveDisplay(scope) {
|
|
25
|
+
if (!input.isTTY || !output.isTTY) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (scope === "mnemonic-reveal") {
|
|
29
|
+
output.write(CLEAR_SENSITIVE_DISPLAY_SEQUENCE);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { WalletDomainView, WalletFieldView, WalletIdentityView, WalletLockView, WalletReadContext } from "../wallet/read/index.js";
|
|
2
|
+
import type { MiningControlPlaneView, MiningEventRecord } from "../wallet/mining/index.js";
|
|
3
|
+
import type { PendingMutationRecord } from "../wallet/types.js";
|
|
4
|
+
import type { JsonAvailabilityEntry, JsonPage } from "./output.js";
|
|
5
|
+
export interface ReadJsonResult<T> {
|
|
6
|
+
data: T;
|
|
7
|
+
warnings: string[];
|
|
8
|
+
explanations: string[];
|
|
9
|
+
nextSteps: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function buildAvailability(context: WalletReadContext): Record<string, JsonAvailabilityEntry>;
|
|
12
|
+
declare function mapIdentity(identity: WalletIdentityView): {
|
|
13
|
+
index: number;
|
|
14
|
+
scriptPubKeyHex: string;
|
|
15
|
+
address: string | null;
|
|
16
|
+
selectors: string[];
|
|
17
|
+
assignedDomainNames: string[];
|
|
18
|
+
ownedDomainNames: string[];
|
|
19
|
+
anchoredOwnedDomainNames: string[];
|
|
20
|
+
localStatus: "funding" | "dedicated" | "read-only";
|
|
21
|
+
effectiveStatus: "funding" | "dedicated" | "read-only";
|
|
22
|
+
canonicalDomainId: number | null;
|
|
23
|
+
canonicalDomainName: string | null;
|
|
24
|
+
observedCogBalance: string | null;
|
|
25
|
+
readOnly: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare function mapDomain(domain: WalletDomainView): {
|
|
28
|
+
name: string;
|
|
29
|
+
domainId: number | null;
|
|
30
|
+
anchored: boolean | null;
|
|
31
|
+
ownerScriptPubKeyHex: string | null;
|
|
32
|
+
ownerLocalIndex: number | null;
|
|
33
|
+
ownerAddress: string | null;
|
|
34
|
+
localRelationship: "unknown" | "read-only" | "owned" | "tracked" | "external";
|
|
35
|
+
chainStatus: "unknown" | "registered-unanchored" | "anchored";
|
|
36
|
+
localAnchorIntent: "none" | "repair-required" | "reserved" | "tx1-live" | "tx2-live" | null;
|
|
37
|
+
foundingMessageText: string | null;
|
|
38
|
+
endpointText: string | null;
|
|
39
|
+
delegateScriptPubKeyHex: string | null;
|
|
40
|
+
minerScriptPubKeyHex: string | null;
|
|
41
|
+
fieldCount: number | null;
|
|
42
|
+
listingPriceCogtoshi: string | null;
|
|
43
|
+
activeLockCount: number | null;
|
|
44
|
+
selfStakeCogtoshi: string | null;
|
|
45
|
+
supportedStakeCogtoshi: string | null;
|
|
46
|
+
totalSupportedCogtoshi: string | null;
|
|
47
|
+
totalRevokedCogtoshi: string | null;
|
|
48
|
+
readOnly: boolean;
|
|
49
|
+
};
|
|
50
|
+
declare function mapField(field: WalletFieldView): {
|
|
51
|
+
domainName: string;
|
|
52
|
+
domainId: number;
|
|
53
|
+
fieldId: number;
|
|
54
|
+
name: string;
|
|
55
|
+
permanent: boolean;
|
|
56
|
+
hasValue: boolean;
|
|
57
|
+
format: number | null;
|
|
58
|
+
preview: string | null;
|
|
59
|
+
rawValueHex: string | null;
|
|
60
|
+
};
|
|
61
|
+
declare function mapLock(lock: WalletLockView): {
|
|
62
|
+
lockId: number;
|
|
63
|
+
status: "active" | "claimed" | "reclaimed";
|
|
64
|
+
amountCogtoshi: string;
|
|
65
|
+
timeoutHeight: number;
|
|
66
|
+
lockerScriptPubKeyHex: string;
|
|
67
|
+
lockerLocalIndex: number | null;
|
|
68
|
+
recipientDomainId: number;
|
|
69
|
+
recipientDomainName: string | null;
|
|
70
|
+
recipientLocal: boolean;
|
|
71
|
+
claimableNow: boolean;
|
|
72
|
+
reclaimableNow: boolean;
|
|
73
|
+
};
|
|
74
|
+
declare function mapPendingMutation(mutation: PendingMutationRecord): {
|
|
75
|
+
kind: "register" | "transfer" | "sell" | "buy" | "rep-give" | "rep-revoke" | "send" | "lock" | "claim" | "field-create" | "field-set" | "field-clear" | "endpoint" | "delegate" | "miner" | "canonical";
|
|
76
|
+
domainName: string;
|
|
77
|
+
recipientDomainName: string | null;
|
|
78
|
+
fieldName: string | null;
|
|
79
|
+
status: import("../wallet/types.js").PendingMutationStatus;
|
|
80
|
+
senderScriptPubKeyHex: string;
|
|
81
|
+
recipientScriptPubKeyHex: string | null;
|
|
82
|
+
amountCogtoshi: string | null;
|
|
83
|
+
priceCogtoshi: string | null;
|
|
84
|
+
lockId: number | null;
|
|
85
|
+
txid: string | null;
|
|
86
|
+
wtxid: string | null;
|
|
87
|
+
reviewPresent: boolean;
|
|
88
|
+
};
|
|
89
|
+
export declare function buildStatusJson(context: WalletReadContext): ReadJsonResult<{
|
|
90
|
+
wallet: Record<string, unknown>;
|
|
91
|
+
btc: Record<string, unknown>;
|
|
92
|
+
cog: Record<string, unknown>;
|
|
93
|
+
domains: Record<string, unknown>;
|
|
94
|
+
mining: Record<string, unknown> | null;
|
|
95
|
+
hooks: Record<string, unknown> | null;
|
|
96
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
97
|
+
}>;
|
|
98
|
+
export declare function buildAddressJson(context: WalletReadContext): ReadJsonResult<{
|
|
99
|
+
address: string | null;
|
|
100
|
+
scriptPubKeyHex: string | null;
|
|
101
|
+
network: string | null;
|
|
102
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
103
|
+
}>;
|
|
104
|
+
export declare function buildIdsJson(context: WalletReadContext, page: JsonPage, identities: WalletIdentityView[]): ReadJsonResult<{
|
|
105
|
+
identities: ReturnType<typeof mapIdentity>[] | null;
|
|
106
|
+
page: JsonPage;
|
|
107
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
108
|
+
}>;
|
|
109
|
+
export declare function buildWalletStatusJson(context: WalletReadContext): ReadJsonResult<{
|
|
110
|
+
lockState: string;
|
|
111
|
+
unlockUntilUnixMs: number | null;
|
|
112
|
+
fundingAddress: string | null;
|
|
113
|
+
fundingScriptPubKeyHex: string | null;
|
|
114
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
115
|
+
}>;
|
|
116
|
+
export declare function buildHooksStatusJson(mining: MiningControlPlaneView): ReadJsonResult<{
|
|
117
|
+
mode: string;
|
|
118
|
+
validationState: string;
|
|
119
|
+
operatorValidationState: string;
|
|
120
|
+
launchFingerprintState: string;
|
|
121
|
+
fullFingerprintState: string;
|
|
122
|
+
lastValidationAtUnixMs: number | null;
|
|
123
|
+
lastValidationError: string | null;
|
|
124
|
+
trustChecks: Record<string, unknown>;
|
|
125
|
+
}>;
|
|
126
|
+
export declare function buildMineStatusJson(mining: MiningControlPlaneView): ReadJsonResult<{
|
|
127
|
+
runMode: string;
|
|
128
|
+
state: string;
|
|
129
|
+
tipHeight: number | null;
|
|
130
|
+
referencedBlockHashDisplay: string | null;
|
|
131
|
+
currentDomain: {
|
|
132
|
+
domainId: number | null;
|
|
133
|
+
name: string | null;
|
|
134
|
+
} | null;
|
|
135
|
+
liveMiningFamilyInMempool: boolean | null;
|
|
136
|
+
publishDecision: string | null;
|
|
137
|
+
phase: string;
|
|
138
|
+
lastSuspendDetectedAtUnixMs: number | null;
|
|
139
|
+
pauseReason: string | null;
|
|
140
|
+
fees: Record<string, unknown>;
|
|
141
|
+
worker: Record<string, unknown>;
|
|
142
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
143
|
+
}>;
|
|
144
|
+
export declare function buildMineLogJson(events: MiningEventRecord[], page: JsonPage, rotation: number[]): ReadJsonResult<{
|
|
145
|
+
events: MiningEventRecord[];
|
|
146
|
+
truncated: boolean;
|
|
147
|
+
rotation: number[];
|
|
148
|
+
page: JsonPage;
|
|
149
|
+
}>;
|
|
150
|
+
export declare function buildBalanceJson(context: WalletReadContext): ReadJsonResult<{
|
|
151
|
+
assetLabel: string;
|
|
152
|
+
totalCogtoshi: string | null;
|
|
153
|
+
identities: ReturnType<typeof mapIdentity>[] | null;
|
|
154
|
+
pending: ReturnType<typeof mapPendingMutation>[];
|
|
155
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
156
|
+
}>;
|
|
157
|
+
export declare function buildLocksJson(context: WalletReadContext, locks: WalletLockView[] | null, page: JsonPage): ReadJsonResult<{
|
|
158
|
+
assetLabel: string;
|
|
159
|
+
locks: ReturnType<typeof mapLock>[] | null;
|
|
160
|
+
pending: ReturnType<typeof mapPendingMutation>[];
|
|
161
|
+
page: JsonPage;
|
|
162
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
163
|
+
}>;
|
|
164
|
+
export declare function buildDomainsJson(context: WalletReadContext, domains: WalletDomainView[] | null, page: JsonPage): ReadJsonResult<{
|
|
165
|
+
domains: ReturnType<typeof mapDomain>[] | null;
|
|
166
|
+
page: JsonPage;
|
|
167
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
168
|
+
}>;
|
|
169
|
+
export declare function buildShowJson(context: WalletReadContext, domainName: string): ReadJsonResult<{
|
|
170
|
+
domain: Record<string, unknown> | null;
|
|
171
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
172
|
+
}>;
|
|
173
|
+
export declare function buildFieldsJson(context: WalletReadContext, domainName: string, fields: WalletFieldView[] | null, page: JsonPage): ReadJsonResult<{
|
|
174
|
+
fields: ReturnType<typeof mapField>[] | null;
|
|
175
|
+
page: JsonPage;
|
|
176
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
177
|
+
}>;
|
|
178
|
+
export declare function buildFieldJson(context: WalletReadContext, domainName: string, fieldName: string): ReadJsonResult<{
|
|
179
|
+
field: ReturnType<typeof mapField> | null;
|
|
180
|
+
availability: Record<string, JsonAvailabilityEntry>;
|
|
181
|
+
}>;
|
|
182
|
+
export declare function listLocksForJson(context: WalletReadContext, options: {
|
|
183
|
+
claimableOnly: boolean;
|
|
184
|
+
reclaimableOnly: boolean;
|
|
185
|
+
}): WalletLockView[] | null;
|
|
186
|
+
export declare function listFieldsForJson(context: WalletReadContext, domainName: string): WalletFieldView[] | null;
|
|
187
|
+
export {};
|