@openzeppelin/guardian-client 0.18.3 → 0.19.0-rc.2

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 (56) hide show
  1. package/README.md +127 -9
  2. package/dist/auth-request.d.ts +13 -0
  3. package/dist/auth-request.d.ts.map +1 -1
  4. package/dist/auth-request.js +26 -5
  5. package/dist/auth-request.js.map +1 -1
  6. package/dist/conversion.d.ts +8 -2
  7. package/dist/conversion.d.ts.map +1 -1
  8. package/dist/conversion.js +46 -3
  9. package/dist/conversion.js.map +1 -1
  10. package/dist/error-codes.d.ts +3 -5
  11. package/dist/error-codes.d.ts.map +1 -1
  12. package/dist/error-codes.js +23 -4
  13. package/dist/error-codes.js.map +1 -1
  14. package/dist/execution.d.ts +99 -0
  15. package/dist/execution.d.ts.map +1 -0
  16. package/dist/execution.js +124 -0
  17. package/dist/execution.js.map +1 -0
  18. package/dist/http.d.ts +81 -5
  19. package/dist/http.d.ts.map +1 -1
  20. package/dist/http.js +179 -27
  21. package/dist/http.js.map +1 -1
  22. package/dist/index.d.ts +8 -2
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +3 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/request-envelope.d.ts +22 -0
  27. package/dist/request-envelope.d.ts.map +1 -0
  28. package/dist/request-envelope.js +51 -0
  29. package/dist/request-envelope.js.map +1 -0
  30. package/dist/server-types.d.ts +33 -0
  31. package/dist/server-types.d.ts.map +1 -1
  32. package/dist/session-request.d.ts +104 -0
  33. package/dist/session-request.d.ts.map +1 -0
  34. package/dist/session-request.js +164 -0
  35. package/dist/session-request.js.map +1 -0
  36. package/dist/types.d.ts +124 -5
  37. package/dist/types.d.ts.map +1 -1
  38. package/package.json +2 -2
  39. package/src/auth-request.test.ts +12 -0
  40. package/src/auth-request.ts +37 -5
  41. package/src/conversion.test.ts +98 -0
  42. package/src/conversion.ts +59 -3
  43. package/src/dependencies.test.ts +25 -0
  44. package/src/error-codes.test.ts +14 -1
  45. package/src/error-codes.ts +23 -4
  46. package/src/execution.test.ts +145 -0
  47. package/src/execution.ts +206 -0
  48. package/src/http.test.ts +752 -19
  49. package/src/http.ts +244 -30
  50. package/src/index.ts +50 -1
  51. package/src/request-envelope.test.ts +30 -0
  52. package/src/request-envelope.ts +68 -0
  53. package/src/server-types.ts +35 -1
  54. package/src/session-request.test.ts +178 -0
  55. package/src/session-request.ts +191 -0
  56. package/src/types.ts +129 -4
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Guardian execution of threshold-met proposals, as the base client reports it. Mirrors the
3
+ * `guardian_shared::execution` vocabulary; drift-guard tests keep the two in step.
4
+ */
5
+ /** The five reported states. Closed: adding one is a breaking change. */
6
+ export declare const EXECUTION_STATES: readonly ["pending", "proving", "submitted", "committed", "failed"];
7
+ export type ExecutionState = (typeof EXECUTION_STATES)[number];
8
+ /** Whether the execution has finished, one way or the other. Mirrors `ExecutionState::is_terminal`. */
9
+ export declare function isTerminalExecutionState(state: ExecutionState): boolean;
10
+ export declare const REQUEST_INVALID_REASONS: readonly ["bound_block_not_declared", "auth_args_missing", "approval_expiration_missing", "input_notes_not_pinned", "too_many_declared_blocks"];
11
+ export type RequestInvalidReason = (typeof REQUEST_INVALID_REASONS)[number];
12
+ export declare const EXPIRATION_BOUNDS: readonly ["approval", "transaction"];
13
+ export type ExpirationBound = (typeof EXPIRATION_BOUNDS)[number];
14
+ export declare const FOREIGN_ACCOUNT_UNAVAILABLE_REASONS: readonly ["private", "unavailable"];
15
+ export type ForeignAccountUnavailableReason = (typeof FOREIGN_ACCOUNT_UNAVAILABLE_REASONS)[number];
16
+ /** Why a server does not offer Guardian execution, as `GET /status` reports it. */
17
+ export declare const EXECUTION_UNAVAILABLE_REASONS: readonly ["prover_not_configured", "disabled", "canonicalization_disabled"];
18
+ export type ExecutionUnavailableReason = (typeof EXECUTION_UNAVAILABLE_REASONS)[number];
19
+ /**
20
+ * Whether the server accepts Guardian execution requests. It reflects the server's configuration,
21
+ * not whether its prover is reachable right now.
22
+ */
23
+ export type ServerExecutionCapability = {
24
+ enabled: true;
25
+ } | {
26
+ enabled: false;
27
+ reason: ExecutionUnavailableReason;
28
+ };
29
+ /** The capability as `GET /status` sends it, before validation. */
30
+ export interface ServerExecutionCapabilityWire {
31
+ enabled: unknown;
32
+ reason?: unknown;
33
+ }
34
+ /** Failure codes that carry no structured meta. */
35
+ export declare const PLAIN_EXECUTION_FAILURE_CODES: readonly ["GUARDIAN_EXECUTION_BINDING_MISMATCH", "GUARDIAN_EXECUTION_STATE_MISMATCH", "GUARDIAN_EXECUTION_REQUEST_CODEC", "GUARDIAN_EXECUTION_PROTOCOL_MISMATCH", "GUARDIAN_EXECUTION_CHAIN_BEHIND", "GUARDIAN_EXECUTION_CHAIN_INCONSISTENT", "GUARDIAN_EXECUTION_NODE_UNAVAILABLE", "GUARDIAN_EXECUTION_INSUFFICIENT_FEE", "GUARDIAN_EXECUTION_INSUFFICIENT_SIGNATURES", "GUARDIAN_EXECUTION_PROVING_FAILED", "GUARDIAN_EXECUTION_SEALING_FAILED", "GUARDIAN_EXECUTION_ACKNOWLEDGEMENT_FAILED", "GUARDIAN_EXECUTION_EXPIRATION_BEYOND_HORIZON", "GUARDIAN_EXECUTION_ACCOUNT_INADMISSIBLE", "GUARDIAN_EXECUTION_SUBMISSION_REJECTED", "GUARDIAN_EXECUTION_SUBMISSION_NOT_PROCESSED", "GUARDIAN_EXECUTION_CANDIDATE_DISCARDED", "GUARDIAN_EXECUTION_EXPIRED", "GUARDIAN_EXECUTION_LEASE_EXPIRED", "GUARDIAN_EXECUTION_ABANDONED"];
36
+ export type PlainExecutionFailureCode = (typeof PLAIN_EXECUTION_FAILURE_CODES)[number];
37
+ /** Why an execution failed, discriminated by `code`; codes with meta carry it typed. */
38
+ export type ExecutionFailure = {
39
+ code: 'GUARDIAN_EXECUTION_REQUEST_INVALID';
40
+ message: string;
41
+ reason: RequestInvalidReason;
42
+ } | {
43
+ code: 'GUARDIAN_EXECUTION_EXPIRATION_REACHED';
44
+ message: string;
45
+ bound: ExpirationBound;
46
+ } | {
47
+ code: 'GUARDIAN_EXECUTION_FOREIGN_ACCOUNT_UNAVAILABLE';
48
+ message: string;
49
+ reason: ForeignAccountUnavailableReason;
50
+ } | {
51
+ code: PlainExecutionFailureCode;
52
+ message: string;
53
+ };
54
+ export type ExecutionFailureCode = ExecutionFailure['code'];
55
+ export declare const EXECUTION_FAILURE_CODES: readonly ExecutionFailureCode[];
56
+ /** One execution of a proposal, identified by `(accountId, proposalId)`. */
57
+ export interface ProposalExecution {
58
+ accountId: string;
59
+ proposalId: string;
60
+ state: ExecutionState;
61
+ /** Present exactly when `state` is `'failed'`. */
62
+ error: ExecutionFailure | null;
63
+ /** The delta nonce the execution committed to, once it crossed the no-retry boundary. */
64
+ deltaNonce: number | null;
65
+ /** Whether this request started the execution, rather than finding it already running. */
66
+ newlyAccepted: boolean;
67
+ /** Whether the proposal is still stored. A fact, not retry advice. */
68
+ proposalExists: boolean;
69
+ /** Stored signatures the server ignored as invalid, duplicate or not from a cosigner. */
70
+ ignoredSignatures: number;
71
+ updatedAt: string;
72
+ }
73
+ export interface ServerExecutionError {
74
+ code: string;
75
+ message: string;
76
+ meta?: Record<string, unknown>;
77
+ }
78
+ export interface ServerProposalExecution {
79
+ account_id: string;
80
+ proposal_id: string;
81
+ state: string;
82
+ error?: ServerExecutionError;
83
+ delta_nonce?: number;
84
+ newly_accepted: boolean;
85
+ proposal_exists: boolean;
86
+ ignored_signatures: number;
87
+ updated_at: string;
88
+ }
89
+ export interface ServerCurrentExecution {
90
+ execution: ServerProposalExecution | null;
91
+ }
92
+ /**
93
+ * Decodes a `GET /status` capability the server sent, refusing a missing flag or an unknown
94
+ * reason. A status without one does not offer Guardian execution.
95
+ */
96
+ export declare function fromServerExecutionCapability(server: ServerExecutionCapabilityWire): ServerExecutionCapability;
97
+ /** Decodes the wire envelope, refusing any state, code or meta outside the vocabulary. */
98
+ export declare function fromServerExecution(server: ServerProposalExecution): ProposalExecution;
99
+ //# sourceMappingURL=execution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,qEAAsE,CAAC;AACpG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,uGAAuG;AACvG,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAcvE;AAED,eAAO,MAAM,uBAAuB,iJAM1B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB,sCAAuC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,mCAAmC,qCAAsC,CAAC;AACvF,MAAM,MAAM,+BAA+B,GAAG,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnG,mFAAmF;AACnF,eAAO,MAAM,6BAA6B,6EAA8E,CAAC;AACzH,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC;AAExF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,0BAA0B,CAAA;CAAE,CAAC;AAEnH,mEAAmE;AACnE,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,mDAAmD;AACnD,eAAO,MAAM,6BAA6B,kyBAqBhC,CAAC;AACX,MAAM,MAAM,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uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,uBAAuB,GAAG,IAAI,CAAC;CAC3C;AASD;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,6BAA6B,GAAG,yBAAyB,CAc9G;AAoBD,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,uBAAuB,GAAG,iBAAiB,CAiBtF"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Guardian execution of threshold-met proposals, as the base client reports it. Mirrors the
3
+ * `guardian_shared::execution` vocabulary; drift-guard tests keep the two in step.
4
+ */
5
+ /** The five reported states. Closed: adding one is a breaking change. */
6
+ export const EXECUTION_STATES = ['pending', 'proving', 'submitted', 'committed', 'failed'];
7
+ /** Whether the execution has finished, one way or the other. Mirrors `ExecutionState::is_terminal`. */
8
+ export function isTerminalExecutionState(state) {
9
+ switch (state) {
10
+ case 'committed':
11
+ case 'failed':
12
+ return true;
13
+ case 'pending':
14
+ case 'proving':
15
+ case 'submitted':
16
+ return false;
17
+ default: {
18
+ const unreachable = state;
19
+ throw new Error(`Unknown execution state: ${String(unreachable)}`);
20
+ }
21
+ }
22
+ }
23
+ export const REQUEST_INVALID_REASONS = [
24
+ 'bound_block_not_declared',
25
+ 'auth_args_missing',
26
+ 'approval_expiration_missing',
27
+ 'input_notes_not_pinned',
28
+ 'too_many_declared_blocks',
29
+ ];
30
+ export const EXPIRATION_BOUNDS = ['approval', 'transaction'];
31
+ export const FOREIGN_ACCOUNT_UNAVAILABLE_REASONS = ['private', 'unavailable'];
32
+ /** Why a server does not offer Guardian execution, as `GET /status` reports it. */
33
+ export const EXECUTION_UNAVAILABLE_REASONS = ['prover_not_configured', 'disabled', 'canonicalization_disabled'];
34
+ /** Failure codes that carry no structured meta. */
35
+ export const PLAIN_EXECUTION_FAILURE_CODES = [
36
+ 'GUARDIAN_EXECUTION_BINDING_MISMATCH',
37
+ 'GUARDIAN_EXECUTION_STATE_MISMATCH',
38
+ 'GUARDIAN_EXECUTION_REQUEST_CODEC',
39
+ 'GUARDIAN_EXECUTION_PROTOCOL_MISMATCH',
40
+ 'GUARDIAN_EXECUTION_CHAIN_BEHIND',
41
+ 'GUARDIAN_EXECUTION_CHAIN_INCONSISTENT',
42
+ 'GUARDIAN_EXECUTION_NODE_UNAVAILABLE',
43
+ 'GUARDIAN_EXECUTION_INSUFFICIENT_FEE',
44
+ 'GUARDIAN_EXECUTION_INSUFFICIENT_SIGNATURES',
45
+ 'GUARDIAN_EXECUTION_PROVING_FAILED',
46
+ 'GUARDIAN_EXECUTION_SEALING_FAILED',
47
+ 'GUARDIAN_EXECUTION_ACKNOWLEDGEMENT_FAILED',
48
+ 'GUARDIAN_EXECUTION_EXPIRATION_BEYOND_HORIZON',
49
+ 'GUARDIAN_EXECUTION_ACCOUNT_INADMISSIBLE',
50
+ 'GUARDIAN_EXECUTION_SUBMISSION_REJECTED',
51
+ 'GUARDIAN_EXECUTION_SUBMISSION_NOT_PROCESSED',
52
+ 'GUARDIAN_EXECUTION_CANDIDATE_DISCARDED',
53
+ 'GUARDIAN_EXECUTION_EXPIRED',
54
+ 'GUARDIAN_EXECUTION_LEASE_EXPIRED',
55
+ 'GUARDIAN_EXECUTION_ABANDONED',
56
+ ];
57
+ export const EXECUTION_FAILURE_CODES = [
58
+ ...PLAIN_EXECUTION_FAILURE_CODES,
59
+ 'GUARDIAN_EXECUTION_REQUEST_INVALID',
60
+ 'GUARDIAN_EXECUTION_EXPIRATION_REACHED',
61
+ 'GUARDIAN_EXECUTION_FOREIGN_ACCOUNT_UNAVAILABLE',
62
+ ];
63
+ function member(values, value, what) {
64
+ if (typeof value === 'string' && values.includes(value)) {
65
+ return value;
66
+ }
67
+ throw new Error(`Guardian returned an unknown ${what}: ${JSON.stringify(value)}`);
68
+ }
69
+ /**
70
+ * Decodes a `GET /status` capability the server sent, refusing a missing flag or an unknown
71
+ * reason. A status without one does not offer Guardian execution.
72
+ */
73
+ export function fromServerExecutionCapability(server) {
74
+ if (typeof server !== 'object' || server === null) {
75
+ throw new Error(`Guardian returned a malformed execution capability: ${JSON.stringify(server)}`);
76
+ }
77
+ if (server.enabled === true) {
78
+ if (server.reason !== undefined) {
79
+ throw new Error(`Guardian returned an enabled execution capability with a reason: ${JSON.stringify(server.reason)}`);
80
+ }
81
+ return { enabled: true };
82
+ }
83
+ if (server.enabled === false) {
84
+ return { enabled: false, reason: member(EXECUTION_UNAVAILABLE_REASONS, server.reason, 'execution unavailable reason') };
85
+ }
86
+ throw new Error(`Guardian returned an execution capability without a boolean enabled: ${JSON.stringify(server.enabled)}`);
87
+ }
88
+ function fromServerFailure(error) {
89
+ const { code, message, meta } = error;
90
+ switch (code) {
91
+ case 'GUARDIAN_EXECUTION_REQUEST_INVALID':
92
+ return { code, message, reason: member(REQUEST_INVALID_REASONS, meta?.reason, 'request reason') };
93
+ case 'GUARDIAN_EXECUTION_EXPIRATION_REACHED':
94
+ return { code, message, bound: member(EXPIRATION_BOUNDS, meta?.bound, 'expiration bound') };
95
+ case 'GUARDIAN_EXECUTION_FOREIGN_ACCOUNT_UNAVAILABLE':
96
+ return {
97
+ code,
98
+ message,
99
+ reason: member(FOREIGN_ACCOUNT_UNAVAILABLE_REASONS, meta?.reason, 'foreign account reason'),
100
+ };
101
+ default:
102
+ return { code: member(PLAIN_EXECUTION_FAILURE_CODES, code, 'execution failure code'), message };
103
+ }
104
+ }
105
+ /** Decodes the wire envelope, refusing any state, code or meta outside the vocabulary. */
106
+ export function fromServerExecution(server) {
107
+ const state = member(EXECUTION_STATES, server.state, 'execution state');
108
+ const error = server.error ? fromServerFailure(server.error) : null;
109
+ if ((state === 'failed') !== (error !== null)) {
110
+ throw new Error(`Guardian returned an execution in state '${state}' ${error ? 'with' : 'without'} an error`);
111
+ }
112
+ return {
113
+ accountId: server.account_id,
114
+ proposalId: server.proposal_id,
115
+ state,
116
+ error,
117
+ deltaNonce: server.delta_nonce ?? null,
118
+ newlyAccepted: server.newly_accepted,
119
+ proposalExists: server.proposal_exists,
120
+ ignoredSignatures: server.ignored_signatures,
121
+ updatedAt: server.updated_at,
122
+ };
123
+ }
124
+ //# sourceMappingURL=execution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.js","sourceRoot":"","sources":["../src/execution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAU,CAAC;AAGpG,uGAAuG;AACvG,MAAM,UAAU,wBAAwB,CAAC,KAAqB;IAC5D,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,WAAW,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd,KAAK,SAAS,CAAC;QACf,KAAK,SAAS,CAAC;QACf,KAAK,WAAW;YACd,OAAO,KAAK,CAAC;QACf,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,KAAK,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,4BAA4B,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACrE,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,0BAA0B;IAC1B,mBAAmB;IACnB,6BAA6B;IAC7B,wBAAwB;IACxB,0BAA0B;CAClB,CAAC;AAGX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,aAAa,CAAU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EAAE,wBAAwB,CAAC,EAAE,OAAO,EAAE,CAAC;IACpG,CAAC;AACH,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,mBAAmB,CAAC,MAA+B;IACjE,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpE,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,4CAA4C,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC;IAC/G,CAAC;IACD,OAAO;QACL,SAAS,EAAE,MAAM,CAAC,UAAU;QAC5B,UAAU,EAAE,MAAM,CAAC,WAAW;QAC9B,KAAK;QACL,KAAK;QACL,UAAU,EAAE,MAAM,CAAC,WAAW,IAAI,IAAI;QACtC,aAAa,EAAE,MAAM,CAAC,cAAc;QACpC,cAAc,EAAE,MAAM,CAAC,eAAe;QACtC,iBAAiB,EAAE,MAAM,CAAC,kBAAkB;QAC5C,SAAS,EAAE,MAAM,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
package/dist/http.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type GuardianErrorCode } from './error-codes.js';
2
- import type { AbandonCandidateResponse, AbandonStatus, ConfigureRequest, ConfigureResponse, CreateSessionRequest, CreateSessionResponse, DeltaObject, DeltaProposalRequest, DeltaProposalResponse, ExecutionDelta, HistoryOptions, HistoryPage, LookupResponse, PubkeyResponse, PushDeltaResponse, SessionRequestSigner, SignProposalRequest, SignatureScheme, Signer, StateObject, StatusResponse, CanonicalNonce } from './types.js';
2
+ import type { AbandonCandidateResponse, AbandonStatus, ConfigureRequest, ConfigureResponse, CreateSessionRequest, CreateSessionResponse, DeltaObject, DeltaProposalRequest, DeltaProposalResponse, ExecutionDelta, HistoryOptions, HistoryPage, LookupResponse, PubkeyResponse, PushDeltaResponse, SessionRequestSigner, SignProposalRequest, SignatureScheme, Signer, StateObject, StateTail, StatusResponse, CanonicalNonce } from './types.js';
3
+ import type { ProposalExecution } from './execution.js';
3
4
  /**
4
5
  * Structured machine-readable side-data on a GUARDIAN error
5
6
  * (feature `009-human-readable-errors`). `retryable` is always present.
@@ -22,7 +23,24 @@ export interface GuardianErrorMeta {
22
23
  * `code === 'signature_scheme_not_allowed'`.
23
24
  */
