@unconfirmed/sui-effect 0.1.1 → 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.
Files changed (58) hide show
  1. package/AGENTS.md +34 -11
  2. package/CHANGELOG.md +46 -0
  3. package/LLMS.md +953 -301
  4. package/README.md +171 -9
  5. package/dist/domain/bcs.d.ts.map +1 -1
  6. package/dist/domain/bcs.js +7 -0
  7. package/dist/domain/bcs.js.map +1 -1
  8. package/dist/domain/errors.d.ts +101 -5
  9. package/dist/domain/errors.d.ts.map +1 -1
  10. package/dist/domain/errors.js +158 -8
  11. package/dist/domain/errors.js.map +1 -1
  12. package/dist/domain/executed.d.ts +69 -0
  13. package/dist/domain/executed.d.ts.map +1 -1
  14. package/dist/domain/executed.js +196 -5
  15. package/dist/domain/executed.js.map +1 -1
  16. package/dist/domain/schemas.d.ts +27 -1
  17. package/dist/domain/schemas.d.ts.map +1 -1
  18. package/dist/domain/schemas.js +20 -2
  19. package/dist/domain/schemas.js.map +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/script.d.ts +1 -1
  25. package/dist/script.d.ts.map +1 -1
  26. package/dist/script.js +1 -1
  27. package/dist/script.js.map +1 -1
  28. package/dist/services/Script.d.ts +42 -0
  29. package/dist/services/Script.d.ts.map +1 -1
  30. package/dist/services/Script.js +69 -2
  31. package/dist/services/Script.js.map +1 -1
  32. package/dist/services/Signer.d.ts +32 -7
  33. package/dist/services/Signer.d.ts.map +1 -1
  34. package/dist/services/Signer.js +69 -10
  35. package/dist/services/Signer.js.map +1 -1
  36. package/dist/services/Sui.d.ts +42 -1
  37. package/dist/services/Sui.d.ts.map +1 -1
  38. package/dist/services/Sui.js +18 -4
  39. package/dist/services/Sui.js.map +1 -1
  40. package/dist/services/SuiCoreFake.d.ts +47 -4
  41. package/dist/services/SuiCoreFake.d.ts.map +1 -1
  42. package/dist/services/SuiCoreFake.js +193 -22
  43. package/dist/services/SuiCoreFake.js.map +1 -1
  44. package/dist/services/Tx.d.ts +627 -11
  45. package/dist/services/Tx.d.ts.map +1 -1
  46. package/dist/services/Tx.js +187 -8
  47. package/dist/services/Tx.js.map +1 -1
  48. package/dist/testing.d.ts +1 -0
  49. package/dist/testing.d.ts.map +1 -1
  50. package/dist/testing.js +9 -0
  51. package/dist/testing.js.map +1 -1
  52. package/dist/tx.d.ts +1 -1
  53. package/dist/tx.d.ts.map +1 -1
  54. package/dist/tx.js +1 -1
  55. package/dist/tx.js.map +1 -1
  56. package/docs/extensions.md +533 -8
  57. package/examples/extension-template/src/Escrow.ts +1 -1
  58. package/package.json +1 -1
package/README.md CHANGED
@@ -416,7 +416,8 @@ need a field or a method the tier above does not expose, and through
416
416
  code reads through: fixed include sets, BCS content decoded through `Schema`
417
417
  with the object's Move type checked first, `Option` where absence is normal,
418
418
  batch reads chunked to 50 and checked for missing or duplicated ids — per-item
419
- `Result` from `getObjects`, first-error-wins from `getObjectsOrFail` pagination
419
+ `Result` from `getObjects`, first-error-wins from `getObjectsStrict` (the same
420
+ function as the deprecated `getObjectsOrFail`) — pagination
420
421
  as `Stream`, one lock per sender so two transactions from one address cannot
421
422
  pick the same gas coin, and the chain's own clock. A Move type with no type
422
423
  arguments matches every instantiation of it, wherever a type is compared, so one
@@ -427,7 +428,8 @@ was built over as `sui.core`, which is why every `Tx.*` function needs only
427
428
  ## The transaction lifecycle
428
429
 
429
430
  `Tx` is the lifecycle as functions — `build`, `sign`, `cosign`, `sponsored`,
