@andco/protocol 0.0.14 → 0.0.15

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 (90) hide show
  1. package/README.md +2 -2
  2. package/dist/api-errors.d.ts +9 -9
  3. package/dist/api-errors.js +9 -9
  4. package/dist/authorization-preparation.js +2 -2
  5. package/dist/authorization.d.ts +1 -1
  6. package/dist/authorization.js +1 -1
  7. package/dist/consent.d.ts +2 -2
  8. package/dist/consent.js +2 -2
  9. package/dist/errors.d.ts +9 -9
  10. package/dist/errors.js +9 -9
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/intent-input.d.ts +431 -872
  15. package/dist/intent-input.d.ts.map +1 -1
  16. package/dist/intent-input.js +142 -121
  17. package/dist/miniapp-manifest.d.ts +1 -1
  18. package/dist/native-intent.d.ts +82 -68
  19. package/dist/native-intent.d.ts.map +1 -1
  20. package/dist/native-intent.js +134 -84
  21. package/dist/native.d.ts +1 -1
  22. package/dist/rar/account-matchers.d.ts +35 -30
  23. package/dist/rar/account-matchers.d.ts.map +1 -1
  24. package/dist/rar/account-matchers.js +27 -21
  25. package/dist/rar/bank.d.ts +81 -81
  26. package/dist/rar/bank.js +1 -1
  27. package/dist/rar/catalog.d.ts +48 -48
  28. package/dist/rar/catalog.js +6 -6
  29. package/dist/rar/detail.d.ts +1 -1
  30. package/dist/rar/detail.js +1 -1
  31. package/dist/rar/json-schemas.generated.d.ts +1 -1
  32. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  33. package/dist/rar/json-schemas.generated.js +25 -21
  34. package/dist/rar/subject-data.d.ts +1 -1
  35. package/dist/rar/subject-data.js +1 -1
  36. package/dist/rar/subject.d.ts +1 -1
  37. package/dist/rar/subject.js +1 -1
  38. package/dist/rest/accounts.d.ts +28 -28
  39. package/dist/rest/accounts.d.ts.map +1 -1
  40. package/dist/rest/accounts.js +22 -22
  41. package/dist/rest/api-error.d.ts +1 -1
  42. package/dist/rest/api-error.js +1 -1
  43. package/dist/rest/catalog.d.ts +3 -3
  44. package/dist/rest/catalog.js +2 -2
  45. package/dist/rest/common.d.ts +3 -3
  46. package/dist/rest/common.js +3 -3
  47. package/dist/rest/contract.d.ts +905 -528
  48. package/dist/rest/contract.d.ts.map +1 -1
  49. package/dist/rest/contract.js +17 -5
  50. package/dist/rest/events.d.ts +1 -1
  51. package/dist/rest/events.d.ts.map +1 -1
  52. package/dist/rest/events.js +2 -2
  53. package/dist/rest/identity.d.ts +22 -22
  54. package/dist/rest/identity.js +5 -5
  55. package/dist/rest/index.d.ts +1 -0
  56. package/dist/rest/index.d.ts.map +1 -1
  57. package/dist/rest/index.js +1 -0
  58. package/dist/rest/intents.d.ts +787 -716
  59. package/dist/rest/intents.d.ts.map +1 -1
  60. package/dist/rest/intents.js +62 -53
  61. package/dist/rest/signatures.d.ts +11 -5
  62. package/dist/rest/signatures.d.ts.map +1 -1
  63. package/dist/rest/signatures.js +10 -0
  64. package/dist/rest/transfers.d.ts +612 -0
  65. package/dist/rest/transfers.d.ts.map +1 -0
  66. package/dist/rest/transfers.js +115 -0
  67. package/dist/scopes.d.ts +1 -1
  68. package/dist/signing.d.ts +12 -2
  69. package/dist/signing.d.ts.map +1 -1
  70. package/dist/signing.js +6 -0
  71. package/dist/transfer.d.ts +363 -0
  72. package/dist/transfer.d.ts.map +1 -0
  73. package/dist/transfer.js +287 -0
  74. package/dist/transport/financial-events.d.ts +21 -17
  75. package/dist/transport/financial-events.d.ts.map +1 -1
  76. package/dist/transport/generated/oauth-api.d.ts +1017 -194
  77. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  78. package/dist/transport/intents.d.ts +28 -12
  79. package/dist/transport/intents.d.ts.map +1 -1
  80. package/dist/transport/intents.js +1 -1
  81. package/dist/transport/rest.d.ts +4 -4
  82. package/dist/urls.d.ts +2 -2
  83. package/dist/urls.js +3 -3
  84. package/dist/userinfo.d.ts +2 -2
  85. package/dist/userinfo.js +2 -2
  86. package/dist/webhooks.d.ts +16 -16
  87. package/dist/webhooks.js +14 -14
  88. package/dist/window-features.d.ts +2 -2
  89. package/dist/window-features.js +2 -2
  90. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import type * as v from "valibot";
2
2
  /**
3
- * The operations of the Andco OAuth Resource API, each under its `operationId`. `@andco/protocol`
3
+ * The operations of the AndCo OAuth Resource API, each under its `operationId`. `@andco/protocol`
4
4
  * declares them once (ADR 0038): Platform implements them with `implement(contract)` and the
5
5
  * OpenAPI document, `openapi/oauth-api.yaml`, is generated from them (`pnpm generate:openapi`).
6
6
  */