24
25
  allowedSchemes?: string[];
26
+ /**
27
+ * The proposal whose execution holds the account. Present only when
28
+ * `code === 'execution_conflict'`.
29
+ */
30
+ blockingProposalId?: string;
31
+ /**
32
+ * The proposal type GUARDIAN refuses to execute because the client that finishes its
33
+ * follow-up work must execute it. Present only when `code === 'proposal_executes_locally'`.
34
+ */
35
+ proposalType?: string;
36
+ /**
37
+ * Why GUARDIAN leaves the proposal to local execution. Present only when
38
+ * `code === 'proposal_executes_locally'`: `switch_guardian` for a guardian switch.
39
+ */
40
+ reason?: LocalExecutionReason;
25
41
  }
42
+ /** Why GUARDIAN refuses to execute a proposal and leaves it to local execution. */
43
+ export type LocalExecutionReason = 'switch_guardian';
26
44
  /**
27
45
  * Error thrown by the GUARDIAN HTTP client. Parses the `{ code, message, meta }`
28
46
  * error body (feature 009): branch on {@link code}, display {@link userMessage}.
@@ -96,8 +114,8 @@ export declare class GuardianHttpClient {
96
114
  setSigner(signer: Signer): void;
97
115
  /**
98
116
  * Sign session-eligible requests (reads, proposal list/get, proposal
99
- * create/sign) with a registered delegated signer instead of the wallet.
100
- * Every other route, including `configure`, `pushDelta`,
117
+ * create/sign, `pushDelta`) with a registered delegated signer instead of
118
+ * the wallet. Every other route, including `configure`,
101
119
  * `abandonCandidate`, account lookup and `revokeAllSessions`, uses the
102
120
  * wallet signer. Pass `null` to stop using the session.
103
121
  */