430
- `submit`, `reconcile`, `run`, `reconcileAll` — each with a closed error union
431
+ `submit`, `submitVia`, `reconcile`, `recorded`, `run`, `reconcileAll` — each
432
+ with a closed error union
431
433
  and `R = Sui`. `Tx.run` holds the sender lock from build through submit, builds
432
434
  (which always simulates before anything is signed — the SDK's resolver does it
433
435
  when there is anything to resolve, and `Tx.build` runs one explicitly when
@@ -438,7 +440,12 @@ timeout, waits for the execution to be visible to reads before it releases the
438
440
  lock, and if it still does not know what happened, reconciles: `Executed`,
439
441
  `ExecutionFailed`, `NotApplied { evidence }`, or `SubmissionUnknown` carrying
440
442
  the bytes. A `TransportError` never escapes once bytes may have been sent —
441
- from `submit`, and from `reconcile` and `reconcileAll` too. `Signer` is a
443
+ from `submit`, and from `reconcile` and `reconcileAll` too with one exception:
444
+ a gRPC **`INVALID_ARGUMENT`**, which is the node refusing the request outright
445
+ (malformed bytes, or a sponsored transaction carrying one signature). Nothing
446
+ was executed, so `Tx.submit` reports that error as it is rather than
447
+ reconciling, because a reconcile would go on to ask whether that digest is on
448
+ chain — a question about a transaction that was never sent. `Signer` is a
442
449
  value, not a service, so one process can hold two credentials; `SubmitConfig`
443
450
  and `Journal` are `Context.Reference`s with working defaults, so none of this
444
451
  needs wiring, and `@unconfirmed/sui-effect/journal` swaps the memory journal for a durable
@@ -469,6 +476,30 @@ do not build a retry loop that expects `NotApplied { inputConsumed }`. Before
469
476
  any of this, reconcile compares the chain the bytes were built for with
470
477
  `sui.chainId` and refuses to reason across chains.
471
478
 
479
+ **`Tx.run` has a hook between signing and sending.** `onSigned(signed)` runs
480
+ inside the sender lock, after the last signature and before the first
481
+ `executeTransaction`, for the record the journal does not hold — a domain row
482
+ joining the digest to a batch, an outbox, an idempotency key. Failing it fails
483
+ the run with nothing sent; its error is `JournalError`, which is already in
484
+ `Tx.run`'s union and already means "the record could not be written and nothing
485
+ has gone out".
486
+
487
+ **`Tx.submitVia(signed, send)` is the lifecycle when someone else submits.** A
488
+ relay or a sponsorship service that holds the only key allowed to talk to the
489
+ node gets the bytes from you; this keeps everything around that. It journals
490
+ `Signed` before calling `send`, calls it exactly once, turns the reply into an
491
+ `Executed` when it carries one (an SDK `TransactionResult`, a reduced envelope,
492
+ or a bare digest, in which case it asks the chain), reconciles an ambiguous
493
+ `send` failure with the full evidence rules, and journals the terminal answer.
494
+ A `send` error whose instance declares `outcome: "not_applied"` is taken at its
495
+ word and fails straight through.
496
+
497
+ **`Tx.reconcileAll()` returns only what was unresolved**, as a tagged union —
498
+ `{ _tag: "Executed", executed }`, `{ _tag: "ExecutionFailed", error }`,
499
+ `{ _tag: "NotApplied", error }`, `{ _tag: "SubmissionUnknown", error }`. A
500
+ digest that had already settled is not in it; `Tx.recorded(digest)` answers with
501
+ that entry (`Option<JournalEntry>`).
502
+
472
503
  **A sponsored `Tx.run` needs both signatures.** When the gas owner is not the
473
504
  sender, pass `sponsor`: `Tx.run(recipe, { signer, gasOwner, sponsor })`. Without
474
505
  it the run fails with `SigningError` before anything is built, because one
@@ -532,7 +563,7 @@ no error inheritance to match on.
532
563
  | `ObjectNotFound` / `ObjectDeleted` / `ObjectUnavailable` | `objectId`, `version?` | The three `ObjectError.reason` values |
533
564
  | `TransactionNotFound` | `digest` | No transaction with that digest is known |
534
565
  | `NetworkMismatch` | `expected`, `actual` | The node is on another chain than the layer was built for |
535
- | `DecodeError` | `objectId?`, `expectedType?`, `issue` | BCS content or a schema boundary did not decode |
566
+ | `DecodeError` | `objectId?`, `expectedType?`, `kind`, `issue` | BCS content or a schema boundary did not decode. `kind` is `"type"` (the Move type was not the one expected — nothing was parsed, and the one a caller may answer with a 404), `"bytes"` (the BCS parse failed: a layout mismatch, never safe to swallow) or `"shape"` (a domain schema refused a parsed or JSON value). Branch on `kind`, never on `issue`, whose wording changes between releases |
536
567
  | `SimulationFailed` | `reason`, `message` | Simulation reported an execution failure. No gas charged |
537
568
  | `ExecutionFailed` | `digest`, `reason`, `command?`, `effects` | Applied on chain and failed. Gas charged |
538
569
  | `SubmissionUnknown` | `digest`, `signed?`, `cause` | Bytes may have been sent; the outcome is unknown. Carries them, unless it came from reconciling a bare digest |
@@ -547,8 +578,15 @@ no error inheritance to match on.
547
578
 
548
579
  `ExecutionReason` mirrors the SDK's `ExecutionError` variant for variant, with
549
580
  `MoveAbort.abortCode` as a `bigint` and clever-error constant names decoded.
550
- `SuiError.isRetryable`, `SuiError.outcome`, `SuiError.describe` and
551
- `SuiError.toJson` are the four helpers every repo otherwise hand-rolls;
581
+ **Every one of them has a readable `.message`**: for the classes that carry no
582
+ `message` field of their own it is a getter returning `SuiError.describe(this)`,
583
+ so anything that surfaces `error.message` — a log line, a UI, another library's
584
+ formatter — shows the actionable line instead of an empty string. It is not a
585
+ schema field and does not appear in `SuiError.toJson`'s output.
586
+
587
+ `SuiError.isRetryable`, `SuiError.outcome`, `SuiError.isTaxonomy`,
588
+ `SuiError.describe` and `SuiError.toJson` are the helpers every repo otherwise
589
+ hand-rolls;
552
590
  `outcome` puts every failure on the `"applied" | "not_applied" | "unknown"`
553
591
  axis, and an extension error may declare its own. An error that is neither a tag
554
592
  above nor declares an `outcome` is *unclassified*: `outcome` answers `"unknown"`,
@@ -556,7 +594,23 @@ because an unrecognised tag is no evidence that nothing happened, and
556
594
  `Script.exitCode` exits 1 rather than 3, because it is no evidence that anything
557
595
  was sent either. Declare `outcome` on every error your extension defines — as a
558
596
  class field is fine, `toJson` reads it off the instance and serializes it either
559
- way.
597
+ way, and the check duck-types the field, so an existing `Error` subclass with an
598
+ `outcome` property lands on the axis without becoming a `Schema.TaggedError`
599
+ first.
600
+
601
+ `SuiError.outcome(error, { phase: "pre-submit" })` changes exactly one answer:
602
+ an unrecognised tag caught **before** anything could have been sent — in a
603
+ `catchAll` around a build, a simulate or a signature — is `"not_applied"`
604
+ rather than `"unknown"`, which is true there by construction. The default stays
605
+ `"post-submit"`. `SuiError.isTaxonomy(error)` answers the question underneath
606
+ it, and `SuiError.describe` accepts a foreign error too, falling back to its tag
607
+ and message rather than returning nothing.
608
+
609
+ **A wrapper error must carry what it wrapped.** `Script.exitCode` honours a
610
+ declared `outcome` before the tag, so a `catchAll` that re-raises its own error
611
+ type around a `Tx.run` must copy `outcome: SuiError.outcome(cause)` and the
612
+ digest, or a charged `ExecutionFailed` becomes exit 1 or, worse, exit 4 — and
613
+ the wrapper retries a transaction that already ran.
560
614
 
561
615
  ## Scripts
562
616
 
@@ -567,7 +621,7 @@ way.
567
621
  | `SUI_NETWORK` | yes, no default | `mainnet`, `testnet`, `devnet`, `localnet` or your own |
568
622
  | `SUI_ALLOW_MAINNET` | only for mainnet | `1` or `true`; a script that means mainnet has to say so twice |
569
623
  | `SUI_RPC_URL` | no | The gRPC endpoint; defaulted per known network |
570
- | `SUI_PRIVATE_KEY` | `Script` only | A Bech32 `suiprivkey1…` key, read through `Config.redacted`. A key that does not decode fails with one fixed sentence and no cause: the Bech32 decoder quotes the whole input it rejected, so nothing derived from it is ever printed |
624
+ | `SUI_PRIVATE_KEY` | `Script` only | A Bech32 `suiprivkey1…` key **or a 32-byte hex seed** (64 hex characters, `0x` optional, read as Ed25519), through `Config.redacted`. A key that does not decode fails with one fixed sentence and no cause: the Bech32 decoder quotes the whole input it rejected, so nothing derived from it is ever printed |
571
625
 
572
626
  `Script.layerReadOnly` provides `ScriptReadOnly`, which has no signer at all —
573
627
  a separate service key, so a script written to sign cannot silently build over a
@@ -591,9 +645,106 @@ bytes finish.
591
645
  | 5 | applied on chain: `ExecutionFailed` (gas charged) or `UnexpectedEffects` (it ran; the receipt is missing) |
592
646
  | 130 | interrupted, with nothing outstanding in the journal |
593
647
 
648
+ **`Script.report(exit, { stderr?, journal? })`** is those last two steps on
649
+ their own — the diagnostic lines and the unresolved entries, with the exit code
650
+ as the answer — for a CLI that owns its own argv parsing and process. Assign it
651
+ to `process.exitCode` rather than calling `process.exit`.
652
+
594
653
  A timeout or an interrupt asks the journal: with an unresolved submission in it
595
654
  the exit is 3, not 4 or 130, because an `Effect.timeout` wrapped around a
596
- submission interrupts it from the outside and the bytes may be on the wire.
655
+ submission interrupts it from the outside and the bytes may be on the wire. Each
656
+ unresolved entry is printed three ways: the digest and tag, the raw base64
657
+ bytes, and the whole entry encoded through the `JournalEntry` schema — the same
658
+ JSON a durable journal stores — so a wrapper can hand stderr to a recovery
659
+ process verbatim.
660
+
661
+ **Every `SubmitConfig` field is overridable, and one of them usually should be.**
662
+ `SubmitConfig` is a `Context.Reference` with the spec's defaults, including a
663
+ `maxGasBudget` of **50 SUI** — a ceiling, not a budget, but far above what a
664
+ sponsor policy typically allows. Narrow it once, where the runtime is built:
665
+
666
+ ```ts
667
+ Effect.provideService(program, SubmitConfig, {
668
+ ...SubmitConfig.defaults,
669
+ maxGasBudget: 1_000_000_000n, // 1 SUI
670
+ lockSender: false // see below
671
+ })
672
+ ```
673
+
674
+ `lockSender` is the other one worth a decision. The lock exists because two
675
+ concurrent builds from one address can pick the same gas coin; with
676
+ `tx.setGasPayment([])` there is no coin to pick — the node pays from the address
677
+ balance — and the lock buys nothing. That is the case for every transaction
678
+ built with `Tx.sponsored`, whose empty gas payment `Tx.build` preserves through
679
+ the resolver, and it is the only setting that makes sense across isolates
680
+ (Workers, Durable Objects), where a per-runtime semaphore is not a lock at all.
681
+
682
+ ## Relay and sponsor envelopes
683
+
684
+ `Executed` describes the SDK's own execute include set. A relay, a sponsor or
685
+ any service that submitted on your behalf returns whatever *it* asked the node
686
+ for, which is usually less: `changedObjects` with an `objectId` and an
687
+ `idOperation` and nothing else, no `objectTypes`, no `balanceChanges`, no
688
+ checkpoint, events as JSON with no BCS.
689
+
690
+ `Executed.fromPartial(envelope)` decodes exactly that, and what it was not told
691
+ stays "not told": input and output states are `Unknown` rather than a guessed
692
+ `ObjectWrite`, versions and digests are `null`, and the accessors read `Unknown`
693
+ as "the envelope did not say", so `created()` and `deleted()` still classify
694
+ from the id operation alone. JSON spellings are accepted where the SDK's types
695
+ are not JSON — `bcs` as base64 or a byte array, every `u64` as a number or a
696
+ `bigint` as well as the decimal string the wire uses. Two things it cannot
697
+ invent: the **types** (`created(type)` and `expectCreated(type)` match against
698
+ the `objectTypes` join, so without one they match nothing — use `created()` or
699
+ `createdWhere(predicate)`), and the **gas** (`gasUsedTotal` is `0n` for an
700
+ envelope that reported none, which means "not reported", not "free").
701
+
702
+ `Executed.fromTransactionResult(result)` is the strict constructor, for an SDK
703
+ `TransactionResult` read with the full include set.
704
+
705
+ The whole sequence, for a service that co-signs and submits: `Tx.build` with
706
+ `Tx.sponsored`, `Tx.sign`, hand `toBase64(signed.bytes)` and `signed.signatures[0]`
707
+ to the service, and then either `Executed.fromPartial(reply)` or — through
708
+ `Tx.submitVia`, which keeps the journal — `Tx.reconcile(signed)`. The digest
709
+ does not change when the sponsor adds its signature, so `signed.digest` is what
710
+ to record. `docs/extensions.md` has the section.
711
+
712
+ **`Executed.events` is `ReadonlyArray<Event>`, not `SuiClientTypes.Event[]`**:
713
+ the same fields with branded ids, and `json` present only when whatever produced
714
+ the `Executed` carried one (a relay envelope, never a gRPC execute). Decode an
715
+ event with `SuiSchema.decode(codec, event.bcs)`. Code typed against the SDK's
716
+ `Event[]` does not accept these.
717
+
718
+ **`bigint` throws in `JSON.stringify`.** Gas, balances, versions and
719
+ `checkpoint` are all `bigint`; anything that logs, persists or returns one over
720
+ HTTP needs `.toString()` or a replacer. Decimal strings are what the wire uses
721
+ and what every schema here decodes from.
722
+
723
+ ## Applications, Workers and Durable Objects
724
+
725
+ An application that consumes this library — an SPA, a Worker, a Durable Object —
726
+ wants one `ManagedRuntime` at module scope over
727
+ `Sui.layerNoDepsWith({ chainId })` and `SuiCore.layerFromClient(client)`, and
728
+ should know four things:
729
+
730
+ - **a `ManagedRuntime` memoizes its layer build, failure included.** One flaky
731
+ `getChainIdentifier` at boot and every later use of that runtime fails with the
732
+ same stale `TransportError`. Pass `SuiLayerOptions.retry` (a `Schedule` for
733
+ that one read), dispose and rebuild on a build failure, or use
734
+ `Sui.layerNoDepsPinned(chainId)`, which makes no call at all;
735
+ - **the default `Journal` is process-wide memory.** In a browser tab a refresh
736
+ is a new process and two tabs are two journals and two sender locks; what an
737
+ app actually holds is the `SubmissionUnknown` and its bytes, so persist that
738
+ and reconcile it on the next boot, or provide the durable journal;
739
+ - **the sender lock does not cross isolates**, so correctness there rests on
740
+ address-balance gas (`tx.setGasPayment([])`, `lockSender: false`) or on
741
+ serializing an address through one Durable Object;
742
+ - **there is no `process`** in a Worker: `Script` is a Node entrypoint, and
743
+ configuration comes from `ConfigProvider.fromEnvRecord(env)`.
744
+
745
+ `docs/extensions.md` sections 17 and 18 have the runtime module, the HMR
746
+ dispose, the vitest double and the `KeyValueStore.makeStringOnly` adapter over
747
+ Durable Object storage.
597
748
 
598
749
  ## Testing
599
750
 
@@ -605,6 +756,17 @@ else the extension's layer requires), and `SuiTest`
605
756
  for driving the fake's state and reading back what it was sent. No test in this
606
757
  repository touches the network, and neither should yours.
607
758
 
759
+ Four things a test on the fake has to know. `layerTest` is the production layer,
760
+ so a script naming `mainnet` or `testnet` must report that network's real chain
761
+ identifier — use `localnet` (the default) in fixtures. `Tx.submit` reconciles
762
+ through `getTransaction`, so a submit test that does not mean "this landed"
763
+ scripts `getTransaction: [FakeOutcome.notFound()]`. A **sponsored** submit needs
764
+ `Tx.cosign` first: the fake refuses an under-signed or wrongly-signed submission
765
+ with a gRPC `INVALID_ARGUMENT`, the way a validator does. And the build's
766
+ simulate is the resolver's — recorded, so `SuiTest.calls("simulateTransaction")`
767
+ sees it, and answered by `FakeScript.buildSimulate` if there is one and by the
768
+ ordered `simulate` script otherwise.
769
+
608
770
  ## Versions
609
771
 
610
772
  | Package | Range | Tested against |
@@ -1 +1 @@
1
- {"version":3,"file":"bcs.d.ts","sourceRoot":"","sources":["../../src/domain/bcs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAgD,MAAM,QAAQ,CAAA;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAY5C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,GAAG,GAAI,CAAC,SAAS,KAAK,EAAE,KAAK,EACxC,SAAS,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,EAC1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C,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B,KACA,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAiC9B,CAAA"}
@@ -228,12 +228,19 @@ export const decodeContent = (schema, content, context) => {
228
228
  return Effect.fail(new DecodeError({
229
229
  ...withObject,
230
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",
231
234
  issue: `${context?.objectId === undefined ? "the bytes have" : `object ${context.objectId} has`} type ${actual}`
232
235
  }));
233
236
  }
234
237
  return Schema.decodeUnknownEffect(schema)(content).pipe(Effect.mapError((error) => new DecodeError({
235
238
  ...withObject,
236
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",
237
244
  issue: error.message
238
245
  })));
239
246
  };
@@ -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,Y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CAAA;IAClC,IAAI,QAAQ,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC;QACrF,OAAO,MAAM,CAAC,IAAI,CAChB,IAAI,WAAW,CAAC;YACd,GAAG,UAAU;YACb,GAAG,YAAY;YACf,oEAAoE;YACpE,6DAA6D;YAC7D,IAAI,EAAE,MAAM;YACZ,KAAK,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"}
@@ -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
@@ -84,6 +86,17 @@ declare const ObjectNotFound_base: Schema.Class<ObjectNotFound, Schema.TaggedStr
84
86
  }>, import("effect/Cause").YieldableError>;
