@unconfirmed/sui-effect 0.1.0 → 0.1.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.
- package/AGENTS.md +47 -14
- package/CHANGELOG.md +86 -0
- package/LLMS.md +2889 -1726
- package/README.md +517 -11
- package/dist/domain/bcs.d.ts +44 -0
- package/dist/domain/bcs.d.ts.map +1 -1
- package/dist/domain/bcs.js +64 -0
- package/dist/domain/bcs.js.map +1 -1
- package/dist/domain/errors.d.ts +164 -26
- package/dist/domain/errors.d.ts.map +1 -1
- package/dist/domain/errors.js +193 -15
- package/dist/domain/errors.js.map +1 -1
- package/dist/domain/executed.d.ts +123 -18
- package/dist/domain/executed.d.ts.map +1 -1
- package/dist/domain/executed.js +196 -5
- package/dist/domain/executed.js.map +1 -1
- package/dist/domain/journal-entry.d.ts +6 -2
- package/dist/domain/journal-entry.d.ts.map +1 -1
- package/dist/domain/schemas.d.ts +234 -67
- package/dist/domain/schemas.d.ts.map +1 -1
- package/dist/domain/schemas.js +82 -4
- package/dist/domain/schemas.js.map +1 -1
- package/dist/domain/sui-schema.d.ts +3 -2
- package/dist/domain/sui-schema.d.ts.map +1 -1
- package/dist/domain/sui-schema.js +3 -2
- package/dist/domain/sui-schema.js.map +1 -1
- package/dist/extension.d.ts +1 -1
- package/dist/extension.d.ts.map +1 -1
- package/dist/extension.js +1 -1
- package/dist/extension.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/script.d.ts +1 -1
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +1 -1
- package/dist/script.js.map +1 -1
- package/dist/services/Script.d.ts +42 -0
- package/dist/services/Script.d.ts.map +1 -1
- package/dist/services/Script.js +69 -2
- package/dist/services/Script.js.map +1 -1
- package/dist/services/Signer.d.ts +32 -7
- package/dist/services/Signer.d.ts.map +1 -1
- package/dist/services/Signer.js +69 -10
- package/dist/services/Signer.js.map +1 -1
- package/dist/services/Sui.d.ts +42 -1
- package/dist/services/Sui.d.ts.map +1 -1
- package/dist/services/Sui.js +18 -4
- package/dist/services/Sui.js.map +1 -1
- package/dist/services/SuiCore.d.ts +12 -0
- package/dist/services/SuiCore.d.ts.map +1 -1
- package/dist/services/SuiCore.js +124 -0
- package/dist/services/SuiCore.js.map +1 -1
- package/dist/services/SuiCoreFake.d.ts +59 -4
- package/dist/services/SuiCoreFake.d.ts.map +1 -1
- package/dist/services/SuiCoreFake.js +199 -23
- package/dist/services/SuiCoreFake.js.map +1 -1
- package/dist/services/SuiExtension.d.ts +127 -14
- package/dist/services/SuiExtension.d.ts.map +1 -1
- package/dist/services/SuiExtension.js +125 -28
- package/dist/services/SuiExtension.js.map +1 -1
- package/dist/services/SuiGraphQL.d.ts +13 -0
- package/dist/services/SuiGraphQL.d.ts.map +1 -1
- package/dist/services/SuiGraphQL.js +13 -0
- package/dist/services/SuiGraphQL.js.map +1 -1
- package/dist/services/Tx.d.ts +630 -12
- package/dist/services/Tx.d.ts.map +1 -1
- package/dist/services/Tx.js +187 -8
- package/dist/services/Tx.js.map +1 -1
- package/dist/testing.d.ts +22 -3
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +39 -3
- package/dist/testing.js.map +1 -1
- package/dist/tx.d.ts +1 -1
- package/dist/tx.d.ts.map +1 -1
- package/dist/tx.js +1 -1
- package/dist/tx.js.map +1 -1
- package/docs/extensions.md +871 -33
- package/examples/extension-template/src/Escrow.ts +1 -1
- package/examples/extension-template/test/escrow.test.ts +91 -2
- package/package.json +3 -2
package/dist/domain/bcs.js
CHANGED
|
@@ -59,6 +59,63 @@ export const bcs = (bcsType, expectedType) => {
|
|
|
59
59
|
})
|
|
60
60
|
}))).annotate(normalized === undefined ? {} : { [SUI_TYPE_ANNOTATION]: normalized });
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* A BCS layout plus the mapping into a domain value, as one codec.
|
|
64
|
+
*
|
|
65
|
+
* This is the shape every extension writes by hand and writes slightly
|
|
66
|
+
* differently: parse the bytes with a layout, then hand the raw struct to a
|
|
67
|
+
* constructor or a mapping function that may throw (an id that has to be
|
|
68
|
+
* branded, a `bigint` that has to be range-checked, a discriminant that has to
|
|
69
|
+
* become a union). Written out it is `SuiSchema.bcs(...)` piped into a
|
|
70
|
+
* `Schema.decodeTo` with a `transformOrFail` and an `Effect.try`, and the part
|
|
71
|
+
* that gets forgotten is turning the thrown value into a schema issue, so the
|
|
72
|
+
* failure arrives as a defect instead of a `DecodeError`.
|
|
73
|
+
*
|
|
74
|
+
* `map` is called with whatever the layout parsed. Returning a value decodes
|
|
75
|
+
* it; **throwing** fails the decode, and the thrown value's message becomes the
|
|
76
|
+
* `DecodeError.issue` the caller sees, with the expected type already on it.
|
|
77
|
+
* The result is a `Schema.Codec<A, Uint8Array>` like any other: pass it as
|
|
78
|
+
* `sui.getObject(id, { schema })`, and the Move type check still runs first
|
|
79
|
+
* because the annotation {@link bcs} leaves behind survives the composition.
|
|
80
|
+
*
|
|
81
|
+
* Encoding is not supported: a mapping function has no inverse, and inventing
|
|
82
|
+
* one silently is worse than saying so. Encode with the layout itself when you
|
|
83
|
+
* need bytes back.
|
|
84
|
+
*
|
|
85
|
+
* Fails with: `DecodeError` (through the schema), when the bytes do not parse
|
|
86
|
+
* or `map` throws.
|
|
87
|
+
*
|
|
88
|
+
* @since 0.1.1
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* import { ObjectId, SuiSchema } from "@unconfirmed/sui-effect"
|
|
93
|
+
*
|
|
94
|
+
* class Escrow {
|
|
95
|
+
* constructor(readonly id: ObjectId, readonly amount: bigint) {}
|
|
96
|
+
* }
|
|
97
|
+
*
|
|
98
|
+
* const EscrowContent = SuiSchema.decodeWith(
|
|
99
|
+
* EscrowLayout,
|
|
100
|
+
* `${packageId}::escrow::Escrow`,
|
|
101
|
+
* (raw) => new Escrow(ObjectId.normalize(raw.id), BigInt(raw.amount))
|
|
102
|
+
* )
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export const decodeWith = (bcsType, expectedType, map) => {
|
|
106
|
+
const target = Schema.declare((_u) => true);
|
|
107
|
+
return bcs(bcsType, expectedType).pipe(Schema.decodeTo(target, SchemaTransformation.transformOrFail({
|
|
108
|
+
decode: (parsed, options) => Effect.try({
|
|
109
|
+
try: () => map(parsed),
|
|
110
|
+
catch: (cause) => new SchemaIssue.InvalidValue({
|
|
111
|
+
message: `Could not map ${expectedType ?? bcsType.name} into its domain value: ${String(cause)}`
|
|
112
|
+
}, parsed, options)
|
|
113
|
+
}),
|
|
114
|
+
encode: (value, options) => Effect.fail(new SchemaIssue.Forbidden({
|
|
115
|
+
message: `${expectedType ?? bcsType.name} was built with SuiSchema.decodeWith, which has no encoder: serialize with the BCS layout instead`
|
|
116
|
+
}, value, options))
|
|
117
|
+
})));
|
|
118
|
+
};
|
|
62
119
|
const MAX_ENCODING_DEPTH = 32;
|
|
63
120
|
/**
|
|
64
121
|
* Walks the encoding chain looking for the annotation {@link bcs} leaves
|
|
@@ -171,12 +228,19 @@ export const decodeContent = (schema, content, context) => {
|
|
|
171
228
|
return Effect.fail(new DecodeError({
|
|
172
229
|
...withObject,
|
|
173
230
|
...withExpected,
|
|
231
|
+
// The type tag did not match, so not a byte was parsed: this is the
|
|
232
|
+
// decode failure a caller may answer with "not one of mine".
|
|
233
|
+
kind: "type",
|
|
174
234
|
issue: `${context?.objectId === undefined ? "the bytes have" : `object ${context.objectId} has`} type ${actual}`
|
|
175
235
|
}));
|
|
176
236
|
}
|
|
177
237
|
return Schema.decodeUnknownEffect(schema)(content).pipe(Effect.mapError((error) => new DecodeError({
|
|
178
238
|
...withObject,
|
|
179
239
|
...withExpected,
|
|
240
|
+
// The tag matched (or there was none to check) and the bytes
|
|
241
|
+
// themselves did not parse: a layout mismatch or a corrupt object,
|
|
242
|
+
// never something to swallow.
|
|
243
|
+
kind: "bytes",
|
|
180
244
|
issue: error.message
|
|
181
245
|
})));
|
|
182
246
|
};
|
package/dist/domain/bcs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bcs.js","sourceRoot":"","sources":["../../src/domain/bcs.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,MAAM,mBAAmB,GAAG,oBAAoB,CAAA;AAEhD,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,IAAI,CAAC;QACH,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,OAA0B,EAC1B,YAAqB,EACQ,EAAE;IAC/B,MAAM,UAAU,GAAG,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IACvF,4EAA4E;IAC5E,+EAA+E;IAC/E,MAAM,KAAK,GAAG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAA;IACxC,4EAA4E;IAC5E,2EAA2E;IAC3E,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,EAAW,EAAW,EAAE,CAAC,IAAI,CAAC,CAAA;IAC7D,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAC3B,MAAM,CAAC,QAAQ,CACb,MAAM,EACN,oBAAoB,CAAC,eAAe,CAAgB;QAClD,MAAM,EAAE,CAAC,KAAK,EAAE,O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EAAE,GACL,OAAO,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,OAAO,CAAC,QAAQ,MACjF,SAAS,MAAM,EAAE;SAClB,CAAC,CACH,CAAA;IACH,CAAC;IACD,OAAO,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CACrD,MAAM,CAAC,QAAQ,CACb,CAAC,KAAK,EAAE,EAAE,CACR,IAAI,WAAW,CAAC;QACd,GAAG,UAAU;QACb,GAAG,YAAY;QACf,6DAA6D;QAC7D,mEAAmE;QACnE,8BAA8B;QAC9B,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,KAAK,CAAC,OAAO;KACrB,CAAC,CACL,CACF,CAAA;AACH,CAAC,CAAA"}
|
package/dist/domain/errors.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export declare class TransportError extends TransportError_base {
|
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
static readonly fromUnknown: (method: string, cause: unknown, retryable?: boolean) => TransportError;
|
|
58
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
59
|
+
get message(): string;
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
62
|
* gRPC status names a read may be retried on, plus HTTP 5xx and 429. Timeouts
|
|
@@ -77,31 +79,54 @@ export declare const classifyTransportCause: (cause: unknown) => {
|
|
|
77
79
|
readonly retryable: boolean;
|
|
78
80
|
};
|
|
79
81
|
declare const ObjectNotFound_base: Schema.Class<ObjectNotFound, Schema.TaggedStruct<"ObjectNotFound", {
|
|
80
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
82
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
83
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
84
|
+
};
|
|
81
85
|
readonly version: Schema.optional<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
82
86
|
}>, import("effect/Cause").YieldableError>;
|
|
83
87
|
/** The object does not exist, or has never existed. */
|
|
84
88
|
export declare class ObjectNotFound extends ObjectNotFound_base {
|
|
89
|
+
/**
|
|
90
|
+
* The one actionable line `SuiError.describe` produces for this error.
|
|
91
|
+
*
|
|
92
|
+
* `Schema.TaggedError` gives every class the `Error` constructor and no
|
|
93
|
+
* message of its own, so `error.message` was the empty string — and a
|
|
94
|
+
* consumer that surfaces `.message` (a log line, a UI, another library's
|
|
95
|
+
* error formatter) showed nothing at all. A getter rather than a schema
|
|
96
|
+
* field, so it is always in step with `describe`, costs nothing to
|
|
97
|
+
* construct, and stays out of `SuiError.toJson`'s encoding.
|
|
98
|
+
*/
|
|
99
|
+
get message(): string;
|
|
85
100
|
}
|
|
86
101
|
declare const ObjectDeleted_base: Schema.Class<ObjectDeleted, Schema.TaggedStruct<"ObjectDeleted", {
|
|
87
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
102
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
103
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
104
|
+
};
|
|
88
105
|
readonly version: Schema.optional<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
89
106
|
}>, import("effect/Cause").YieldableError>;
|
|
90
107
|
/** The object existed and has been deleted or wrapped. */
|
|
91
108
|
export declare class ObjectDeleted extends ObjectDeleted_base {
|
|
109
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
110
|
+
get message(): string;
|
|
92
111
|
}
|
|
93
112
|
declare const ObjectUnavailable_base: Schema.Class<ObjectUnavailable, Schema.TaggedStruct<"ObjectUnavailable", {
|
|
94
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
113
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
114
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
115
|
+
};
|
|
95
116
|
readonly version: Schema.optional<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
96
117
|
}>, import("effect/Cause").YieldableError>;
|
|
97
118
|
/** The node could not say what happened to the object (`ObjectError.reason: "unknown"`). */
|
|
98
119
|
export declare class ObjectUnavailable extends ObjectUnavailable_base {
|
|
120
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
121
|
+
get message(): string;
|
|
99
122
|
}
|
|
100
123
|
declare const TransactionNotFound_base: Schema.Class<TransactionNotFound, Schema.TaggedStruct<"TransactionNotFound", {
|
|
101
124
|
readonly digest: Schema.brand<Schema.String, "Digest">;
|
|
102
125
|
}>, import("effect/Cause").YieldableError>;
|
|
103
126
|
/** No transaction with this digest is known to the node. */
|
|
104
127
|
export declare class TransactionNotFound extends TransactionNotFound_base {
|
|
128
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
129
|
+
get message(): string;
|
|
105
130
|
}
|
|
106
131
|
declare const NetworkMismatch_base: Schema.Class<NetworkMismatch, Schema.TaggedStruct<"NetworkMismatch", {
|
|
107
132
|
readonly expected: Schema.String;
|
|
@@ -109,14 +134,57 @@ declare const NetworkMismatch_base: Schema.Class<NetworkMismatch, Schema.TaggedS
|
|
|
109
134
|
}>, import("effect/Cause").YieldableError>;
|
|
110
135
|
/** The chain identifier the node reported is not the one the layer was built for. */
|
|
111
136
|
export declare class NetworkMismatch extends NetworkMismatch_base {
|
|
137
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
138
|
+
get message(): string;
|
|
112
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Which of the three things that can go wrong at a decode boundary went wrong.
|
|
142
|
+
*
|
|
143
|
+
* - `"type"`: the object, the field or the event **is not of the expected Move
|
|
144
|
+
* type**. The bytes were never parsed. This is the one a caller answers with
|
|
145
|
+
* "that is not one of mine" — a 404 for a foreign object, a `filter` over a
|
|
146
|
+
* heterogeneous list — and the one it is safe to swallow.
|
|
147
|
+
* - `"bytes"`: the type matched and the **BCS parse failed**, or left trailing
|
|
148
|
+
* bytes. Either the layout this package was built with is not the layout the
|
|
149
|
+
* package on chain writes, or the object is corrupt. Never safe to swallow.
|
|
150
|
+
* - `"shape"`: a **domain schema** refused a value that was already parsed or
|
|
151
|
+
* that came from the node as JSON — a missing field in a node response, a
|
|
152
|
+
* number that is not a timestamp, a simulation with no such command. A bug
|
|
153
|
+
* here is in this library, the node, or the caller's expectations.
|
|
154
|
+
*
|
|
155
|
+
* Branch on this, never on {@link DecodeError}'s `issue`: `issue` is a human
|
|
156
|
+
* sentence and its wording changes between releases.
|
|
157
|
+
*
|
|
158
|
+
* @since 0.1.2
|
|
159
|
+
*/
|
|
160
|
+
export declare const DecodeKind: Schema.Literals<readonly ["type", "bytes", "shape"]>;
|
|
161
|
+
/** The three decode failures {@link DecodeKind} names. */
|
|
162
|
+
export type DecodeKind = typeof DecodeKind.Type;
|
|
113
163
|
declare const DecodeError_base: Schema.Class<DecodeError, Schema.TaggedStruct<"DecodeError", {
|
|
114
|
-
readonly objectId: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
164
|
+
readonly objectId: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
165
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
166
|
+
}>;
|
|
115
167
|
readonly expectedType: Schema.optional<Schema.String>;
|
|
168
|
+
/**
|
|
169
|
+
* Which boundary failed. See {@link DecodeKind}.
|
|
170
|
+
*
|
|
171
|
+
* @since 0.1.2
|
|
172
|
+
*/
|
|
173
|
+
readonly kind: Schema.withConstructorDefault<Schema.withDecodingDefaultKey<Schema.Literals<readonly ["type", "bytes", "shape"]>, never>>;
|
|
116
174
|
readonly issue: Schema.String;
|
|
117
175
|
}>, import("effect/Cause").YieldableError>;
|
|
118
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* BCS content or a schema boundary did not decode.
|
|
178
|
+
*
|
|
179
|
+
* `kind` says which of the three (`"type"`, `"bytes"`, `"shape"`) and is what a
|
|
180
|
+
* consumer branches on; `issue` is the sentence for a human and is not stable.
|
|
181
|
+
* It defaults to `"shape"` when neither a constructor nor an encoded value
|
|
182
|
+
* carries one, so an extension that builds a `DecodeError` with no `kind` still
|
|
183
|
+
* compiles and still answers the question conservatively.
|
|
184
|
+
*/
|
|
119
185
|
export declare class DecodeError extends DecodeError_base {
|
|
186
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
187
|
+
get message(): string;
|
|
120
188
|
}
|
|
121
189
|
declare const SimulationFailed_base: Schema.Class<SimulationFailed, Schema.TaggedStruct<"SimulationFailed", {
|
|
122
190
|
readonly reason: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
@@ -286,16 +354,22 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
286
354
|
}>;
|
|
287
355
|
readonly transactionDigest: Schema.brand<Schema.String, "Digest">;
|
|
288
356
|
readonly gasObject: Schema.NullOr<Schema.Struct<{
|
|
289
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
357
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
358
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
359
|
+
};
|
|
290
360
|
readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
|
|
291
361
|
readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
292
362
|
readonly inputDigest: Schema.NullOr<Schema.String>;
|
|
293
363
|
readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
294
364
|
readonly $kind: Schema.Literal<"AddressOwner">;
|
|
295
|
-
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
365
|
+
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
366
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
367
|
+
};
|
|
296
368
|
}>, Schema.Struct<{
|
|
297
369
|
readonly $kind: Schema.Literal<"ObjectOwner">;
|
|
298
|
-
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
370
|
+
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
371
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
372
|
+
};
|
|
299
373
|
}>, Schema.Struct<{
|
|
300
374
|
readonly $kind: Schema.Literal<"Shared">;
|
|
301
375
|
readonly Shared: Schema.Struct<{
|
|
@@ -308,7 +382,9 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
308
382
|
readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
|
|
309
383
|
readonly ConsensusAddressOwner: Schema.Struct<{
|
|
310
384
|
readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
|
|
311
|
-
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
385
|
+
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
386
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
387
|
+
};
|
|
312
388
|
}>;
|
|
313
389
|
}>, Schema.Struct<{
|
|
314
390
|
readonly $kind: Schema.Literal<"Unknown">;
|
|
@@ -318,10 +394,14 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
318
394
|
readonly outputDigest: Schema.NullOr<Schema.String>;
|
|
319
395
|
readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
320
396
|
readonly $kind: Schema.Literal<"AddressOwner">;
|
|
321
|
-
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
397
|
+
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
398
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
399
|
+
};
|
|
322
400
|
}>, Schema.Struct<{
|
|
323
401
|
readonly $kind: Schema.Literal<"ObjectOwner">;
|
|
324
|
-
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
402
|
+
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
403
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
404
|
+
};
|
|
325
405
|
}>, Schema.Struct<{
|
|
326
406
|
readonly $kind: Schema.Literal<"Shared">;
|
|
327
407
|
readonly Shared: Schema.Struct<{
|
|
@@ -334,7 +414,9 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
334
414
|
readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
|
|
335
415
|
readonly ConsensusAddressOwner: Schema.Struct<{
|
|
336
416
|
readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
|
|
337
|
-
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
417
|
+
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
418
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
419
|
+
};
|
|
338
420
|
}>;
|
|
339
421
|
}>, Schema.Struct<{
|
|
340
422
|
readonly $kind: Schema.Literal<"Unknown">;
|
|
@@ -345,16 +427,22 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
345
427
|
readonly dependencies: Schema.$Array<Schema.String>;
|
|
346
428
|
readonly lamportVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
347
429
|
readonly changedObjects: Schema.$Array<Schema.Struct<{
|
|
348
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
430
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
431
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
432
|
+
};
|
|
349
433
|
readonly inputState: Schema.Literals<readonly ["Unknown", "DoesNotExist", "Exists"]>;
|
|
350
434
|
readonly inputVersion: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
351
435
|
readonly inputDigest: Schema.NullOr<Schema.String>;
|
|
352
436
|
readonly inputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
353
437
|
readonly $kind: Schema.Literal<"AddressOwner">;
|
|
354
|
-
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
438
|
+
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
439
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
440
|
+
};
|
|
355
441
|
}>, Schema.Struct<{
|
|
356
442
|
readonly $kind: Schema.Literal<"ObjectOwner">;
|
|
357
|
-
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
443
|
+
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
444
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
445
|
+
};
|
|
358
446
|
}>, Schema.Struct<{
|
|
359
447
|
readonly $kind: Schema.Literal<"Shared">;
|
|
360
448
|
readonly Shared: Schema.Struct<{
|
|
@@ -367,7 +455,9 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
367
455
|
readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
|
|
368
456
|
readonly ConsensusAddressOwner: Schema.Struct<{
|
|
369
457
|
readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
|
|
370
|
-
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
458
|
+
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
459
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
460
|
+
};
|
|
371
461
|
}>;
|
|
372
462
|
}>, Schema.Struct<{
|
|
373
463
|
readonly $kind: Schema.Literal<"Unknown">;
|
|
@@ -377,10 +467,14 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
377
467
|
readonly outputDigest: Schema.NullOr<Schema.String>;
|
|
378
468
|
readonly outputOwner: Schema.NullOr<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
379
469
|
readonly $kind: Schema.Literal<"AddressOwner">;
|
|
380
|
-
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
470
|
+
readonly AddressOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
471
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
472
|
+
};
|
|
381
473
|
}>, Schema.Struct<{
|
|
382
474
|
readonly $kind: Schema.Literal<"ObjectOwner">;
|
|
383
|
-
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
475
|
+
readonly ObjectOwner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
476
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
477
|
+
};
|
|
384
478
|
}>, Schema.Struct<{
|
|
385
479
|
readonly $kind: Schema.Literal<"Shared">;
|
|
386
480
|
readonly Shared: Schema.Struct<{
|
|
@@ -393,7 +487,9 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
393
487
|
readonly $kind: Schema.Literal<"ConsensusAddressOwner">;
|
|
394
488
|
readonly ConsensusAddressOwner: Schema.Struct<{
|
|
395
489
|
readonly startVersion: Schema.brand<Schema.BigIntFromString, "Version">;
|
|
396
|
-
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
490
|
+
readonly owner: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
491
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
492
|
+
};
|
|
397
493
|
}>;
|
|
398
494
|
}>, Schema.Struct<{
|
|
399
495
|
readonly $kind: Schema.Literal<"Unknown">;
|
|
@@ -402,7 +498,9 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
402
498
|
}>>;
|
|
403
499
|
readonly unchangedConsensusObjects: Schema.$Array<Schema.Struct<{
|
|
404
500
|
readonly kind: Schema.Literals<readonly ["Unknown", "ReadOnlyRoot", "MutateConsensusStreamEnded", "ReadConsensusStreamEnded", "Cancelled", "PerEpochConfig"]>;
|
|
405
|
-
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
501
|
+
readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
502
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
503
|
+
};
|
|
406
504
|
readonly version: Schema.NullOr<Schema.brand<Schema.BigIntFromString, "Version">>;
|
|
407
505
|
readonly digest: Schema.NullOr<Schema.String>;
|
|
408
506
|
}>>;
|
|
@@ -411,6 +509,8 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
|
|
|
411
509
|
}>, import("effect/Cause").YieldableError>;
|
|
412
510
|
/** The transaction was applied on chain and failed. Gas was charged. */
|
|
413
511
|
export declare class ExecutionFailed extends ExecutionFailed_base {
|
|
512
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
513
|
+
get message(): string;
|
|
414
514
|
}
|
|
415
515
|
declare const SubmissionUnknown_base: Schema.Class<SubmissionUnknown, Schema.TaggedStruct<"SubmissionUnknown", {
|
|
416
516
|
readonly digest: Schema.brand<Schema.String, "Digest">;
|
|
@@ -418,7 +518,9 @@ declare const SubmissionUnknown_base: Schema.Class<SubmissionUnknown, Schema.Tag
|
|
|
418
518
|
readonly digest: Schema.brand<Schema.String, "Digest">;
|
|
419
519
|
readonly bytes: Schema.Uint8ArrayFromBase64;
|
|
420
520
|
readonly signatures: Schema.$Array<Schema.brand<Schema.String, "Signature">>;
|
|
421
|
-
readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"
|
|
521
|
+
readonly sender: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "SuiAddress"> & {
|
|
522
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"SuiAddress">;
|
|
523
|
+
};
|
|
422
524
|
readonly expiration: Schema.optional<Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
|
|
423
525
|
readonly $kind: Schema.Literal<"None">;
|
|
424
526
|
readonly None: Schema.Literal<true>;
|
|
@@ -459,6 +561,8 @@ declare const SubmissionUnknown_base: Schema.Class<SubmissionUnknown, Schema.Tag
|
|
|
459
561
|
* signed transaction so an operator or a later process can reconcile it.
|
|
460
562
|
*/
|
|
461
563
|
export declare class SubmissionUnknown extends SubmissionUnknown_base {
|
|
564
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
565
|
+
get message(): string;
|
|
462
566
|
}
|
|
463
567
|
declare const NotApplied_base: Schema.Class<NotApplied, Schema.TaggedStruct<"NotApplied", {
|
|
464
568
|
readonly digest: Schema.brand<Schema.String, "Digest">;
|
|
@@ -474,12 +578,16 @@ declare const NotApplied_base: Schema.Class<NotApplied, Schema.TaggedStruct<"Not
|
|
|
474
578
|
* node will not name are all `SubmissionUnknown`, not this.
|
|
475
579
|
*/
|
|
476
580
|
export declare class NotApplied extends NotApplied_base {
|
|
581
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
582
|
+
get message(): string;
|
|
477
583
|
}
|
|
478
584
|
declare const SigningError_base: Schema.Class<SigningError, Schema.TaggedStruct<"SigningError", {
|
|
479
585
|
readonly cause: Schema.Defect;
|
|
480
586
|
}>, import("effect/Cause").YieldableError>;
|
|
481
587
|
/** A signer refused or failed to produce a signature. */
|
|
482
588
|
export declare class SigningError extends SigningError_base {
|
|
589
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
590
|
+
get message(): string;
|
|
483
591
|
}
|
|
484
592
|
declare const BuildError_base: Schema.Class<BuildError, Schema.TaggedStruct<"BuildError", {
|
|
485
593
|
readonly message: Schema.String;
|
|
@@ -500,11 +608,15 @@ declare const JournalError_base: Schema.Class<JournalError, Schema.TaggedStruct<
|
|
|
500
608
|
}>, import("effect/Cause").YieldableError>;
|
|
501
609
|
/** The submission journal could not be read or written. */
|
|
502
610
|
export declare class JournalError extends JournalError_base {
|
|
611
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
612
|
+
get message(): string;
|
|
503
613
|
}
|
|
504
614
|
declare const UnexpectedEffects_base: Schema.Class<UnexpectedEffects, Schema.TaggedStruct<"UnexpectedEffects", {
|
|
505
615
|
readonly digest: Schema.brand<Schema.String, "Digest">;
|
|
506
616
|
readonly expected: Schema.String;
|
|
507
|
-
readonly found: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"
|
|
617
|
+
readonly found: Schema.$Array<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
|
|
618
|
+
normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
|
|
619
|
+
}>;
|
|
508
620
|
}>, import("effect/Cause").YieldableError>;
|
|
509
621
|
/**
|
|
510
622
|
* The effects of an applied transaction did not contain what the caller
|
|
@@ -517,6 +629,8 @@ declare const UnexpectedEffects_base: Schema.Class<UnexpectedEffects, Schema.Tag
|
|
|
517
629
|
* time for a transaction that already ran.
|
|
518
630
|
*/
|
|
519
631
|
export declare class UnexpectedEffects extends UnexpectedEffects_base {
|
|
632
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
633
|
+
get message(): string;
|
|
520
634
|
}
|
|
521
635
|
declare const GraphQLUnavailable_base: Schema.Class<GraphQLUnavailable, Schema.TaggedStruct<"GraphQLUnavailable", {
|
|
522
636
|
readonly method: Schema.String;
|
|
@@ -536,6 +650,8 @@ declare const GraphQLUnavailable_base: Schema.Class<GraphQLUnavailable, Schema.T
|
|
|
536
650
|
* Outcome `not_applied`: a read that did not happen changed nothing.
|
|
537
651
|
*/
|
|
538
652
|
export declare class GraphQLUnavailable extends GraphQLUnavailable_base {
|
|
653
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
654
|
+
get message(): string;
|
|
539
655
|
}
|
|
540
656
|
declare const ExtensionNotReady_base: Schema.Class<ExtensionNotReady, Schema.TaggedStruct<"ExtensionNotReady", {
|
|
541
657
|
readonly extension: Schema.String;
|
|
@@ -556,6 +672,8 @@ declare const ExtensionNotReady_base: Schema.Class<ExtensionNotReady, Schema.Tag
|
|
|
556
672
|
* Outcome `not_applied`: nothing was sent.
|
|
557
673
|
*/
|
|
558
674
|
export declare class ExtensionNotReady extends ExtensionNotReady_base {
|
|
675
|
+
/** The one actionable line `SuiError.describe` produces for this error. */
|
|
676
|
+
get message(): string;
|
|
559
677
|
}
|
|
560
678
|
/** Every failure sui-effect can produce. */
|
|
561
679
|
export type SuiError = TransportError | ObjectNotFound | ObjectDeleted | ObjectUnavailable | TransactionNotFound | NetworkMismatch | DecodeError | SimulationFailed | ExecutionFailed | SubmissionUnknown | NotApplied | SigningError | BuildError | PolicyDenied | JournalError | UnexpectedEffects | GraphQLUnavailable | ExtensionNotReady;
|
|
@@ -566,6 +684,20 @@ export declare const SuiErrorSchema: Schema.Union<readonly [typeof TransportErro
|
|
|
566
684
|
* or a wrapper script acts on.
|
|
567
685
|
*/
|
|
568
686
|
export type Outcome = "applied" | "not_applied" | "unknown";
|
|
687
|
+
/**
|
|
688
|
+
* Where in the lifecycle a failure was caught, which is the only thing that
|
|
689
|
+
* can classify an error the taxonomy does not own.
|
|
690
|
+
*
|
|
691
|
+
* `"post-submit"` (the default, and the 0.1.1 behaviour) is "bytes may have
|
|
692
|
+
* gone out": a tag nobody here recognises proves nothing, so the answer is
|
|
693
|
+
* `"unknown"`. `"pre-submit"` is a failure caught while **building, simulating
|
|
694
|
+
* or signing** — an extension's own `PriceTooLow`, a validation error from the
|
|
695
|
+
* caller's code — where nothing has been sent by construction and the honest
|
|
696
|
+
* answer is `"not_applied"`.
|
|
697
|
+
*
|
|
698
|
+
* @since 0.1.2
|
|
699
|
+
*/
|
|
700
|
+
export type OutcomePhase = "pre-submit" | "post-submit";
|
|
569
701
|
/**
|
|
570
702
|
* An extension error may declare its own `outcome`, and `SuiError.outcome` and
|
|
571
703
|
* `Script.run` honour it before anything else.
|
|
@@ -579,13 +711,19 @@ export interface HasOutcome {
|
|
|
579
711
|
readonly outcome: Outcome;
|
|
580
712
|
}
|
|
581
713
|
/**
|
|
582
|
-
* The
|
|
583
|
-
* transaction land, what does an operator need to read,
|
|
714
|
+
* The helpers every repo hand-rolls: is this worth retrying, did the
|
|
715
|
+
* transaction land, is it even one of ours, what does an operator need to read,
|
|
716
|
+
* and what goes in a log.
|
|
584
717
|
*/
|
|
585
718
|
export declare const SuiError: {
|
|
586
719
|
readonly isRetryable: (error: SuiError) => boolean;
|
|
587
|
-
readonly
|
|
588
|
-
readonly
|
|
720
|
+
readonly isTaxonomy: (error: unknown) => error is SuiError;
|
|
721
|
+
readonly outcome: (error: SuiError | HasOutcome, options?: {
|
|
722
|
+
readonly phase?: OutcomePhase;
|
|
723
|
+
}) => Outcome;
|
|
724
|
+
readonly describe: (error: SuiError | {
|
|
725
|
+
readonly _tag: string;
|
|
726
|
+
}) => string;
|
|
589
727
|
readonly toJson: (error: SuiError | {
|
|
590
728
|
readonly _tag: string;
|
|
591
729
|
}) => Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/domain/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/domain/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAkB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EACL,MAAM,EAOP,MAAM,cAAc,CAAA;AAErB,OAA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