@@ -140,6 +158,21 @@ export declare class GuardianHttpClient {
140
158
  getStatus(): Promise<StatusResponse>;
141
159
  configure(request: ConfigureRequest): Promise<ConfigureResponse>;
142
160
  getState(accountId: string): Promise<StateObject>;
161
+ /**
162
+ * The queue tail (`GET /state/tail`, issue #517): the state a new delta or
163
+ * proposal must build on, and the queued candidates that lead to it. With
164
+ * nothing queued it is the canonical state and `queue` is empty. Otherwise
165
+ * it is not on chain until the queued candidates land, and if one never
166
+ * does, the tail is abandoned with it. `acceptsSubmissions` is false while
167
+ * the queue would refuse anything built on the tail with
168
+ * `conflict_pending_delta` (a full queue, which at the default depth of 1 is
169
+ * any queue; a tail that changes the signers or the guardian key; a
170
+ * candidate a server before 0.19.0 queued under another label): wait for
171
+ * the queue to drain instead of building. Each read replays the queue on the
172
+ * server, so read it before building on the account; poll
173
+ * `getCanonicalNonce` instead. A server before 0.19.0 answers 404.
174
+ */
175
+ getStateTail(accountId: string): Promise<StateTail>;
143
176
  /**
144
177
  * Nonce and commitment of the latest canonical state, without the state
145
178
  * blob (`GET /state/nonce`). A client can skip `getState` when the
@@ -159,6 +192,20 @@ export declare class GuardianHttpClient {
159
192
  getDeltaProposals(accountId: string): Promise<DeltaObject[]>;
160
193
  getDeltaProposal(accountId: string, commitment: string): Promise<DeltaObject>;
161
194
  pushDeltaProposal(request: DeltaProposalRequest): Promise<DeltaProposalResponse>;
195
+ /**
196
+ * Ask Guardian to prove and submit a threshold-met proposal. Resolves once the request is
197
+ * accepted; poll {@link getDeltaProposalExecution} for the outcome. Repeating the request while
198
+ * the execution runs returns it with `newlyAccepted: false`.
199
+ *
200
+ * Signed by the session while one is set, over the payload tagged as `ExecuteDeltaProposal`:
201
+ * the body names the same fields as a status read, and the tag keeps a signed read from
202
+ * authenticating an execution request.
203
+ */
204
+ executeDeltaProposal(accountId: string, proposalId: string): Promise<ProposalExecution>;
205
+ /** The latest execution attempt of a proposal. */
206
+ getDeltaProposalExecution(accountId: string, proposalId: string): Promise<ProposalExecution>;
207
+ /** The account's in-flight execution, or `null`. A finished execution is not in flight. */
208
+ getCurrentExecution(accountId: string): Promise<ProposalExecution | null>;
162
209
  /**
163
210
  * Request abandonment of a pending canonicalization candidate whose
164
211
  * transaction will never land on-chain (issue #319).
@@ -171,8 +218,13 @@ export declare class GuardianHttpClient {
171
218
  * for the resolution. Refused with `GUARDIAN_CANDIDATE_LANDED` (409)
172
219
  * when the transaction actually landed. Retries are idempotent and
173
220
  * preserve the original request timestamp.
221
+ *
222
+ * `proposalId` names the transaction: its summary's commitment, which
223
+ * is the proposal id of a multisig proposal. A Guardian execution can
224
+ * archive the delta and take its nonce; the abandon then still answers
225
+ * for this transaction.
174
226
  */
175
- abandonCandidate(accountId: string, nonce: number): Promise<AbandonCandidateResponse>;
227
+ abandonCandidate(accountId: string, nonce: number, proposalId: string): Promise<AbandonCandidateResponse>;
176
228
  /**
177
229
  * Poll the resolution of an abandon request made with
178
230
  * {@link abandonCandidate}: `'waiting'` while the quarantine runs,
@@ -184,9 +236,24 @@ export declare class GuardianHttpClient {
184
236
  * delta until its retention TTL expires — sync and check chain before
185
237
  * replacing it), `'unexpected'` for any state no abandon flow
186
238
  * produces (including a missing delta).
239
+ *
240
+ * `commitment` is the one {@link abandonCandidate} returned. Another
241
+ * delta can take the nonce (a Guardian execution archives the abandoned
242
+ * one): once it is canonical the abandoned transaction can no longer
243
+ * land (`'abandoned'`), and while it is a candidate the nonce is still
244
+ * contested (`'waiting'`).
187
245
  */
188
- abandonStatus(accountId: string, nonce: number): Promise<AbandonStatus>;
246
+ abandonStatus(accountId: string, nonce: number, commitment: string): Promise<AbandonStatus>;
189
247
  signDeltaProposal(request: SignProposalRequest): Promise<DeltaObject>;
248
+ /**
249
+ * Push a delta for Guardian's acknowledgement. Signed by the session while
250
+ * one is set: Guardian acknowledges a multisig delta only once its
251
+ * proposal carries enough verified cosigner approvals, which the wallet
252
+ * signs. A Guardian that takes this route only from the wallet (an older
253
+ * release, or an account without a multisig state) answers
254
+ * `wallet_signature_required`, and the wallet signs the push again; the
255
+ * session stays in use for every other route.
256
+ */
190
257
  pushDelta(delta: ExecutionDelta): Promise<PushDeltaResponse>;
191
258
  getDelta(accountId: string, nonce: number): Promise<DeltaObject>;
192
259
  getDeltaSince(accountId: string, fromNonce: number): Promise<DeltaObject>;
@@ -208,6 +275,15 @@ export declare class GuardianHttpClient {
208
275
  */
209
276
  private fetchLookupAuthenticated;
210
277
  private fetchAuthenticated;
278
+ private fetchSigned;
279
+ /**
280
+ * Signs with `session` (the wallet when null) and retries replay
281
+ * rejections. Returns null, without sending, once `session` is no longer
282
+ * this client's session: a session write only ever signs within the write
283
+ * turn of the session it holds, and the caller starts over with the
284
+ * current one.
285
+ */
286
+ private sendSigned;
211
287
  private walletAuthHeaders;
212
288
  }
213
289
  //# sourceMappingURL=http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,wBAAwB,EACxB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,WAAW,EACX,cAAc,EACd,cAAc,EACd,iBAAiB,EAEjB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,WAAW,EACX,cAAc,EACd,cAAc,EACf,MAAM,YAAY,CAAC;AAoCpB;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM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