85
87
  /** The object does not exist, or has never existed. */
86
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;
87
100
  }
88
101
  declare const ObjectDeleted_base: Schema.Class<ObjectDeleted, Schema.TaggedStruct<"ObjectDeleted", {
89
102
  readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
@@ -93,6 +106,8 @@ declare const ObjectDeleted_base: Schema.Class<ObjectDeleted, Schema.TaggedStruc
93
106
  }>, import("effect/Cause").YieldableError>;
94
107
  /** The object existed and has been deleted or wrapped. */
95
108
  export declare class ObjectDeleted extends ObjectDeleted_base {
109
+ /** The one actionable line `SuiError.describe` produces for this error. */
110
+ get message(): string;
96
111
  }
97
112
  declare const ObjectUnavailable_base: Schema.Class<ObjectUnavailable, Schema.TaggedStruct<"ObjectUnavailable", {
98
113
  readonly objectId: Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
@@ -102,12 +117,16 @@ declare const ObjectUnavailable_base: Schema.Class<ObjectUnavailable, Schema.Tag
102
117
  }>, import("effect/Cause").YieldableError>;
103
118
  /** The node could not say what happened to the object (`ObjectError.reason: "unknown"`). */
104
119
  export declare class ObjectUnavailable extends ObjectUnavailable_base {
120
+ /** The one actionable line `SuiError.describe` produces for this error. */
121
+ get message(): string;
105
122
  }