@@ -88,7 +88,7 @@ export declare const contract: {
88
88
  account_type: "checking" | "debit" | "savings";
89
89
  holder_id: string | null;
90
90
  holder_name: string;
91
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
91
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
92
92
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
93
93
  readonly currency: v.LiteralSchema<"CLP", undefined>;
94
94
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -112,8 +112,8 @@ export declare const contract: {
112
112
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
113
113
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
114
114
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
115
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
116
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
115
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
116
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
117
117
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
118
118
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
119
119
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -127,49 +127,49 @@ export declare const contract: {
127
127
  }, undefined>;
128
128
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
129
129
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
130
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
131
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
132
130
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
133
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
131
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
134
132
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
135
133
  }, undefined>, v.DescriptionAction<{
136
134
  value: string;
137
135
  editable: boolean;
138
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
136
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
137
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
138
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
139
139
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
140
140
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
141
141
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
142
142
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
143
143
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
144
144
  readonly type: v.LiteralSchema<"transfer", undefined>;
145
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
145
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
146
146
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
147
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
147
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
148
148
  type: v.LiteralSchema<"account_key", undefined>;
149
149
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
150
150
  }, undefined>, v.DescriptionAction<{
151
151
  type: "account_key";
152
152
  accountKey: string;
153
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
153
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
154
154
  type: v.LiteralSchema<"account", undefined>;
155
155
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
156
156
  }, undefined>, v.DescriptionAction<{
157
157
  type: "account";
158
158
  id: string;
159
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
159
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
160
160
  type: "account_key";
161
161
  accountKey: string;
162
162
  } | {
163
163
  type: "account";
164
164
  id: string;
165
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
165
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
166
166
  type: "account_key";
167
167
  accountKey: string;
168
168
  } | {
169
169
  type: "account";
170
170
  id: string;
171
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
172
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
171
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
172
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
173
173
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
174
174
  readonly type: v.LiteralSchema<"account_key", undefined>;
175
175
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -180,11 +180,13 @@ export declare const contract: {
180
180
  }, undefined>, v.StrictObjectSchema<{
181
181
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
182
182
  readonly type: v.LiteralSchema<"external", undefined>;
183
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
184
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
185
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
186
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
187
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
183
+ readonly country: v.LiteralSchema<"CL", undefined>;
184
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
185
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
186
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
187
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
188
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
189
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
188
190
  }, undefined>], undefined>, v.DescriptionAction<{
189
191
  editable: false;
190
192
  type: "account_key";
@@ -196,12 +198,14 @@ export declare const contract: {
196
198
  } | {
197
199
  editable: false;
198
200
  type: "external";
199
- bank_id: string;
200
- account_type: "checking" | "debit" | "savings";
201
- account_id: string;
202
- holder_id: string;
203
- holder_name: string;
204
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
201
+ country: "CL";
202
+ bank_code: string;
203
+ account_type: "10" | "20" | "40";
204
+ account_number: string;
205
+ name: string;
206
+ national_kind_id: "RUT";
207
+ national_id: string;
208
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
205
209
  editable: false;
206
210
  type: "account_key";
207
211
  accountKey: string;
@@ -212,64 +216,66 @@ export declare const contract: {
212
216
  } | {
213
217
  editable: false;
214
218
  type: "external";
215
- bank_id: string;
216
- account_type: "checking" | "debit" | "savings";
217
- account_id: string;
218
- holder_id: string;
219
- holder_name: string;
220
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
219
+ country: "CL";
220
+ bank_code: string;
221
+ account_type: "10" | "20" | "40";
222
+ account_number: string;
223
+ name: string;
224
+ national_kind_id: "RUT";
225
+ national_id: string;
226
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
227
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
228
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
229
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
230
+ }, undefined>, v.DescriptionAction<{
231
+ value: string;
232
+ editable: boolean;
233
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
221
234
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
222
235
  readonly currency: v.LiteralSchema<"CLP", undefined>;
223
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
236
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
224
237
  readonly editable: v.BooleanSchema<undefined>;
225
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
238
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
226
239
  }, undefined>, v.DescriptionAction<{
227
240
  currency: "CLP";
228
- value: string;
241
+ value: number;
229
242
  editable: boolean;
230
- confirmed: string | null;
231
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
243
+ confirmed: number | null;
244
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
232
245
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
233
246
  readonly currency: v.LiteralSchema<"CLP", undefined>;
234
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
247
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
235
248
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
236
249
  }, undefined>, v.DescriptionAction<{
237
250
  currency: "CLP";
238
- value: string;
251
+ value: number;
239
252
  at: string;
240
253
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
241
254
  readonly fee: v.StrictObjectSchema<{
242
255
  readonly currency: v.LiteralSchema<"CLP", undefined>;
243
256
  readonly amount: v.LiteralSchema<"0", undefined>;
244
257
  }, undefined>;
245
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
258
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
246
259
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
247
260
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
248
261
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
249
262
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
250
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
251
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
252
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
253
- }, undefined>, v.DescriptionAction<{
254
- value: string;
255
- editable: boolean;
256
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
257
263
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
258
264
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
259
265
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
260
266
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
261
267
  }, undefined>, v.DescriptionAction<{
262
268
  type: "transfer";
263
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
269
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
264
270
  signed: boolean;
265
- source: {
271
+ sender: {
266
272
  type: "account_key";
267
273
  accountKey: string;
268
274
  } | {
269
275
  type: "account";
270
276
  id: string;
271
277
  } | null;
272
- destination: {
278
+ receiver: {
273
279
  editable: false;
274
280
  type: "account_key";
275
281
  accountKey: string;
@@ -280,21 +286,27 @@ export declare const contract: {
280
286
  } | {
281
287
  editable: false;
282
288
  type: "external";
283
- bank_id: string;
284
- account_type: "checking" | "debit" | "savings";
285
- account_id: string;
286
- holder_id: string;
287
- holder_name: string;
289
+ country: "CL";
290
+ bank_code: string;
291
+ account_type: "10" | "20" | "40";
292
+ account_number: string;
293
+ name: string;
294
+ national_kind_id: "RUT";
295
+ national_id: string;
288
296
  } | null;
297
+ comment?: {
298
+ value: string;
299
+ editable: boolean;
300
+ } | undefined;
289
301
  amount: {
290
302
  currency: "CLP";
291
- value: string;
303
+ value: number;
292
304
  editable: boolean;
293
- confirmed: string | null;
305
+ confirmed: number | null;
294
306
  };
295
307
  settled: {
296
308
  currency: "CLP";
297
- value: string;
309
+ value: number;
298
310
  at: string;
299
311
  } | null;
300
312
  fee: {
@@ -306,19 +318,15 @@ export declare const contract: {
306
318
  expires_in_seconds: number | null;
307
319
  id: string;
308
320
  resource_server: string;
309
- note?: {
310
- value: string;
311
- editable: boolean;
312
- } | undefined;
313
321
  metadata: {
314
322
  [x: string]: unknown;
315
323
  };
316
324
  server_time: string;
317
325
  created_at: string;
318
326
  authorization_url: string;
319
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
327
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
320
328
  readonly type: v.LiteralSchema<"account_opening", undefined>;
321
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
329
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
322
330
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
323
331
  readonly account: v.StrictObjectSchema<{
324
332
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -328,22 +336,22 @@ export declare const contract: {
328
336
  }, undefined>;
329
337
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
330
338
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
331
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
332
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
333
339
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
334
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
340
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
335
341
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
336
342
  }, undefined>, v.DescriptionAction<{
337
343
  value: string;
338
344
  editable: boolean;
339
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
345
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
346
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
347
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
340
348
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
341
349
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
342
350
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
343
351
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
344
352
  }, undefined>, v.DescriptionAction<{
345
353
  type: "account_opening";
346
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
354
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
347
355
  signed: boolean;
348
356
  account: {
349
357
  accountKey: string;
@@ -353,12 +361,12 @@ export declare const contract: {
353
361
  };
354
362
  expires_at: string | null;
355
363
  expires_in_seconds: number | null;
356
- id: string;
357
- resource_server: string;
358
364
  note?: {
359
365
  value: string;
360
366
  editable: boolean;
361
367
  } | undefined;
368
+ id: string;
369
+ resource_server: string;
362
370
  metadata: {
363
371
  [x: string]: unknown;
364
372
  };
@@ -367,7 +375,7 @@ export declare const contract: {
367
375
  authorization_url: string;
368
376
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
369
377
  readonly type: v.LiteralSchema<"account_closure", undefined>;
370
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
378
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
371
379
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
372
380
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
373
381
  type: v.LiteralSchema<"account_key", undefined>;
@@ -375,38 +383,38 @@ export declare const contract: {
375
383
  }, undefined>, v.DescriptionAction<{
376
384
  type: "account_key";
377
385
  accountKey: string;
378
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
386
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
379
387
  type: v.LiteralSchema<"account", undefined>;
380
388
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
381
389
  }, undefined>, v.DescriptionAction<{
382
390
  type: "account";
383
391
  id: string;
384
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
392
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
385
393
  type: "account_key";
386
394
  accountKey: string;
387
395
  } | {
388
396
  type: "account";
389
397
  id: string;
390
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
398
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
391
399
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
392
400
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
393
401
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
394
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
395
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
396
402
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
397
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
403
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
398
404
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
399
405
  }, undefined>, v.DescriptionAction<{
400
406
  value: string;
401
407
  editable: boolean;
402
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
408
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
409
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
410
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
403
411
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
404
412
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
405
413
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
406
414
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
407
415
  }, undefined>, v.DescriptionAction<{
408
416
  type: "account_closure";
409
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
417
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
410
418
  signed: boolean;
411
419
  account: {
412
420
  type: "account_key";
@@ -418,12 +426,12 @@ export declare const contract: {
418
426
  resolved_account_id: string | null;
419
427
  expires_at: string;
420
428
  expires_in_seconds: number;
421
- id: string;
422
- resource_server: string;
423
429
  note?: {
424
430
  value: string;
425
431
  editable: boolean;
426
432
  } | undefined;
433
+ id: string;
434
+ resource_server: string;
427
435
  metadata: {
428
436
  [x: string]: unknown;
429
437
  };
@@ -473,7 +481,7 @@ export declare const contract: {
473
481
  account_type: "checking" | "debit" | "savings";
474
482
  holder_id: string | null;
475
483
  holder_name: string;
476
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
484
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
477
485
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
478
486
  readonly currency: v.LiteralSchema<"CLP", undefined>;
479
487
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -497,8 +505,8 @@ export declare const contract: {
497
505
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
498
506
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
499
507
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
500
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
501
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
508
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
509
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
502
510
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
503
511
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
504
512
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -512,49 +520,49 @@ export declare const contract: {
512
520
  }, undefined>;
513
521
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
514
522
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
515
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
516
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
517
523
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
518
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
524
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
519
525
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
520
526
  }, undefined>, v.DescriptionAction<{
521
527
  value: string;
522
528
  editable: boolean;
523
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
529
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
530
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
531
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
524
532
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
525
533
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
526
534
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
527
535
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
528
536
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
529
537
  readonly type: v.LiteralSchema<"transfer", undefined>;
530
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
538
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
531
539
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
532
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
540
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
533
541
  type: v.LiteralSchema<"account_key", undefined>;
534
542
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
535
543
  }, undefined>, v.DescriptionAction<{
536
544
  type: "account_key";
537
545
  accountKey: string;
538
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
546
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
539
547
  type: v.LiteralSchema<"account", undefined>;
540
548
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
541
549
  }, undefined>, v.DescriptionAction<{
542
550
  type: "account";
543
551
  id: string;
544
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
552
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
545
553
  type: "account_key";
546
554
  accountKey: string;
547
555
  } | {
548
556
  type: "account";
549
557
  id: string;
550
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
558
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
551
559
  type: "account_key";
552
560
  accountKey: string;
553
561
  } | {
554
562
  type: "account";
555
563
  id: string;
556
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
557
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
564
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
565
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
558
566
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
559
567
  readonly type: v.LiteralSchema<"account_key", undefined>;
560
568
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -565,11 +573,13 @@ export declare const contract: {
565
573
  }, undefined>, v.StrictObjectSchema<{
566
574
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
567
575
  readonly type: v.LiteralSchema<"external", undefined>;
568
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
569
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
570
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
571
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
572
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
576
+ readonly country: v.LiteralSchema<"CL", undefined>;
577
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
578
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
579
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
580
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
581
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
582
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
573
583
  }, undefined>], undefined>, v.DescriptionAction<{
574
584
  editable: false;
575
585
  type: "account_key";
@@ -581,12 +591,14 @@ export declare const contract: {
581
591
  } | {
582
592
  editable: false;
583
593
  type: "external";
584
- bank_id: string;
585
- account_type: "checking" | "debit" | "savings";
586
- account_id: string;
587
- holder_id: string;
588
- holder_name: string;
589
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
594
+ country: "CL";
595
+ bank_code: string;
596
+ account_type: "10" | "20" | "40";
597
+ account_number: string;
598
+ name: string;
599
+ national_kind_id: "RUT";
600
+ national_id: string;
601
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
590
602
  editable: false;
591
603
  type: "account_key";
592
604
  accountKey: string;
@@ -597,64 +609,66 @@ export declare const contract: {
597
609
  } | {
598
610
  editable: false;
599
611
  type: "external";
600
- bank_id: string;
601
- account_type: "checking" | "debit" | "savings";
602
- account_id: string;
603
- holder_id: string;
604
- holder_name: string;
605
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
612
+ country: "CL";
613
+ bank_code: string;
614
+ account_type: "10" | "20" | "40";
615
+ account_number: string;
616
+ name: string;
617
+ national_kind_id: "RUT";
618
+ national_id: string;
619
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
620
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
621
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
622
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
623
+ }, undefined>, v.DescriptionAction<{
624
+ value: string;
625
+ editable: boolean;
626
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
606
627
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
607
628
  readonly currency: v.LiteralSchema<"CLP", undefined>;
608
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
629
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
609
630
  readonly editable: v.BooleanSchema<undefined>;
610
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
631
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
611
632
  }, undefined>, v.DescriptionAction<{
612
633
  currency: "CLP";
613
- value: string;
634
+ value: number;
614
635
  editable: boolean;
615
- confirmed: string | null;
616
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
636
+ confirmed: number | null;
637
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
617
638
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
618
639
  readonly currency: v.LiteralSchema<"CLP", undefined>;
619
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
640
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
620
641
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
621
642
  }, undefined>, v.DescriptionAction<{
622
643
  currency: "CLP";
623
- value: string;
644
+ value: number;
624
645
  at: string;
625
646
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
626
647
  readonly fee: v.StrictObjectSchema<{
627
648
  readonly currency: v.LiteralSchema<"CLP", undefined>;
628
649
  readonly amount: v.LiteralSchema<"0", undefined>;
629
650
  }, undefined>;
630
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
651
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
631
652
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
632
653
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
633
654
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
634
655
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
635
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
636
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
637
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
638
- }, undefined>, v.DescriptionAction<{
639
- value: string;
640
- editable: boolean;
641
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
642
656
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
643
657
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
644
658
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
645
659
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
646
660
  }, undefined>, v.DescriptionAction<{
647
661
  type: "transfer";
648
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
662
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
649
663
  signed: boolean;
650
- source: {
664
+ sender: {
651
665
  type: "account_key";
652
666
  accountKey: string;
653
667
  } | {
654
668
  type: "account";
655
669
  id: string;
656
670
  } | null;
657
- destination: {
671
+ receiver: {
658
672
  editable: false;
659
673
  type: "account_key";
660
674
  accountKey: string;
@@ -665,21 +679,27 @@ export declare const contract: {
665
679
  } | {
666
680
  editable: false;
667
681
  type: "external";
668
- bank_id: string;
669
- account_type: "checking" | "debit" | "savings";
670
- account_id: string;
671
- holder_id: string;
672
- holder_name: string;
682
+ country: "CL";
683
+ bank_code: string;
684
+ account_type: "10" | "20" | "40";
685
+ account_number: string;
686
+ name: string;
687
+ national_kind_id: "RUT";
688
+ national_id: string;
673
689
  } | null;
690
+ comment?: {
691
+ value: string;
692
+ editable: boolean;
693
+ } | undefined;
674
694
  amount: {
675
695
  currency: "CLP";
676
- value: string;
696
+ value: number;
677
697
  editable: boolean;
678
- confirmed: string | null;
698
+ confirmed: number | null;
679
699
  };
680
700
  settled: {
681
701
  currency: "CLP";
682
- value: string;
702
+ value: number;
683
703
  at: string;
684
704
  } | null;
685
705
  fee: {
@@ -691,19 +711,15 @@ export declare const contract: {
691
711
  expires_in_seconds: number | null;
692
712
  id: string;
693
713
  resource_server: string;
694
- note?: {
695
- value: string;
696
- editable: boolean;
697
- } | undefined;
698
714
  metadata: {
699
715
  [x: string]: unknown;
700
716
  };
701
717
  server_time: string;
702
718
  created_at: string;
703
719
  authorization_url: string;
704
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
720
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
705
721
  readonly type: v.LiteralSchema<"account_opening", undefined>;
706
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
722
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
707
723
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
708
724
  readonly account: v.StrictObjectSchema<{
709
725
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -713,22 +729,22 @@ export declare const contract: {
713
729
  }, undefined>;
714
730
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
715
731
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
716
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
717
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
718
732
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
719
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
733
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
720
734
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
721
735
  }, undefined>, v.DescriptionAction<{
722
736
  value: string;
723
737
  editable: boolean;
724
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
738
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
739
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
740
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
725
741
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
726
742
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
727
743
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
728
744
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
729
745
  }, undefined>, v.DescriptionAction<{
730
746
  type: "account_opening";
731
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
747
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
732
748
  signed: boolean;
733
749
  account: {
734
750
  accountKey: string;
@@ -738,12 +754,12 @@ export declare const contract: {
738
754
  };
739
755
  expires_at: string | null;
740
756
  expires_in_seconds: number | null;
741
- id: string;
742
- resource_server: string;
743
757
  note?: {
744
758
  value: string;
745
759
  editable: boolean;
746
760
  } | undefined;
761
+ id: string;
762
+ resource_server: string;
747
763
  metadata: {
748
764
  [x: string]: unknown;
749
765
  };
@@ -752,7 +768,7 @@ export declare const contract: {
752
768
  authorization_url: string;
753
769
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
754
770
  readonly type: v.LiteralSchema<"account_closure", undefined>;
755
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
771
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
756
772
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
757
773
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
758
774
  type: v.LiteralSchema<"account_key", undefined>;
@@ -760,38 +776,38 @@ export declare const contract: {
760
776
  }, undefined>, v.DescriptionAction<{
761
777
  type: "account_key";
762
778
  accountKey: string;
763
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
779
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
764
780
  type: v.LiteralSchema<"account", undefined>;
765
781
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
766
782
  }, undefined>, v.DescriptionAction<{
767
783
  type: "account";
768
784
  id: string;
769
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
785
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
770
786
  type: "account_key";
771
787
  accountKey: string;
772
788
  } | {
773
789
  type: "account";
774
790
  id: string;
775
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
791
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
776
792
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
777
793
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
778
794
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
779
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
780
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
781
795
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
782
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
796
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
783
797
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
784
798
  }, undefined>, v.DescriptionAction<{
785
799
  value: string;
786
800
  editable: boolean;
787
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
801
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
802
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
803
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
788
804
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
789
805
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
790
806
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
791
807
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
792
808
  }, undefined>, v.DescriptionAction<{
793
809
  type: "account_closure";
794
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
810
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
795
811
  signed: boolean;
796
812
  account: {
797
813
  type: "account_key";
@@ -803,12 +819,12 @@ export declare const contract: {
803
819
  resolved_account_id: string | null;
804
820
  expires_at: string;
805
821
  expires_in_seconds: number;
806
- id: string;
807
- resource_server: string;
808
822
  note?: {
809
823
  value: string;
810
824
  editable: boolean;
811
825
  } | undefined;
826
+ id: string;
827
+ resource_server: string;
812
828
  metadata: {
813
829
  [x: string]: unknown;
814
830
  };
@@ -839,19 +855,19 @@ export declare const contract: {
839
855
  }, undefined>, v.DescriptionAction<{
840
856
  type: "account_key";
841
857
  accountKey: string;
842
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
858
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
843
859
  type: v.LiteralSchema<"account", undefined>;
844
860
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
845
861
  }, undefined>, v.DescriptionAction<{
846
862
  type: "account";
847
863
  id: string;
848
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
864
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
849
865
  type: "account_key";
850
866
  accountKey: string;
851
867
  } | {
852
868
  type: "account";
853
869
  id: string;
854
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
870
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
855
871
  type: "account_key";
856
872
  accountKey: string;
857
873
  } | {
@@ -868,12 +884,12 @@ export declare const contract: {
868
884
  editable: boolean;
869
885
  }, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
870
886
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
871
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
887
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
872
888
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
873
889
  }, undefined>, v.DescriptionAction<{
874
890
  value: string;
875
891
  editable: boolean;
876
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
892
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
877
893
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
878
894
  } & {
879
895
  readonly expires_in: v.StringSchema<undefined>;
@@ -886,19 +902,19 @@ export declare const contract: {
886
902
  }, undefined>, v.DescriptionAction<{
887
903
  type: "account_key";
888
904
  accountKey: string;
889
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
905
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
890
906
  type: v.LiteralSchema<"account", undefined>;
891
907
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
892
908
  }, undefined>, v.DescriptionAction<{
893
909
  type: "account";
894
910
  id: string;
895
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
911
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
896
912
  type: "account_key";
897
913
  accountKey: string;
898
914
  } | {
899
915
  type: "account";
900
916
  id: string;
901
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
917
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
902
918
  type: "account_key";
903
919
  accountKey: string;
904
920
  } | {
@@ -915,12 +931,12 @@ export declare const contract: {
915
931
  editable: boolean;
916
932
  }, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
917
933
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
918
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
934
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
919
935
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
920
936
  }, undefined>, v.DescriptionAction<{
921
937
  value: string;
922
938
  editable: boolean;
923
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
939
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
924
940
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
925
941
  } & {
926
942
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -972,42 +988,43 @@ export declare const contract: {
972
988
  expires_in?: undefined;
973
989
  expires_at: string | null;
974
990
  }, "The `application/json` half of collecting money into an account of the Grant's subject: an Intent born waiting for a payer. Exactly one of `expires_in` and `expires_at`; `expires_at: null` (never expires) only when `amount` is omitted.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
991
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
975
992
  readonly type: v.LiteralSchema<"transfer", undefined>;
976
993
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
977
994
  readonly currency: v.LiteralSchema<"CLP", undefined>;
978
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
995
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
979
996
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
980
997
  }, undefined>, v.DescriptionAction<{
981
998
  currency: "CLP";
982
- value: string;
999
+ value: number;
983
1000
  editable: boolean;
984
- }, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on Andco's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
985
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1001
+ }, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647 (int4, as Core stores it). `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
1002
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
986
1003
  type: v.LiteralSchema<"account_key", undefined>;
987
1004
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
988
1005
  }, undefined>, v.DescriptionAction<{
989
1006
  type: "account_key";
990
1007
  accountKey: string;
991
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1008
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
992
1009
  type: v.LiteralSchema<"account", undefined>;
993
1010
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
994
1011
  }, undefined>, v.DescriptionAction<{
995
1012
  type: "account";
996
1013
  id: string;
997
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1014
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
998
1015
  type: "account_key";
999
1016
  accountKey: string;
1000
1017
  } | {
1001
1018
  type: "account";
1002
1019
  id: string;
1003
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
1020
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
1004
1021
  type: "account_key";
1005
1022
  accountKey: string;
1006
1023
  } | {
1007
1024
  type: "account";
1008
1025
  id: string;
1009
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
1010
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1026
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
1027
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1011
1028
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1012
1029
  readonly type: v.LiteralSchema<"account_key", undefined>;
1013
1030
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1018,11 +1035,13 @@ export declare const contract: {
1018
1035
  }, undefined>, v.StrictObjectSchema<{
1019
1036
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1020
1037
  readonly type: v.LiteralSchema<"external", undefined>;
1021
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1022
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1023
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1024
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1025
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1038
+ readonly country: v.LiteralSchema<"CL", undefined>;
1039
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
1040
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
1041
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1042
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1043
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1044
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1026
1045
  }, undefined>], undefined>, v.DescriptionAction<{
1027
1046
  editable: false;
1028
1047
  type: "account_key";
@@ -1034,12 +1053,14 @@ export declare const contract: {
1034
1053
  } | {
1035
1054
  editable: false;
1036
1055
  type: "external";
1037
- bank_id: string;
1038
- account_type: "checking" | "debit" | "savings";
1039
- account_id: string;
1040
- holder_id: string;
1041
- holder_name: string;
1042
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
1056
+ country: "CL";
1057
+ bank_code: string;
1058
+ account_type: "10" | "20" | "40";
1059
+ account_number: string;
1060
+ name: string;
1061
+ national_kind_id: "RUT";
1062
+ national_id: string;
1063
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
1043
1064
  editable: false;
1044
1065
  type: "account_key";
1045
1066
  accountKey: string;
@@ -1050,60 +1071,62 @@ export declare const contract: {
1050
1071
  } | {
1051
1072
  editable: false;
1052
1073
  type: "external";
1053
- bank_id: string;
1054
- account_type: "checking" | "debit" | "savings";
1055
- account_id: string;
1056
- holder_id: string;
1057
- holder_name: string;
1058
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1059
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1060
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1074
+ country: "CL";
1075
+ bank_code: string;
1076
+ account_type: "10" | "20" | "40";
1077
+ account_number: string;
1078
+ name: string;
1079
+ national_kind_id: "RUT";
1080
+ national_id: string;
1081
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1082
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1083
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1061
1084
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1062
1085
  }, undefined>, v.DescriptionAction<{
1063
1086
  value: string;
1064
1087
  editable: boolean;
1065
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1066
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1088
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1067
1089
  } & {
1068
1090
  readonly expires_in: v.StringSchema<undefined>;
1069
1091
  readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1070
1092
  }, undefined>, v.StrictObjectSchema<{
1093
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1071
1094
  readonly type: v.LiteralSchema<"transfer", undefined>;
1072
1095
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1073
1096
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1074
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1097
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1075
1098
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1076
1099
  }, undefined>, v.DescriptionAction<{
1077
1100
  currency: "CLP";
1078
- value: string;
1101
+ value: number;
1079
1102
  editable: boolean;
1080
- }, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on Andco's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
1081
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1103
+ }, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647 (int4, as Core stores it). `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
1104
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1082
1105
  type: v.LiteralSchema<"account_key", undefined>;
1083
1106
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1084
1107
  }, undefined>, v.DescriptionAction<{
1085
1108
  type: "account_key";
1086
1109
  accountKey: string;
1087
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1110
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1088
1111
  type: v.LiteralSchema<"account", undefined>;
1089
1112
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1090
1113
  }, undefined>, v.DescriptionAction<{
1091
1114
  type: "account";
1092
1115
  id: string;
1093
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1116
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1094
1117
  type: "account_key";
1095
1118
  accountKey: string;
1096
1119
  } | {
1097
1120
  type: "account";
1098
1121
  id: string;
1099
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
1122
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
1100
1123
  type: "account_key";
1101
1124
  accountKey: string;
1102
1125
  } | {
1103
1126
  type: "account";
1104
1127
  id: string;
1105
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
1106
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1128
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
1129
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1107
1130
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1108
1131
  readonly type: v.LiteralSchema<"account_key", undefined>;
1109
1132
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1114,11 +1137,13 @@ export declare const contract: {
1114
1137
  }, undefined>, v.StrictObjectSchema<{
1115
1138
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1116
1139
  readonly type: v.LiteralSchema<"external", undefined>;
1117
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1118
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1119
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1120
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1121
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1140
+ readonly country: v.LiteralSchema<"CL", undefined>;
1141
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
1142
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
1143
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1144
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1145
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1146
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1122
1147
  }, undefined>], undefined>, v.DescriptionAction<{
1123
1148
  editable: false;
1124
1149
  type: "account_key";
@@ -1130,12 +1155,14 @@ export declare const contract: {
1130
1155
  } | {
1131
1156
  editable: false;
1132
1157
  type: "external";
1133
- bank_id: string;
1134
- account_type: "checking" | "debit" | "savings";
1135
- account_id: string;
1136
- holder_id: string;
1137
- holder_name: string;
1138
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
1158
+ country: "CL";
1159
+ bank_code: string;
1160
+ account_type: "10" | "20" | "40";
1161
+ account_number: string;
1162
+ name: string;
1163
+ national_kind_id: "RUT";
1164
+ national_id: string;
1165
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
1139
1166
  editable: false;
1140
1167
  type: "account_key";
1141
1168
  accountKey: string;
@@ -1146,38 +1173,42 @@ export declare const contract: {
1146
1173
  } | {
1147
1174
  editable: false;
1148
1175
  type: "external";
1149
- bank_id: string;
1150
- account_type: "checking" | "debit" | "savings";
1151
- account_id: string;
1152
- holder_id: string;
1153
- holder_name: string;
1154
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1155
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1156
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1176
+ country: "CL";
1177
+ bank_code: string;
1178
+ account_type: "10" | "20" | "40";
1179
+ account_number: string;
1180
+ name: string;
1181
+ national_kind_id: "RUT";
1182
+ national_id: string;
1183
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1184
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1185
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1157
1186
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1158
1187
  }, undefined>, v.DescriptionAction<{
1159
1188
  value: string;
1160
1189
  editable: boolean;
1161
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1162
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1190
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1163
1191
  } & {
1164
1192
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1165
1193
  readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1166
1194
  }, undefined>], undefined>, v.DescriptionAction<{
1195
+ metadata: {
1196
+ [x: string]: unknown;
1197
+ };
1167
1198
  type: "transfer";
1168
1199
  amount: {
1169
1200
  currency: "CLP";
1170
- value: string;
1201
+ value: number;
1171
1202
  editable: boolean;
1172
1203
  };
1173
- source: {
1204
+ sender: {
1174
1205
  type: "account_key";
1175
1206
  accountKey: string;
1176
1207
  } | {
1177
1208
  type: "account";
1178
1209
  id: string;
1179
1210
  } | null;
1180
- destination: {
1211
+ receiver: {
1181
1212
  editable: false;
1182
1213
  type: "account_key";
1183
1214
  accountKey: string;
@@ -1188,36 +1219,38 @@ export declare const contract: {
1188
1219
  } | {
1189
1220
  editable: false;
1190
1221
  type: "external";
1191
- bank_id: string;
1192
- account_type: "checking" | "debit" | "savings";
1193
- account_id: string;
1194
- holder_id: string;
1195
- holder_name: string;
1222
+ country: "CL";
1223
+ bank_code: string;
1224
+ account_type: "10" | "20" | "40";
1225
+ account_number: string;
1226
+ name: string;
1227
+ national_kind_id: "RUT";
1228
+ national_id: string;
1196
1229
  } | null;
1197
- note?: {
1230
+ comment?: {
1198
1231
  value: string;
1199
1232
  editable: boolean;
1200
1233
  } | undefined;
1201
- metadata: {
1202
- [x: string]: unknown;
1203
- };
1204
1234
  expires_in: string;
1205
1235
  expires_at?: undefined;
1206
1236
  } | {
1237
+ metadata: {
1238
+ [x: string]: unknown;
1239
+ };
1207
1240
  type: "transfer";
1208
1241
  amount: {
1209
1242
  currency: "CLP";
1210
- value: string;
1243
+ value: number;
1211
1244
  editable: boolean;
1212
1245
  };
1213
- source: {
1246
+ sender: {
1214
1247
  type: "account_key";
1215
1248
  accountKey: string;
1216
1249
  } | {
1217
1250
  type: "account";
1218
1251
  id: string;
1219
1252
  } | null;
1220
- destination: {
1253
+ receiver: {
1221
1254
  editable: false;
1222
1255
  type: "account_key";
1223
1256
  accountKey: string;
@@ -1228,33 +1261,32 @@ export declare const contract: {
1228
1261
  } | {
1229
1262
  editable: false;
1230
1263
  type: "external";
1231
- bank_id: string;
1232
- account_type: "checking" | "debit" | "savings";
1233
- account_id: string;
1234
- holder_id: string;
1235
- holder_name: string;
1264
+ country: "CL";
1265
+ bank_code: string;
1266
+ account_type: "10" | "20" | "40";
1267
+ account_number: string;
1268
+ name: string;
1269
+ national_kind_id: "RUT";
1270
+ national_id: string;
1236
1271
  } | null;
1237
- note?: {
1272
+ comment?: {
1238
1273
  value: string;
1239
1274
  editable: boolean;
1240
1275
  } | undefined;
1241
- metadata: {
1242
- [x: string]: unknown;
1243
- };
1244
1276
  expires_in?: undefined;
1245
1277
  expires_at: string | null;
1246
- }, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval. A null `source` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `destination` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A destination the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. The `application/jwt` half is `SignedTransferIntentClaims`, and the two are separate schemas rather than one with optional fields on purpose: when signed and unsigned members share an object, something eventually reads the wrong ones.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1278
+ }, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in Core's vocabulary (ADR 0093): `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in Core's vocabulary (`IntentAccountExternal`). A signed transfer is not an Intent: it is uploaded to `POST /transfers` as a `SignedTransferEnvelope`.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1247
1279
  readonly type: v.LiteralSchema<"account_opening", undefined>;
1248
1280
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1249
1281
  readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
1250
1282
  readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
1251
1283
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1252
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1284
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1253
1285
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1254
1286
  }, undefined>, v.DescriptionAction<{
1255
1287
  value: string;
1256
1288
  editable: boolean;
1257
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1289
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1258
1290
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1259
1291
  } & {
1260
1292
  readonly expires_in: v.StringSchema<undefined>;
@@ -1265,12 +1297,12 @@ export declare const contract: {
1265
1297
  readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
1266
1298
  readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
1267
1299
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1268
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1300
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1269
1301
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1270
1302
  }, undefined>, v.DescriptionAction<{
1271
1303
  value: string;
1272
1304
  editable: boolean;
1273
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1305
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1274
1306
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1275
1307
  } & {
1276
1308
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -1303,7 +1335,7 @@ export declare const contract: {
1303
1335
  };
1304
1336
  expires_in?: undefined;
1305
1337
  expires_at: string | null;
1306
- }, "The `application/json` half of opening a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything with banking consequence happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1338
+ }, "The `application/json` half of opening a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything that changes an account happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1307
1339
  readonly type: v.LiteralSchema<"account_closure", undefined>;
1308
1340
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1309
1341
  type: v.LiteralSchema<"account_key", undefined>;
@@ -1311,26 +1343,26 @@ export declare const contract: {
1311
1343
  }, undefined>, v.DescriptionAction<{
1312
1344
  type: "account_key";
1313
1345
  accountKey: string;
1314
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1346
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1315
1347
  type: v.LiteralSchema<"account", undefined>;
1316
1348
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1317
1349
  }, undefined>, v.DescriptionAction<{
1318
1350
  type: "account";
1319
1351
  id: string;
1320
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1352
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1321
1353
  type: "account_key";
1322
1354
  accountKey: string;
1323
1355
  } | {
1324
1356
  type: "account";
1325
1357
  id: string;
1326
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1358
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1327
1359
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1328
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1360
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1329
1361
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1330
1362
  }, undefined>, v.DescriptionAction<{
1331
1363
  value: string;
1332
1364
  editable: boolean;
1333
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1365
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1334
1366
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1335
1367
  } & {
1336
1368
  readonly expires_in: v.StringSchema<undefined>;
@@ -1343,26 +1375,26 @@ export declare const contract: {
1343
1375
  }, undefined>, v.DescriptionAction<{
1344
1376
  type: "account_key";
1345
1377
  accountKey: string;
1346
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1378
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1347
1379
  type: v.LiteralSchema<"account", undefined>;
1348
1380
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1349
1381
  }, undefined>, v.DescriptionAction<{
1350
1382
  type: "account";
1351
1383
  id: string;
1352
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1384
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1353
1385
  type: "account_key";
1354
1386
  accountKey: string;
1355
1387
  } | {
1356
1388
  type: "account";
1357
1389
  id: string;
1358
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1390
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1359
1391
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1360
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1392
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1361
1393
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1362
1394
  }, undefined>, v.DescriptionAction<{
1363
1395
  value: string;
1364
1396
  editable: boolean;
1365
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1397
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1366
1398
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1367
1399
  } & {
1368
1400
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -1403,7 +1435,7 @@ export declare const contract: {
1403
1435
  };
1404
1436
  expires_in?: undefined;
1405
1437
  expires_at: string;
1406
- }, "The `application/json` half of closing a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything with banking consequence happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>], undefined>;
1438
+ }, "The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>], undefined>;
1407
1439
  }, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
1408
1440
  readonly type: v.LiteralSchema<"deposit", undefined>;
1409
1441
  readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
@@ -1439,7 +1471,7 @@ export declare const contract: {
1439
1471
  account_type: "checking" | "debit" | "savings";
1440
1472
  holder_id: string | null;
1441
1473
  holder_name: string;
1442
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1474
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1443
1475
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1444
1476
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1445
1477
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -1463,8 +1495,8 @@ export declare const contract: {
1463
1495
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1464
1496
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
1465
1497
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
1466
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
1467
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
1498
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
1499
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
1468
1500
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
1469
1501
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
1470
1502
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1478,49 +1510,49 @@ export declare const contract: {
1478
1510
  }, undefined>;
1479
1511
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
1480
1512
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1481
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1482
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1483
1513
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1484
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1514
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1485
1515
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1486
1516
  }, undefined>, v.DescriptionAction<{
1487
1517
  value: string;
1488
1518
  editable: boolean;
1489
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1519
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1520
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1521
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1490
1522
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1491
1523
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1492
1524
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1493
1525
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1494
1526
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1495
1527
  readonly type: v.LiteralSchema<"transfer", undefined>;
1496
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1528
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1497
1529
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1498
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1530
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1499
1531
  type: v.LiteralSchema<"account_key", undefined>;
1500
1532
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1501
1533
  }, undefined>, v.DescriptionAction<{
1502
1534
  type: "account_key";
1503
1535
  accountKey: string;
1504
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1536
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1505
1537
  type: v.LiteralSchema<"account", undefined>;
1506
1538
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1507
1539
  }, undefined>, v.DescriptionAction<{
1508
1540
  type: "account";
1509
1541
  id: string;
1510
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1542
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1511
1543
  type: "account_key";
1512
1544
  accountKey: string;
1513
1545
  } | {
1514
1546
  type: "account";
1515
1547
  id: string;
1516
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1548
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1517
1549
  type: "account_key";
1518
1550
  accountKey: string;
1519
1551
  } | {
1520
1552
  type: "account";
1521
1553
  id: string;
1522
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1523
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1554
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1555
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1524
1556
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1525
1557
  readonly type: v.LiteralSchema<"account_key", undefined>;
1526
1558
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1531,11 +1563,13 @@ export declare const contract: {
1531
1563
  }, undefined>, v.StrictObjectSchema<{
1532
1564
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1533
1565
  readonly type: v.LiteralSchema<"external", undefined>;
1534
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1535
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1536
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1537
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1538
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1566
+ readonly country: v.LiteralSchema<"CL", undefined>;
1567
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
1568
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
1569
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1570
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1571
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1572
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1539
1573
  }, undefined>], undefined>, v.DescriptionAction<{
1540
1574
  editable: false;
1541
1575
  type: "account_key";
@@ -1547,12 +1581,14 @@ export declare const contract: {
1547
1581
  } | {
1548
1582
  editable: false;
1549
1583
  type: "external";
1550
- bank_id: string;
1551
- account_type: "checking" | "debit" | "savings";
1552
- account_id: string;
1553
- holder_id: string;
1554
- holder_name: string;
1555
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1584
+ country: "CL";
1585
+ bank_code: string;
1586
+ account_type: "10" | "20" | "40";
1587
+ account_number: string;
1588
+ name: string;
1589
+ national_kind_id: "RUT";
1590
+ national_id: string;
1591
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1556
1592
  editable: false;
1557
1593
  type: "account_key";
1558
1594
  accountKey: string;
@@ -1563,64 +1599,66 @@ export declare const contract: {
1563
1599
  } | {
1564
1600
  editable: false;
1565
1601
  type: "external";
1566
- bank_id: string;
1567
- account_type: "checking" | "debit" | "savings";
1568
- account_id: string;
1569
- holder_id: string;
1570
- holder_name: string;
1571
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1602
+ country: "CL";
1603
+ bank_code: string;
1604
+ account_type: "10" | "20" | "40";
1605
+ account_number: string;
1606
+ name: string;
1607
+ national_kind_id: "RUT";
1608
+ national_id: string;
1609
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1610
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1611
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1612
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1613
+ }, undefined>, v.DescriptionAction<{
1614
+ value: string;
1615
+ editable: boolean;
1616
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1572
1617
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1573
1618
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1574
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
1619
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
1575
1620
  readonly editable: v.BooleanSchema<undefined>;
1576
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1621
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1577
1622
  }, undefined>, v.DescriptionAction<{
1578
1623
  currency: "CLP";
1579
- value: string;
1624
+ value: number;
1580
1625
  editable: boolean;
1581
- confirmed: string | null;
1582
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1626
+ confirmed: number | null;
1627
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1583
1628
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1584
1629
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1585
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1630
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1586
1631
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1587
1632
  }, undefined>, v.DescriptionAction<{
1588
1633
  currency: "CLP";
1589
- value: string;
1634
+ value: number;
1590
1635
  at: string;
1591
1636
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
1592
1637
  readonly fee: v.StrictObjectSchema<{
1593
1638
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1594
1639
  readonly amount: v.LiteralSchema<"0", undefined>;
1595
1640
  }, undefined>;
1596
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1641
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1597
1642
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1598
1643
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1599
1644
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1600
1645
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1601
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1602
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1603
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1604
- }, undefined>, v.DescriptionAction<{
1605
- value: string;
1606
- editable: boolean;
1607
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1608
1646
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1609
1647
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1610
1648
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1611
1649
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1612
1650
  }, undefined>, v.DescriptionAction<{
1613
1651
  type: "transfer";
1614
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1652
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1615
1653
  signed: boolean;
1616
- source: {
1654
+ sender: {
1617
1655
  type: "account_key";
1618
1656
  accountKey: string;
1619
1657
  } | {
1620
1658
  type: "account";
1621
1659
  id: string;
1622
1660
  } | null;
1623
- destination: {
1661
+ receiver: {
1624
1662
  editable: false;
1625
1663
  type: "account_key";
1626
1664
  accountKey: string;
@@ -1631,21 +1669,27 @@ export declare const contract: {
1631
1669
  } | {
1632
1670
  editable: false;
1633
1671
  type: "external";
1634
- bank_id: string;
1635
- account_type: "checking" | "debit" | "savings";
1636
- account_id: string;
1637
- holder_id: string;
1638
- holder_name: string;
1672
+ country: "CL";
1673
+ bank_code: string;
1674
+ account_type: "10" | "20" | "40";
1675
+ account_number: string;
1676
+ name: string;
1677
+ national_kind_id: "RUT";
1678
+ national_id: string;
1639
1679
  } | null;
1680
+ comment?: {
1681
+ value: string;
1682
+ editable: boolean;
1683
+ } | undefined;
1640
1684
  amount: {
1641
1685
  currency: "CLP";
1642
- value: string;
1686
+ value: number;
1643
1687
  editable: boolean;
1644
- confirmed: string | null;
1688
+ confirmed: number | null;
1645
1689
  };
1646
1690
  settled: {
1647
1691
  currency: "CLP";
1648
- value: string;
1692
+ value: number;
1649
1693
  at: string;
1650
1694
  } | null;
1651
1695
  fee: {
@@ -1657,19 +1701,15 @@ export declare const contract: {
1657
1701
  expires_in_seconds: number | null;
1658
1702
  id: string;
1659
1703
  resource_server: string;
1660
- note?: {
1661
- value: string;
1662
- editable: boolean;
1663
- } | undefined;
1664
1704
  metadata: {
1665
1705
  [x: string]: unknown;
1666
1706
  };
1667
1707
  server_time: string;
1668
1708
  created_at: string;
1669
1709
  authorization_url: string;
1670
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1710
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1671
1711
  readonly type: v.LiteralSchema<"account_opening", undefined>;
1672
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1712
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1673
1713
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1674
1714
  readonly account: v.StrictObjectSchema<{
1675
1715
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1679,22 +1719,22 @@ export declare const contract: {
1679
1719
  }, undefined>;
1680
1720
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1681
1721
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1682
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1683
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1684
1722
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1685
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1723
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1686
1724
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1687
1725
  }, undefined>, v.DescriptionAction<{
1688
1726
  value: string;
1689
1727
  editable: boolean;
1690
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1728
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1729
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1730
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1691
1731
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1692
1732
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1693
1733
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1694
1734
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1695
1735
  }, undefined>, v.DescriptionAction<{
1696
1736
  type: "account_opening";
1697
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1737
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1698
1738
  signed: boolean;
1699
1739
  account: {
1700
1740
  accountKey: string;
@@ -1704,12 +1744,12 @@ export declare const contract: {
1704
1744
  };
1705
1745
  expires_at: string | null;
1706
1746
  expires_in_seconds: number | null;
1707
- id: string;
1708
- resource_server: string;
1709
1747
  note?: {
1710
1748
  value: string;
1711
1749
  editable: boolean;
1712
1750
  } | undefined;
1751
+ id: string;
1752
+ resource_server: string;
1713
1753
  metadata: {
1714
1754
  [x: string]: unknown;
1715
1755
  };
@@ -1718,7 +1758,7 @@ export declare const contract: {
1718
1758
  authorization_url: string;
1719
1759
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1720
1760
  readonly type: v.LiteralSchema<"account_closure", undefined>;
1721
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1761
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1722
1762
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1723
1763
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1724
1764
  type: v.LiteralSchema<"account_key", undefined>;
@@ -1726,38 +1766,38 @@ export declare const contract: {
1726
1766
  }, undefined>, v.DescriptionAction<{
1727
1767
  type: "account_key";
1728
1768
  accountKey: string;
1729
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1769
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1730
1770
  type: v.LiteralSchema<"account", undefined>;
1731
1771
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1732
1772
  }, undefined>, v.DescriptionAction<{
1733
1773
  type: "account";
1734
1774
  id: string;
1735
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1775
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1736
1776
  type: "account_key";
1737
1777
  accountKey: string;
1738
1778
  } | {
1739
1779
  type: "account";
1740
1780
  id: string;
1741
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1781
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1742
1782
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
1743
1783
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1744
1784
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1745
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1746
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1747
1785
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1748
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1786
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1749
1787
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1750
1788
  }, undefined>, v.DescriptionAction<{
1751
1789
  value: string;
1752
1790
  editable: boolean;
1753
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1791
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1792
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1793
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1754
1794
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1755
1795
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1756
1796
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1757
1797
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1758
1798
  }, undefined>, v.DescriptionAction<{
1759
1799
  type: "account_closure";
1760
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1800
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1761
1801
  signed: boolean;
1762
1802
  account: {
1763
1803
  type: "account_key";
@@ -1769,12 +1809,12 @@ export declare const contract: {
1769
1809
  resolved_account_id: string | null;
1770
1810
  expires_at: string;
1771
1811
  expires_in_seconds: number;
1772
- id: string;
1773
- resource_server: string;
1774
1812
  note?: {
1775
1813
  value: string;
1776
1814
  editable: boolean;
1777
1815
  } | undefined;
1816
+ id: string;
1817
+ resource_server: string;
1778
1818
  metadata: {
1779
1819
  [x: string]: unknown;
1780
1820
  };
@@ -1782,11 +1822,111 @@ export declare const contract: {
1782
1822
  created_at: string;
1783
1823
  authorization_url: string;
1784
1824
  }, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./intents.js").AccountKeyOutOfGrant, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./intents.js").DepositAmountOutOfBounds, typeof import("./intents.js").DepositDestinationAmbiguous, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").UnsupportedBank, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankAccountNumberMissing, typeof import("./intents.js").BankAuthorizationDenied, typeof import("./intents.js").BankHolderWithoutAccount, typeof import("./intents.js").BankAccountLimitReached, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
1825
+ createTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1826
+ readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
1827
+ readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
1828
+ readonly protected: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON protected header (`SignedTransferHeader`).">]>;
1829
+ readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1830
+ }, undefined>, undefined>, v.MinLengthAction<{
1831
+ protected: string;
1832
+ signature: string;
1833
+ }[], 1, undefined>, v.DescriptionAction<{
1834
+ protected: string;
1835
+ signature: string;
1836
+ }[], "At least one signature over the same payload; the core verifies every one.">]>;
1837
+ }, undefined>, v.DescriptionAction<{
1838
+ payload: string;
1839
+ signatures: {
1840
+ protected: string;
1841
+ signature: string;
1842
+ }[];
1843
+ }, "A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1844
+ readonly object: v.LiteralSchema<"transfer", undefined>;
1845
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
1846
+ readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The `jti` of the Signed Instruction that uploaded it. Sending the same instruction again answers this same Transfer.">]>;
1847
+ readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "Where the Transfer stands, in the words an Intent uses (`IntentStatus`): decide on the base, never on the whole value. A signed transfer that is not approved is `requires_action` until a Grant with `bank_transfer` `approve` or a person approves it. A transfer between two accounts of the same holder is `processing.confirmed` from its release until AndCo answers for good, then `succeeded` or `failed.<code>`.">]>;
1848
+ readonly core_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | null, "The core bancario's own word for its transfer (`requested`, `confirmed`, `rejected_insufficient_funds`, …), for the record. Null while AndCo has not read one. Never branch on it: a word the core adds later appears here as it is, and `status` is what to decide on.">]>;
1849
+ readonly approved: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "The signed `approved`: whether the instruction ordered the transfer sent as soon as it was uploaded.">]>;
1850
+ readonly sender: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
1851
+ country: v.LiteralSchema<"CL", undefined>;
1852
+ bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
1853
+ account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
1854
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
1855
+ name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
1856
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
1857
+ national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
1858
+ }, undefined>], undefined>, v.DescriptionAction<{
1859
+ country: "CL";
1860
+ bank_code: string;
1861
+ account_type: "10" | "20" | "40";
1862
+ account_number: string;
1863
+ name: string;
1864
+ national_kind_id: "RUT";
1865
+ national_id: string;
1866
+ }, "The Remitente, as Core's `sender`: the account the money leaves and its holder. `country` and `national_kind_id` are always declared. Core checks the country, the bank (`0739`), the account's own type and the holder's RUT; it stores `name` as it arrives.">]>;
1867
+ readonly receiver: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
1868
+ readonly amount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1869
+ readonly currency: v.LiteralSchema<"CLP", undefined>;
1870
+ readonly email: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where Core notifies the Receptor.">]>;
1871
+ readonly country: v.LiteralSchema<"CL", undefined>;
1872
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
1873
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
1874
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
1875
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
1876
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1877
+ readonly national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
1878
+ }, undefined>], undefined>, v.DescriptionAction<{
1879
+ amount: number;
1880
+ currency: "CLP";
1881
+ email?: string | undefined;
1882
+ country: "CL";
1883
+ bank_code: string;
1884
+ account_type: "10" | "20" | "40";
1885
+ account_number: string;
1886
+ name: string;
1887
+ national_kind_id: "RUT";
1888
+ national_id: string;
1889
+ }, "The Receptor, as Core's `receiver`: the account the money lands on, its holder, and the amount, an integer in the minor unit of the currency. `country` and `national_kind_id` are always declared.">]>;
1890
+ readonly comment: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "The signed comment, when there is one.">]>;
1891
+ readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer was uploaded.">]>;
1892
+ readonly expires_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's deadline: the signature's `exp`. A transfer still waiting for its approval at this instant expires.">]>;
1893
+ }, undefined>, v.DescriptionAction<{
1894
+ object: "transfer";
1895
+ id: string;
1896
+ jti: string;
1897
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1898
+ core_status: string | null;
1899
+ approved: boolean;
1900
+ sender: {
1901
+ country: "CL";
1902
+ bank_code: string;
1903
+ account_type: "10" | "20" | "40";
1904
+ account_number: string;
1905
+ name: string;
1906
+ national_kind_id: "RUT";
1907
+ national_id: string;
1908
+ };
1909
+ receiver: {
1910
+ amount: number;
1911
+ currency: "CLP";
1912
+ email?: string | undefined;
1913
+ country: "CL";
1914
+ bank_code: string;
1915
+ account_type: "10" | "20" | "40";
1916
+ account_number: string;
1917
+ name: string;
1918
+ national_kind_id: "RUT";
1919
+ national_id: string;
1920
+ };
1921
+ comment?: string | undefined;
1922
+ created_at: string;
1923
+ expires_at: string;
1924
+ }, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./transfers.js").SenderMismatch, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
1785
1925
  getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1786
1926
  readonly edges: v.ArraySchema<v.StrictObjectSchema<{
1787
1927
  readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1788
1928
  readonly node: v.StrictObjectSchema<{
1789
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The `bank_id` of a destination of type `external`.">]>;
1929
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog: the `bank_code` of a Receptor.">]>;
1790
1930
  readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
1791
1931
  }, undefined>;
1792
1932
  }, undefined>, undefined>;
@@ -1848,7 +1988,7 @@ export declare const contract: {
1848
1988
  account_type: "checking" | "debit" | "savings";
1849
1989
  holder_id: string | null;
1850
1990
  holder_name: string;
1851
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1991
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1852
1992
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1853
1993
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1854
1994
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -1872,8 +2012,8 @@ export declare const contract: {
1872
2012
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1873
2013
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
1874
2014
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
1875
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
1876
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
2015
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
2016
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
1877
2017
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
1878
2018
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
1879
2019
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1887,49 +2027,49 @@ export declare const contract: {
1887
2027
  }, undefined>;
1888
2028
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
1889
2029
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1890
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1891
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1892
2030
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1893
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2031
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1894
2032
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1895
2033
  }, undefined>, v.DescriptionAction<{
1896
2034
  value: string;
1897
2035
  editable: boolean;
1898
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2036
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2037
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2038
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1899
2039
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1900
2040
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1901
2041
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1902
2042
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1903
2043
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1904
2044
  readonly type: v.LiteralSchema<"transfer", undefined>;
1905
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2045
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1906
2046
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1907
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2047
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1908
2048
  type: v.LiteralSchema<"account_key", undefined>;
1909
2049
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1910
2050
  }, undefined>, v.DescriptionAction<{
1911
2051
  type: "account_key";
1912
2052
  accountKey: string;
1913
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2053
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1914
2054
  type: v.LiteralSchema<"account", undefined>;
1915
2055
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1916
2056
  }, undefined>, v.DescriptionAction<{
1917
2057
  type: "account";
1918
2058
  id: string;
1919
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2059
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1920
2060
  type: "account_key";
1921
2061
  accountKey: string;
1922
2062
  } | {
1923
2063
  type: "account";
1924
2064
  id: string;
1925
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2065
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1926
2066
  type: "account_key";
1927
2067
  accountKey: string;
1928
2068
  } | {
1929
2069
  type: "account";
1930
2070
  id: string;
1931
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1932
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2071
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
2072
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1933
2073
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1934
2074
  readonly type: v.LiteralSchema<"account_key", undefined>;
1935
2075
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1940,11 +2080,13 @@ export declare const contract: {
1940
2080
  }, undefined>, v.StrictObjectSchema<{
1941
2081
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1942
2082
  readonly type: v.LiteralSchema<"external", undefined>;
1943
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1944
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1945
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1946
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1947
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2083
+ readonly country: v.LiteralSchema<"CL", undefined>;
2084
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
2085
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
2086
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2087
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2088
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
2089
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1948
2090
  }, undefined>], undefined>, v.DescriptionAction<{
1949
2091
  editable: false;
1950
2092
  type: "account_key";
@@ -1956,12 +2098,14 @@ export declare const contract: {
1956
2098
  } | {
1957
2099
  editable: false;
1958
2100
  type: "external";
1959
- bank_id: string;
1960
- account_type: "checking" | "debit" | "savings";
1961
- account_id: string;
1962
- holder_id: string;
1963
- holder_name: string;
1964
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
2101
+ country: "CL";
2102
+ bank_code: string;
2103
+ account_type: "10" | "20" | "40";
2104
+ account_number: string;
2105
+ name: string;
2106
+ national_kind_id: "RUT";
2107
+ national_id: string;
2108
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1965
2109
  editable: false;
1966
2110
  type: "account_key";
1967
2111
  accountKey: string;
@@ -1972,64 +2116,66 @@ export declare const contract: {
1972
2116
  } | {
1973
2117
  editable: false;
1974
2118
  type: "external";
1975
- bank_id: string;
1976
- account_type: "checking" | "debit" | "savings";
1977
- account_id: string;
1978
- holder_id: string;
1979
- holder_name: string;
1980
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
2119
+ country: "CL";
2120
+ bank_code: string;
2121
+ account_type: "10" | "20" | "40";
2122
+ account_number: string;
2123
+ name: string;
2124
+ national_kind_id: "RUT";
2125
+ national_id: string;
2126
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
2127
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2128
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
2129
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2130
+ }, undefined>, v.DescriptionAction<{
2131
+ value: string;
2132
+ editable: boolean;
2133
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1981
2134
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1982
2135
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1983
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
2136
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
1984
2137
  readonly editable: v.BooleanSchema<undefined>;
1985
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
2138
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1986
2139
  }, undefined>, v.DescriptionAction<{
1987
2140
  currency: "CLP";
1988
- value: string;
2141
+ value: number;
1989
2142
  editable: boolean;
1990
- confirmed: string | null;
1991
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
2143
+ confirmed: number | null;
2144
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1992
2145
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1993
2146
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1994
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2147
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1995
2148
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1996
2149
  }, undefined>, v.DescriptionAction<{
1997
2150
  currency: "CLP";
1998
- value: string;
2151
+ value: number;
1999
2152
  at: string;
2000
2153
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
2001
2154
  readonly fee: v.StrictObjectSchema<{
2002
2155
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2003
2156
  readonly amount: v.LiteralSchema<"0", undefined>;
2004
2157
  }, undefined>;
2005
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
2158
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
2006
2159
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
2007
2160
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
2008
2161
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2009
2162
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2010
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2011
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2012
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2013
- }, undefined>, v.DescriptionAction<{
2014
- value: string;
2015
- editable: boolean;
2016
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2017
2163
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2018
2164
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2019
2165
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2020
2166
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2021
2167
  }, undefined>, v.DescriptionAction<{
2022
2168
  type: "transfer";
2023
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2169
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2024
2170
  signed: boolean;
2025
- source: {
2171
+ sender: {
2026
2172
  type: "account_key";
2027
2173
  accountKey: string;
2028
2174
  } | {
2029
2175
  type: "account";
2030
2176
  id: string;
2031
2177
  } | null;
2032
- destination: {
2178
+ receiver: {
2033
2179
  editable: false;
2034
2180
  type: "account_key";
2035
2181
  accountKey: string;
@@ -2040,21 +2186,27 @@ export declare const contract: {
2040
2186
  } | {
2041
2187
  editable: false;
2042
2188
  type: "external";
2043
- bank_id: string;
2044
- account_type: "checking" | "debit" | "savings";
2045
- account_id: string;
2046
- holder_id: string;
2047
- holder_name: string;
2189
+ country: "CL";
2190
+ bank_code: string;
2191
+ account_type: "10" | "20" | "40";
2192
+ account_number: string;
2193
+ name: string;
2194
+ national_kind_id: "RUT";
2195
+ national_id: string;
2048
2196
  } | null;
2197
+ comment?: {
2198
+ value: string;
2199
+ editable: boolean;
2200
+ } | undefined;
2049
2201
  amount: {
2050
2202
  currency: "CLP";
2051
- value: string;
2203
+ value: number;
2052
2204
  editable: boolean;
2053
- confirmed: string | null;
2205
+ confirmed: number | null;
2054
2206
  };
2055
2207
  settled: {
2056
2208
  currency: "CLP";
2057
- value: string;
2209
+ value: number;
2058
2210
  at: string;
2059
2211
  } | null;
2060
2212
  fee: {
@@ -2066,19 +2218,15 @@ export declare const contract: {
2066
2218
  expires_in_seconds: number | null;
2067
2219
  id: string;
2068
2220
  resource_server: string;
2069
- note?: {
2070
- value: string;
2071
- editable: boolean;
2072
- } | undefined;
2073
2221
  metadata: {
2074
2222
  [x: string]: unknown;
2075
2223
  };
2076
2224
  server_time: string;
2077
2225
  created_at: string;
2078
2226
  authorization_url: string;
2079
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2227
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2080
2228
  readonly type: v.LiteralSchema<"account_opening", undefined>;
2081
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2229
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2082
2230
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
2083
2231
  readonly account: v.StrictObjectSchema<{
2084
2232
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -2088,22 +2236,22 @@ export declare const contract: {
2088
2236
  }, undefined>;
2089
2237
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
2090
2238
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
2091
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2092
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2093
2239
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2094
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2240
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2095
2241
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2096
2242
  }, undefined>, v.DescriptionAction<{
2097
2243
  value: string;
2098
2244
  editable: boolean;
2099
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2245
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2246
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2247
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2100
2248
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2101
2249
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2102
2250
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2103
2251
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2104
2252
  }, undefined>, v.DescriptionAction<{
2105
2253
  type: "account_opening";
2106
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2254
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2107
2255
  signed: boolean;
2108
2256
  account: {
2109
2257
  accountKey: string;
@@ -2113,12 +2261,12 @@ export declare const contract: {
2113
2261
  };
2114
2262
  expires_at: string | null;
2115
2263
  expires_in_seconds: number | null;
2116
- id: string;
2117
- resource_server: string;
2118
2264
  note?: {
2119
2265
  value: string;
2120
2266
  editable: boolean;
2121
2267
  } | undefined;
2268
+ id: string;
2269
+ resource_server: string;
2122
2270
  metadata: {
2123
2271
  [x: string]: unknown;
2124
2272
  };
@@ -2127,7 +2275,7 @@ export declare const contract: {
2127
2275
  authorization_url: string;
2128
2276
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2129
2277
  readonly type: v.LiteralSchema<"account_closure", undefined>;
2130
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2278
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2131
2279
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
2132
2280
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2133
2281
  type: v.LiteralSchema<"account_key", undefined>;
@@ -2135,38 +2283,38 @@ export declare const contract: {
2135
2283
  }, undefined>, v.DescriptionAction<{
2136
2284
  type: "account_key";
2137
2285
  accountKey: string;
2138
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2286
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2139
2287
  type: v.LiteralSchema<"account", undefined>;
2140
2288
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2141
2289
  }, undefined>, v.DescriptionAction<{
2142
2290
  type: "account";
2143
2291
  id: string;
2144
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2292
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2145
2293
  type: "account_key";
2146
2294
  accountKey: string;
2147
2295
  } | {
2148
2296
  type: "account";
2149
2297
  id: string;
2150
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2298
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2151
2299
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
2152
2300
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2153
2301
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
2154
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2155
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2156
2302
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2157
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2303
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2158
2304
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2159
2305
  }, undefined>, v.DescriptionAction<{
2160
2306
  value: string;
2161
2307
  editable: boolean;
2162
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2308
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2309
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2310
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2163
2311
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2164
2312
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2165
2313
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2166
2314
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2167
2315
  }, undefined>, v.DescriptionAction<{
2168
2316
  type: "account_closure";
2169
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2317
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2170
2318
  signed: boolean;
2171
2319
  account: {
2172
2320
  type: "account_key";
@@ -2178,12 +2326,12 @@ export declare const contract: {
2178
2326
  resolved_account_id: string | null;
2179
2327
  expires_at: string;
2180
2328
  expires_in_seconds: number;
2181
- id: string;
2182
- resource_server: string;
2183
2329
  note?: {
2184
2330
  value: string;
2185
2331
  editable: boolean;
2186
2332
  } | undefined;
2333
+ id: string;
2334
+ resource_server: string;
2187
2335
  metadata: {
2188
2336
  [x: string]: unknown;
2189
2337
  };
@@ -2283,6 +2431,90 @@ export declare const contract: {
2283
2431
  hasNextPage: boolean;
2284
2432
  };
2285
2433
  }, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
2434
+ getTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
2435
+ readonly transfer_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2436
+ }, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2437
+ readonly object: v.LiteralSchema<"transfer", undefined>;
2438
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
2439
+ readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The `jti` of the Signed Instruction that uploaded it. Sending the same instruction again answers this same Transfer.">]>;
2440
+ readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "Where the Transfer stands, in the words an Intent uses (`IntentStatus`): decide on the base, never on the whole value. A signed transfer that is not approved is `requires_action` until a Grant with `bank_transfer` `approve` or a person approves it. A transfer between two accounts of the same holder is `processing.confirmed` from its release until AndCo answers for good, then `succeeded` or `failed.<code>`.">]>;
2441
+ readonly core_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | null, "The core bancario's own word for its transfer (`requested`, `confirmed`, `rejected_insufficient_funds`, …), for the record. Null while AndCo has not read one. Never branch on it: a word the core adds later appears here as it is, and `status` is what to decide on.">]>;
2442
+ readonly approved: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "The signed `approved`: whether the instruction ordered the transfer sent as soon as it was uploaded.">]>;
2443
+ readonly sender: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
2444
+ country: v.LiteralSchema<"CL", undefined>;
2445
+ bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
2446
+ account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
2447
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
2448
+ name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
2449
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
2450
+ national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
2451
+ }, undefined>], undefined>, v.DescriptionAction<{
2452
+ country: "CL";
2453
+ bank_code: string;
2454
+ account_type: "10" | "20" | "40";
2455
+ account_number: string;
2456
+ name: string;
2457
+ national_kind_id: "RUT";
2458
+ national_id: string;
2459
+ }, "The Remitente, as Core's `sender`: the account the money leaves and its holder. `country` and `national_kind_id` are always declared. Core checks the country, the bank (`0739`), the account's own type and the holder's RUT; it stores `name` as it arrives.">]>;
2460
+ readonly receiver: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
2461
+ readonly amount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
2462
+ readonly currency: v.LiteralSchema<"CLP", undefined>;
2463
+ readonly email: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where Core notifies the Receptor.">]>;
2464
+ readonly country: v.LiteralSchema<"CL", undefined>;
2465
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
2466
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
2467
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
2468
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
2469
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
2470
+ readonly national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
2471
+ }, undefined>], undefined>, v.DescriptionAction<{
2472
+ amount: number;
2473
+ currency: "CLP";
2474
+ email?: string | undefined;
2475
+ country: "CL";
2476
+ bank_code: string;
2477
+ account_type: "10" | "20" | "40";
2478
+ account_number: string;
2479
+ name: string;
2480
+ national_kind_id: "RUT";
2481
+ national_id: string;
2482
+ }, "The Receptor, as Core's `receiver`: the account the money lands on, its holder, and the amount, an integer in the minor unit of the currency. `country` and `national_kind_id` are always declared.">]>;
2483
+ readonly comment: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "The signed comment, when there is one.">]>;
2484
+ readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer was uploaded.">]>;
2485
+ readonly expires_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's deadline: the signature's `exp`. A transfer still waiting for its approval at this instant expires.">]>;
2486
+ }, undefined>, v.DescriptionAction<{
2487
+ object: "transfer";
2488
+ id: string;
2489
+ jti: string;
2490
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2491
+ core_status: string | null;
2492
+ approved: boolean;
2493
+ sender: {
2494
+ country: "CL";
2495
+ bank_code: string;
2496
+ account_type: "10" | "20" | "40";
2497
+ account_number: string;
2498
+ name: string;
2499
+ national_kind_id: "RUT";
2500
+ national_id: string;
2501
+ };
2502
+ receiver: {
2503
+ amount: number;
2504
+ currency: "CLP";
2505
+ email?: string | undefined;
2506
+ country: "CL";
2507
+ bank_code: string;
2508
+ account_type: "10" | "20" | "40";
2509
+ account_number: string;
2510
+ name: string;
2511
+ national_kind_id: "RUT";
2512
+ national_id: string;
2513
+ };
2514
+ comment?: string | undefined;
2515
+ created_at: string;
2516
+ expires_at: string;
2517
+ }, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
2286
2518
  getUserInfo: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.ObjectSchema<{
2287
2519
  readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2288
2520
  readonly email: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Profile's email address, present with the `email` scope. Any address the identity provider accepts, so a client must not require a narrower syntax.">]>, undefined>;
@@ -2310,7 +2542,7 @@ export declare const contract: {
2310
2542
  readonly number: v.StringSchema<undefined>;
2311
2543
  readonly type: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
2312
2544
  readonly currency: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
2313
- readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero.">]>;
2545
+ readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The ledger balance AndCo maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds on hold are not subtracted from it. Null while the balance projection does not know the account yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero.">]>;
2314
2546
  }, undefined>;
2315
2547
  }, undefined>, undefined>;
2316
2548
  readonly pageInfo: v.StrictObjectSchema<{
@@ -2350,11 +2582,11 @@ export declare const contract: {
2350
2582
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2351
2583
  readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2352
2584
  readonly description: v.StringSchema<undefined>;
2353
- readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by the external bank and republished exactly as the bank sent it, with none of the digit-count bound of an Andco-defined amount. What tells an inflow from an outflow is `movement_type`, not a sign: the bank sends the amount as a positive figure.">]>;
2354
- readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under the bank's own field name and in its own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.">]>;
2585
+ readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by AndCo and republished exactly as AndCo sent it, with none of the digit-count bound of an AndCo-defined amount. What tells an inflow from an outflow is `movement_type`, not a sign: AndCo sends the amount as a positive figure.">]>;
2586
+ readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under AndCo's own field name and in its own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.">]>;
2355
2587
  readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2356
2588
  readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2357
- readonly runningBalance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Same provenance as `amount`: issued by the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
2589
+ readonly runningBalance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Same provenance as `amount`: issued by AndCo and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
2358
2590
  readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2359
2591
  readonly reversed: v.BooleanSchema<undefined>;
2360
2592
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -2558,16 +2790,16 @@ export declare const contract: {
2558
2790
  readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2559
2791
  readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2560
2792
  readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
2561
- readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is Andco Core, on its hosted page.">]>;
2793
+ readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo Core, on its hosted page.">]>;
2562
2794
  readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2563
2795
  readonly evidence: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["document", "liveness", "face_comparison"], undefined>, undefined>, v.MinLengthAction<("document" | "liveness" | "face_comparison")[], 1, undefined>]>, v.DescriptionAction<("document" | "liveness" | "face_comparison")[], "The kinds of evidence, named after the `evidence` of `verified_claims` in OpenID Connect for Identity Assurance.">]>;
2564
- readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "Andco Core's identifier of the validation. Keep it as the reference to the validation.">]>;
2796
+ readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo Core's identifier of the validation. Keep it as the reference to the validation.">]>;
2565
2797
  }, undefined>, v.DescriptionAction<{
2566
2798
  validated_by: "andco_core";
2567
2799
  validated_at: string;
2568
2800
  evidence: ("document" | "liveness" | "face_comparison")[];
2569
2801
  verification_id: string;
2570
- }, "What Andco Core checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
2802
+ }, "What AndCo Core checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
2571
2803
  validated_by: "andco_core";
2572
2804
  validated_at: string;
2573
2805
  evidence: ("document" | "liveness" | "face_comparison")[];
@@ -2678,16 +2910,16 @@ export declare const contract: {
2678
2910
  readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2679
2911
  readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2680
2912
  readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
2681
- readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is Andco Core, on its hosted page.">]>;
2913
+ readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo Core, on its hosted page.">]>;
2682
2914
  readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2683
2915
  readonly evidence: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["document", "liveness", "face_comparison"], undefined>, undefined>, v.MinLengthAction<("document" | "liveness" | "face_comparison")[], 1, undefined>]>, v.DescriptionAction<("document" | "liveness" | "face_comparison")[], "The kinds of evidence, named after the `evidence` of `verified_claims` in OpenID Connect for Identity Assurance.">]>;
2684
- readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "Andco Core's identifier of the validation. Keep it as the reference to the validation.">]>;
2916
+ readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo Core's identifier of the validation. Keep it as the reference to the validation.">]>;
2685
2917
  }, undefined>, v.DescriptionAction<{
2686
2918
  validated_by: "andco_core";
2687
2919
  validated_at: string;
2688
2920
  evidence: ("document" | "liveness" | "face_comparison")[];
2689
2921
  verification_id: string;
2690
- }, "What Andco Core checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
2922
+ }, "What AndCo Core checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
2691
2923
  validated_by: "andco_core";
2692
2924
  validated_at: string;
2693
2925
  evidence: ("document" | "liveness" | "face_comparison")[];
@@ -2760,6 +2992,143 @@ export declare const contract: {
2760
2992
  hasNextPage: boolean;
2761
2993
  };
2762
2994
  }, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidRequest, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
2995
+ listTransfers: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
2996
+ readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The `jti` of the Signed Instruction that uploaded the Transfer.">]>;
2997
+ }, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2998
+ readonly edges: v.ArraySchema<v.StrictObjectSchema<{
2999
+ readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3000
+ readonly node: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3001
+ readonly object: v.LiteralSchema<"transfer", undefined>;
3002
+ readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
3003
+ readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The `jti` of the Signed Instruction that uploaded it. Sending the same instruction again answers this same Transfer.">]>;
3004
+ readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "Where the Transfer stands, in the words an Intent uses (`IntentStatus`): decide on the base, never on the whole value. A signed transfer that is not approved is `requires_action` until a Grant with `bank_transfer` `approve` or a person approves it. A transfer between two accounts of the same holder is `processing.confirmed` from its release until AndCo answers for good, then `succeeded` or `failed.<code>`.">]>;
3005
+ readonly core_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | null, "The core bancario's own word for its transfer (`requested`, `confirmed`, `rejected_insufficient_funds`, …), for the record. Null while AndCo has not read one. Never branch on it: a word the core adds later appears here as it is, and `status` is what to decide on.">]>;
3006
+ readonly approved: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "The signed `approved`: whether the instruction ordered the transfer sent as soon as it was uploaded.">]>;
3007
+ readonly sender: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
3008
+ country: v.LiteralSchema<"CL", undefined>;
3009
+ bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
3010
+ account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
3011
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
3012
+ name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
3013
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
3014
+ national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
3015
+ }, undefined>], undefined>, v.DescriptionAction<{
3016
+ country: "CL";
3017
+ bank_code: string;
3018
+ account_type: "10" | "20" | "40";
3019
+ account_number: string;
3020
+ name: string;
3021
+ national_kind_id: "RUT";
3022
+ national_id: string;
3023
+ }, "The Remitente, as Core's `sender`: the account the money leaves and its holder. `country` and `national_kind_id` are always declared. Core checks the country, the bank (`0739`), the account's own type and the holder's RUT; it stores `name` as it arrives.">]>;
3024
+ readonly receiver: v.SchemaWithPipe<readonly [v.VariantSchema<"country", [v.StrictObjectSchema<{
3025
+ readonly amount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
3026
+ readonly currency: v.LiteralSchema<"CLP", undefined>;
3027
+ readonly email: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.EmailAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where Core notifies the Receptor.">]>;
3028
+ readonly country: v.LiteralSchema<"CL", undefined>;
3029
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
3030
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
3031
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
3032
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The holder's name. Core stores it as it arrives and never compares it.">]>;
3033
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
3034
+ readonly national_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The holder's RUT. Core compares it as a normalized RUT.">]>;
3035
+ }, undefined>], undefined>, v.DescriptionAction<{
3036
+ amount: number;
3037
+ currency: "CLP";
3038
+ email?: string | undefined;
3039
+ country: "CL";
3040
+ bank_code: string;
3041
+ account_type: "10" | "20" | "40";
3042
+ account_number: string;
3043
+ name: string;
3044
+ national_kind_id: "RUT";
3045
+ national_id: string;
3046
+ }, "The Receptor, as Core's `receiver`: the account the money lands on, its holder, and the amount, an integer in the minor unit of the currency. `country` and `national_kind_id` are always declared.">]>;
3047
+ readonly comment: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "The signed comment, when there is one.">]>;
3048
+ readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer was uploaded.">]>;
3049
+ readonly expires_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's deadline: the signature's `exp`. A transfer still waiting for its approval at this instant expires.">]>;
3050
+ }, undefined>, v.DescriptionAction<{
3051
+ object: "transfer";
3052
+ id: string;
3053
+ jti: string;
3054
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3055
+ core_status: string | null;
3056
+ approved: boolean;
3057
+ sender: {
3058
+ country: "CL";
3059
+ bank_code: string;
3060
+ account_type: "10" | "20" | "40";
3061
+ account_number: string;
3062
+ name: string;
3063
+ national_kind_id: "RUT";
3064
+ national_id: string;
3065
+ };
3066
+ receiver: {
3067
+ amount: number;
3068
+ currency: "CLP";
3069
+ email?: string | undefined;
3070
+ country: "CL";
3071
+ bank_code: string;
3072
+ account_type: "10" | "20" | "40";
3073
+ account_number: string;
3074
+ name: string;
3075
+ national_kind_id: "RUT";
3076
+ national_id: string;
3077
+ };
3078
+ comment?: string | undefined;
3079
+ created_at: string;
3080
+ expires_at: string;
3081
+ }, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>;
3082
+ }, undefined>, undefined>;
3083
+ readonly pageInfo: v.StrictObjectSchema<{
3084
+ readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3085
+ readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3086
+ readonly hasPreviousPage: v.BooleanSchema<undefined>;
3087
+ readonly hasNextPage: v.BooleanSchema<undefined>;
3088
+ }, undefined>;
3089
+ }, undefined>, v.DescriptionAction<{
3090
+ edges: {
3091
+ cursor: string | null;
3092
+ node: {
3093
+ object: "transfer";
3094
+ id: string;
3095
+ jti: string;
3096
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3097
+ core_status: string | null;
3098
+ approved: boolean;
3099
+ sender: {
3100
+ country: "CL";
3101
+ bank_code: string;
3102
+ account_type: "10" | "20" | "40";
3103
+ account_number: string;
3104
+ name: string;
3105
+ national_kind_id: "RUT";
3106
+ national_id: string;
3107
+ };
3108
+ receiver: {
3109
+ amount: number;
3110
+ currency: "CLP";
3111
+ email?: string | undefined;
3112
+ country: "CL";
3113
+ bank_code: string;
3114
+ account_type: "10" | "20" | "40";
3115
+ account_number: string;
3116
+ name: string;
3117
+ national_kind_id: "RUT";
3118
+ national_id: string;
3119
+ };
3120
+ comment?: string | undefined;
3121
+ created_at: string;
3122
+ expires_at: string;
3123
+ };
3124
+ }[];
3125
+ pageInfo: {
3126
+ startCursor: string | null;
3127
+ endCursor: string | null;
3128
+ hasPreviousPage: boolean;
3129
+ hasNextPage: boolean;
3130
+ };
3131
+ }, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
2763
3132
  readAccountEvents: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
2764
3133
  readonly offset: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "Nonnegative position in live ordered results.">]>, undefined>;
2765
3134
  readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Offset page size; do not combine with cursor arguments.">]>;
@@ -3116,7 +3485,7 @@ export declare const contract: {
3116
3485
  account_type: "checking" | "debit" | "savings";
3117
3486
  holder_id: string | null;
3118
3487
  holder_name: string;
3119
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3488
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3120
3489
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3121
3490
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3122
3491
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -3140,8 +3509,8 @@ export declare const contract: {
3140
3509
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3141
3510
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
3142
3511
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
3143
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
3144
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
3512
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
3513
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
3145
3514
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
3146
3515
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
3147
3516
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -3155,49 +3524,49 @@ export declare const contract: {
3155
3524
  }, undefined>;
3156
3525
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
3157
3526
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3158
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3159
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3160
3527
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3161
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3528
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3162
3529
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3163
3530
  }, undefined>, v.DescriptionAction<{
3164
3531
  value: string;
3165
3532
  editable: boolean;
3166
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3533
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3534
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3535
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3167
3536
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3168
3537
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3169
3538
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3170
3539
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3171
3540
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3172
3541
  readonly type: v.LiteralSchema<"transfer", undefined>;
3173
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3542
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3174
3543
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3175
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3544
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3176
3545
  type: v.LiteralSchema<"account_key", undefined>;
3177
3546
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3178
3547
  }, undefined>, v.DescriptionAction<{
3179
3548
  type: "account_key";
3180
3549
  accountKey: string;
3181
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3550
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3182
3551
  type: v.LiteralSchema<"account", undefined>;
3183
3552
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3184
3553
  }, undefined>, v.DescriptionAction<{
3185
3554
  type: "account";
3186
3555
  id: string;
3187
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3556
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3188
3557
  type: "account_key";
3189
3558
  accountKey: string;
3190
3559
  } | {
3191
3560
  type: "account";
3192
3561
  id: string;
3193
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3562
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3194
3563
  type: "account_key";
3195
3564
  accountKey: string;
3196
3565
  } | {
3197
3566
  type: "account";
3198
3567
  id: string;
3199
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3200
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3568
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3569
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3201
3570
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3202
3571
  readonly type: v.LiteralSchema<"account_key", undefined>;
3203
3572
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3208,11 +3577,13 @@ export declare const contract: {
3208
3577
  }, undefined>, v.StrictObjectSchema<{
3209
3578
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3210
3579
  readonly type: v.LiteralSchema<"external", undefined>;
3211
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3212
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
3213
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3214
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3215
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3580
+ readonly country: v.LiteralSchema<"CL", undefined>;
3581
+ readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>;
3582
+ readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
3583
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3584
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3585
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
3586
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
3216
3587
  }, undefined>], undefined>, v.DescriptionAction<{
3217
3588
  editable: false;
3218
3589
  type: "account_key";
@@ -3224,12 +3595,14 @@ export declare const contract: {
3224
3595
  } | {
3225
3596
  editable: false;
3226
3597
  type: "external";
3227
- bank_id: string;
3228
- account_type: "checking" | "debit" | "savings";
3229
- account_id: string;
3230
- holder_id: string;
3231
- holder_name: string;
3232
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3598
+ country: "CL";
3599
+ bank_code: string;
3600
+ account_type: "10" | "20" | "40";
3601
+ account_number: string;
3602
+ name: string;
3603
+ national_kind_id: "RUT";
3604
+ national_id: string;
3605
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3233
3606
  editable: false;
3234
3607
  type: "account_key";
3235
3608
  accountKey: string;
@@ -3240,64 +3613,66 @@ export declare const contract: {
3240
3613
  } | {
3241
3614
  editable: false;
3242
3615
  type: "external";
3243
- bank_id: string;
3244
- account_type: "checking" | "debit" | "savings";
3245
- account_id: string;
3246
- holder_id: string;
3247
- holder_name: string;
3248
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3616
+ country: "CL";
3617
+ bank_code: string;
3618
+ account_type: "10" | "20" | "40";
3619
+ account_number: string;
3620
+ name: string;
3621
+ national_kind_id: "RUT";
3622
+ national_id: string;
3623
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3624
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3625
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
3626
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3627
+ }, undefined>, v.DescriptionAction<{
3628
+ value: string;
3629
+ editable: boolean;
3630
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
3249
3631
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3250
3632
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3251
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
3633
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
3252
3634
  readonly editable: v.BooleanSchema<undefined>;
3253
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3635
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3254
3636
  }, undefined>, v.DescriptionAction<{
3255
3637
  currency: "CLP";
3256
- value: string;
3638
+ value: number;
3257
3639
  editable: boolean;
3258
- confirmed: string | null;
3259
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3640
+ confirmed: number | null;
3641
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3260
3642
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3261
3643
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3262
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3644
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
3263
3645
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3264
3646
  }, undefined>, v.DescriptionAction<{
3265
3647
  currency: "CLP";
3266
- value: string;
3648
+ value: number;
3267
3649
  at: string;
3268
3650
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
3269
3651
  readonly fee: v.StrictObjectSchema<{
3270
3652
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3271
3653
  readonly amount: v.LiteralSchema<"0", undefined>;
3272
3654
  }, undefined>;
3273
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3655
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3274
3656
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3275
3657
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3276
3658
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3277
3659
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3278
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3279
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3280
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3281
- }, undefined>, v.DescriptionAction<{
3282
- value: string;
3283
- editable: boolean;
3284
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3285
3660
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3286
3661
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3287
3662
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3288
3663
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3289
3664
  }, undefined>, v.DescriptionAction<{
3290
3665
  type: "transfer";
3291
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3666
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3292
3667
  signed: boolean;
3293
- source: {
3668
+ sender: {
3294
3669
  type: "account_key";
3295
3670
  accountKey: string;
3296
3671
  } | {
3297
3672
  type: "account";
3298
3673
  id: string;
3299
3674
  } | null;
3300
- destination: {
3675
+ receiver: {
3301
3676
  editable: false;
3302
3677
  type: "account_key";
3303
3678
  accountKey: string;
@@ -3308,21 +3683,27 @@ export declare const contract: {
3308
3683
  } | {
3309
3684
  editable: false;
3310
3685
  type: "external";
3311
- bank_id: string;
3312
- account_type: "checking" | "debit" | "savings";
3313
- account_id: string;
3314
- holder_id: string;
3315
- holder_name: string;
3686
+ country: "CL";
3687
+ bank_code: string;
3688
+ account_type: "10" | "20" | "40";
3689
+ account_number: string;
3690
+ name: string;
3691
+ national_kind_id: "RUT";
3692
+ national_id: string;
3316
3693
  } | null;
3694
+ comment?: {
3695
+ value: string;
3696
+ editable: boolean;
3697
+ } | undefined;
3317
3698
  amount: {
3318
3699
  currency: "CLP";
3319
- value: string;
3700
+ value: number;
3320
3701
  editable: boolean;
3321
- confirmed: string | null;
3702
+ confirmed: number | null;
3322
3703
  };
3323
3704
  settled: {
3324
3705
  currency: "CLP";
3325
- value: string;
3706
+ value: number;
3326
3707
  at: string;
3327
3708
  } | null;
3328
3709
  fee: {
@@ -3334,19 +3715,15 @@ export declare const contract: {
3334
3715
  expires_in_seconds: number | null;
3335
3716
  id: string;
3336
3717
  resource_server: string;
3337
- note?: {
3338
- value: string;
3339
- editable: boolean;
3340
- } | undefined;
3341
3718
  metadata: {
3342
3719
  [x: string]: unknown;
3343
3720
  };
3344
3721
  server_time: string;
3345
3722
  created_at: string;
3346
3723
  authorization_url: string;
3347
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3724
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3348
3725
  readonly type: v.LiteralSchema<"account_opening", undefined>;
3349
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3726
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3350
3727
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3351
3728
  readonly account: v.StrictObjectSchema<{
3352
3729
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3356,22 +3733,22 @@ export declare const contract: {
3356
3733
  }, undefined>;
3357
3734
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3358
3735
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3359
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3360
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3361
3736
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3362
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3737
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3363
3738
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3364
3739
  }, undefined>, v.DescriptionAction<{
3365
3740
  value: string;
3366
3741
  editable: boolean;
3367
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3742
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3743
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3744
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3368
3745
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3369
3746
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3370
3747
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3371
3748
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3372
3749
  }, undefined>, v.DescriptionAction<{
3373
3750
  type: "account_opening";
3374
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3751
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3375
3752
  signed: boolean;
3376
3753
  account: {
3377
3754
  accountKey: string;
@@ -3381,12 +3758,12 @@ export declare const contract: {
3381
3758
  };
3382
3759
  expires_at: string | null;
3383
3760
  expires_in_seconds: number | null;
3384
- id: string;
3385
- resource_server: string;
3386
3761
  note?: {
3387
3762
  value: string;
3388
3763
  editable: boolean;
3389
3764
  } | undefined;
3765
+ id: string;
3766
+ resource_server: string;
3390
3767
  metadata: {
3391
3768
  [x: string]: unknown;
3392
3769
  };
@@ -3395,7 +3772,7 @@ export declare const contract: {
3395
3772
  authorization_url: string;
3396
3773
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3397
3774
  readonly type: v.LiteralSchema<"account_closure", undefined>;
3398
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3775
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3399
3776
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3400
3777
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3401
3778
  type: v.LiteralSchema<"account_key", undefined>;
@@ -3403,38 +3780,38 @@ export declare const contract: {
3403
3780
  }, undefined>, v.DescriptionAction<{
3404
3781
  type: "account_key";
3405
3782
  accountKey: string;
3406
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3783
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3407
3784
  type: v.LiteralSchema<"account", undefined>;
3408
3785
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3409
3786
  }, undefined>, v.DescriptionAction<{
3410
3787
  type: "account";
3411
3788
  id: string;
3412
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3789
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3413
3790
  type: "account_key";
3414
3791
  accountKey: string;
3415
3792
  } | {
3416
3793
  type: "account";
3417
3794
  id: string;
3418
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3795
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3419
3796
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
3420
3797
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3421
3798
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3422
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3423
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3424
3799
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3425
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3800
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3426
3801
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3427
3802
  }, undefined>, v.DescriptionAction<{
3428
3803
  value: string;
3429
3804
  editable: boolean;
3430
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3805
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3806
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3807
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3431
3808
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3432
3809
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3433
3810
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3434
3811
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3435
3812
  }, undefined>, v.DescriptionAction<{
3436
3813
  type: "account_closure";
3437
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3814
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3438
3815
  signed: boolean;
3439
3816
  account: {
3440
3817
  type: "account_key";
@@ -3446,12 +3823,12 @@ export declare const contract: {
3446
3823
  resolved_account_id: string | null;
3447
3824
  expires_at: string;
3448
3825
  expires_in_seconds: number;
3449
- id: string;
3450
- resource_server: string;
3451
3826
  note?: {
3452
3827
  value: string;
3453
3828
  editable: boolean;
3454
3829
  } | undefined;
3830
+ id: string;
3831
+ resource_server: string;
3455
3832
  metadata: {
3456
3833
  [x: string]: unknown;
3457
3834
  };