@temporalabs/treasury 0.1.3 → 0.1.4
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/README.md +4 -4
- package/THIRD_PARTY_NOTICES.connect-page.md +78 -24
- package/THIRD_PARTY_NOTICES.md +50 -50
- package/dist/client.d.ts +6 -307
- package/dist/client.js.map +1 -1
- package/dist/connect/ack.d.ts +70 -0
- package/dist/connect/ack.js +135 -0
- package/dist/connect/ack.js.map +1 -1
- package/dist/connect/commands.d.ts +27 -0
- package/dist/connect/commands.js +726 -112
- package/dist/connect/commands.js.map +1 -1
- package/dist/connect/http.d.ts +10 -1
- package/dist/connect/http.js +5 -3
- package/dist/connect/http.js.map +1 -1
- package/dist/connect/session.d.ts +20 -4
- package/dist/connect/session.js +134 -18
- package/dist/connect/session.js.map +1 -1
- package/dist/connect/solana.d.ts +39 -0
- package/dist/connect/solana.js +140 -37
- package/dist/connect/solana.js.map +1 -1
- package/dist/connect-page.js +835 -673
- package/dist/disclosures.d.ts +2 -0
- package/dist/disclosures.js +2 -0
- package/dist/disclosures.js.map +1 -1
- package/dist/earn/solana.js +19 -5
- package/dist/earn/solana.js.map +1 -1
- package/dist/redact.js +7 -1
- package/dist/redact.js.map +1 -1
- package/dist/solana/vault.js +0 -2
- package/dist/solana/vault.js.map +1 -1
- package/dist/treasury.mjs +36772 -34368
- package/llms.txt +65 -49
- package/package.json +8 -5
|
@@ -51,6 +51,8 @@ export interface ConnectDeps {
|
|
|
51
51
|
now?: () => Date;
|
|
52
52
|
/** The Solana flows' chain reads (tests). */
|
|
53
53
|
solanaRpc?: SolanaFlowDeps["rpc"];
|
|
54
|
+
/** Overrides the page time `connect plan --run` keeps back before starting a leg (tests). */
|
|
55
|
+
legMinMs?: number;
|
|
54
56
|
}
|
|
55
57
|
export declare function runConnect(deps?: ConnectDeps): Promise<{
|
|
56
58
|
result: Settled<Session>;
|
|
@@ -62,6 +64,31 @@ interface TxOutcome extends Verdict {
|
|
|
62
64
|
description: string;
|
|
63
65
|
hash: string;
|
|
64
66
|
}
|
|
67
|
+
/** One leg's confirm core: the gate, the chain reads, and the step-by-step verdicts, without the page around it. */
|
|
68
|
+
export interface ConfirmCore {
|
|
69
|
+
chainId: number;
|
|
70
|
+
calls: UnsignedCall[];
|
|
71
|
+
done: TxOutcome[];
|
|
72
|
+
stopReason: () => string | undefined;
|
|
73
|
+
info: () => Record<string, unknown>;
|
|
74
|
+
/** Records the hash for step `index`, reads its receipt, and says whether the next step may go. */
|
|
75
|
+
accept: (index: unknown, hash: unknown) => Promise<{
|
|
76
|
+
ok: false;
|
|
77
|
+
reason: string;
|
|
78
|
+
} | {
|
|
79
|
+
ok: true;
|
|
80
|
+
kind: "next" | "finished" | "stop";
|
|
81
|
+
reply: Record<string, unknown>;
|
|
82
|
+
}>;
|
|
83
|
+
/** Puts a hash the page could not hand over on record, against the step it names. */
|
|
84
|
+
onReject: (body: Record<string, unknown>) => void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The confirm flow without its page: the gate runs here, on exactly the calls the page will hand the
|
|
88
|
+
* wallet, so no caller can pass a check for one batch and the calls of another. It throws before any
|
|
89
|
+
* page opens. `deadline`: when the page closes, so every chain read stops waiting by then.
|
|
90
|
+
*/
|
|
91
|
+
export declare function prepareConfirm(calls: UnsignedCall[], session: Session, deps: ConnectDeps, deadline: number): Promise<ConfirmCore>;
|
|
65
92
|
export declare function runConfirm(calls: UnsignedCall[], session: Session, deps?: ConnectDeps): Promise<{
|
|
66
93
|
result: Settled<TxOutcome[]>;
|
|
67
94
|
url: string;
|