106
123
  declare const TransactionNotFound_base: Schema.Class<TransactionNotFound, Schema.TaggedStruct<"TransactionNotFound", {
107
124
  readonly digest: Schema.brand<Schema.String, "Digest">;
108
125
  }>, import("effect/Cause").YieldableError>;
109
126
  /** No transaction with this digest is known to the node. */
110
127
  export declare class TransactionNotFound extends TransactionNotFound_base {
128
+ /** The one actionable line `SuiError.describe` produces for this error. */
129
+ get message(): string;
111
130
  }
112
131
  declare const NetworkMismatch_base: Schema.Class<NetworkMismatch, Schema.TaggedStruct<"NetworkMismatch", {
113
132
  readonly expected: Schema.String;
@@ -115,16 +134,57 @@ declare const NetworkMismatch_base: Schema.Class<NetworkMismatch, Schema.TaggedS
115
134
  }>, import("effect/Cause").YieldableError>;
116
135
  /** The chain identifier the node reported is not the one the layer was built for. */
117
136
  export declare class NetworkMismatch extends NetworkMismatch_base {
137
+ /** The one actionable line `SuiError.describe` produces for this error. */
138
+ get message(): string;
118
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;
119
163
  declare const DecodeError_base: Schema.Class<DecodeError, Schema.TaggedStruct<"DecodeError", {
120
164
  readonly objectId: Schema.optional<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "ObjectId"> & {
121
165
  normalize: (input: string) => string & import("effect/Brand").Brand<"ObjectId">;
122
166
  }>;
123
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>>;
124
174
  readonly issue: Schema.String;
125
175
  }>, import("effect/Cause").YieldableError>;
126
- /** BCS content or a schema boundary did not decode. */
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
+ */
127
185
  export declare class DecodeError extends DecodeError_base {
186
+ /** The one actionable line `SuiError.describe` produces for this error. */
187
+ get message(): string;
128
188
  }
129
189
  declare const SimulationFailed_base: Schema.Class<SimulationFailed, Schema.TaggedStruct<"SimulationFailed", {
130
190
  readonly reason: Schema.toTaggedUnion<"$kind", readonly [Schema.Struct<{
@@ -449,6 +509,8 @@ declare const ExecutionFailed_base: Schema.Class<ExecutionFailed, Schema.TaggedS
449
509
  }>, import("effect/Cause").YieldableError>;
450
510
  /** The transaction was applied on chain and failed. Gas was charged. */
451
511
  export declare class ExecutionFailed extends ExecutionFailed_base {
512
+ /** The one actionable line `SuiError.describe` produces for this error. */
513
+ get message(): string;
452
514
  }
453
515
  declare const SubmissionUnknown_base: Schema.Class<SubmissionUnknown, Schema.TaggedStruct<"SubmissionUnknown", {
454
516
  readonly digest: Schema.brand<Schema.String, "Digest">;
@@ -499,6 +561,8 @@ declare const SubmissionUnknown_base: Schema.Class<SubmissionUnknown, Schema.Tag
499
561
  * signed transaction so an operator or a later process can reconcile it.
500
562
  */
501
563
  export declare class SubmissionUnknown extends SubmissionUnknown_base {
564
+ /** The one actionable line `SuiError.describe` produces for this error. */
565
+ get message(): string;
502
566
  }
503
567
  declare const NotApplied_base: Schema.Class<NotApplied, Schema.TaggedStruct<"NotApplied", {
504
568
  readonly digest: Schema.brand<Schema.String, "Digest">;
@@ -514,12 +578,16 @@ declare const NotApplied_base: Schema.Class<NotApplied, Schema.TaggedStruct<"Not
514
578
  * node will not name are all `SubmissionUnknown`, not this.
515
579
  */
516
580
  export declare class NotApplied extends NotApplied_base {
581
+ /** The one actionable line `SuiError.describe` produces for this error. */
582
+ get message(): string;
517
583
  }
518
584
  declare const SigningError_base: Schema.Class<SigningError, Schema.TaggedStruct<"SigningError", {
519
585
  readonly cause: Schema.Defect;
520
586
  }>, import("effect/Cause").YieldableError>;
521
587
  /** A signer refused or failed to produce a signature. */
522
588
  export declare class SigningError extends SigningError_base {
589
+ /** The one actionable line `SuiError.describe` produces for this error. */
590
+ get message(): string;
523
591
  }
524
592
  declare const BuildError_base: Schema.Class<BuildError, Schema.TaggedStruct<"BuildError", {
525
593
  readonly message: Schema.String;
@@ -540,6 +608,8 @@ declare const JournalError_base: Schema.Class<JournalError, Schema.TaggedStruct<
540
608
  }>, import("effect/Cause").YieldableError>;
541
609
  /** The submission journal could not be read or written. */
542
610
  export declare class JournalError extends JournalError_base {
611
+ /** The one actionable line `SuiError.describe` produces for this error. */
612
+ get message(): string;
543
613
  }
544
614
  declare const UnexpectedEffects_base: Schema.Class<UnexpectedEffects, Schema.TaggedStruct<"UnexpectedEffects", {
545
615
  readonly digest: Schema.brand<Schema.String, "Digest">;
@@ -559,6 +629,8 @@ declare const UnexpectedEffects_base: Schema.Class<UnexpectedEffects, Schema.Tag
559
629
  * time for a transaction that already ran.
560
630
  */
561
631
  export declare class UnexpectedEffects extends UnexpectedEffects_base {
632
+ /** The one actionable line `SuiError.describe` produces for this error. */
633
+ get message(): string;
562
634
  }
563
635
  declare const GraphQLUnavailable_base: Schema.Class<GraphQLUnavailable, Schema.TaggedStruct<"GraphQLUnavailable", {
564
636
  readonly method: Schema.String;
@@ -578,6 +650,8 @@ declare const GraphQLUnavailable_base: Schema.Class<GraphQLUnavailable, Schema.T
578
650
  * Outcome `not_applied`: a read that did not happen changed nothing.
579
651
  */
580
652
  export declare class GraphQLUnavailable extends GraphQLUnavailable_base {
653
+ /** The one actionable line `SuiError.describe` produces for this error. */
654
+ get message(): string;
581
655
  }
582
656
  declare const ExtensionNotReady_base: Schema.Class<ExtensionNotReady, Schema.TaggedStruct<"ExtensionNotReady", {
583
657
  readonly extension: Schema.String;
@@ -598,6 +672,8 @@ declare const ExtensionNotReady_base: Schema.Class<ExtensionNotReady, Schema.Tag
598
672
  * Outcome `not_applied`: nothing was sent.
599
673
  */
600
674
  export declare class ExtensionNotReady extends ExtensionNotReady_base {
675
+ /** The one actionable line `SuiError.describe` produces for this error. */
676
+ get message(): string;
601
677
  }
602
678
  /** Every failure sui-effect can produce. */
603
679
  export type SuiError = TransportError | ObjectNotFound | ObjectDeleted | ObjectUnavailable | TransactionNotFound | NetworkMismatch | DecodeError | SimulationFailed | ExecutionFailed | SubmissionUnknown | NotApplied | SigningError | BuildError | PolicyDenied | JournalError | UnexpectedEffects | GraphQLUnavailable | ExtensionNotReady;
@@ -608,6 +684,20 @@ export declare const SuiErrorSchema: Schema.Union<readonly [typeof TransportErro
608
684
  * or a wrapper script acts on.
609
685
  */
610
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";
611
701
  /**
612
702
  * An extension error may declare its own `outcome`, and `SuiError.outcome` and
613
703
  * `Script.run` honour it before anything else.
@@ -621,13 +711,19 @@ export interface HasOutcome {
621
711
  readonly outcome: Outcome;
622
712
  }
623
713
  /**
624
- * The four helpers every repo hand-rolls: is this worth retrying, did the
625
- * transaction land, what does an operator need to read, and what goes in a log.
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.
626
717
  */
627
718
  export declare const SuiError: {
628
719
  readonly isRetryable: (error: SuiError) => boolean;
629
- readonly outcome: (error: SuiError | HasOutcome) => Outcome;
630
- readonly describe: (error: SuiError) => string;
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;
631
727
  readonly toJson: (error: SuiError | {
632
728
  readonly _tag: string;
633
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,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EACL,MAAM,EAOP,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;;;;;;;AAEzE;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,mBAKlC;IACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,MAAM,CAAC,QAAQ,CAAC,WAAW,GACzB,QAAQ,MAAM,EACd,OAAO,OAAO,EACd,YAAY,OAAO,KAClB,cAAc,CAQhB;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAMtD,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO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