@andco/protocol 0.0.13 → 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 (102) 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/constants.d.ts +15 -2
  10. package/dist/constants.d.ts.map +1 -1
  11. package/dist/constants.js +17 -3
  12. package/dist/errors.d.ts +36 -9
  13. package/dist/errors.d.ts.map +1 -1
  14. package/dist/errors.js +49 -11
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1 -0
  18. package/dist/intent-input.d.ts +431 -872
  19. package/dist/intent-input.d.ts.map +1 -1
  20. package/dist/intent-input.js +142 -121
  21. package/dist/miniapp-icon.js +1 -1
  22. package/dist/miniapp-manifest.d.ts +1 -1
  23. package/dist/native-intent.d.ts +82 -68
  24. package/dist/native-intent.d.ts.map +1 -1
  25. package/dist/native-intent.js +134 -84
  26. package/dist/native.d.ts +1 -1
  27. package/dist/rar/account-matchers.d.ts +35 -30
  28. package/dist/rar/account-matchers.d.ts.map +1 -1
  29. package/dist/rar/account-matchers.js +27 -21
  30. package/dist/rar/bank.d.ts +81 -81
  31. package/dist/rar/bank.js +1 -1
  32. package/dist/rar/catalog.d.ts +48 -48
  33. package/dist/rar/catalog.js +6 -6
  34. package/dist/rar/detail.d.ts +1 -1
  35. package/dist/rar/detail.js +1 -1
  36. package/dist/rar/json-schemas.generated.d.ts +1 -1
  37. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  38. package/dist/rar/json-schemas.generated.js +25 -21
  39. package/dist/rar/subject-data.d.ts +1 -1
  40. package/dist/rar/subject-data.js +1 -1
  41. package/dist/rar/subject.d.ts +1 -1
  42. package/dist/rar/subject.js +1 -1
  43. package/dist/rest/accounts.d.ts +28 -28
  44. package/dist/rest/accounts.d.ts.map +1 -1
  45. package/dist/rest/accounts.js +22 -22
  46. package/dist/rest/api-error.d.ts +1 -1
  47. package/dist/rest/api-error.js +1 -1
  48. package/dist/rest/catalog.d.ts +3 -3
  49. package/dist/rest/catalog.js +2 -2
  50. package/dist/rest/common.d.ts +3 -3
  51. package/dist/rest/common.js +3 -3
  52. package/dist/rest/contract.d.ts +905 -528
  53. package/dist/rest/contract.d.ts.map +1 -1
  54. package/dist/rest/contract.js +17 -5
  55. package/dist/rest/events.d.ts +1 -1
  56. package/dist/rest/events.d.ts.map +1 -1
  57. package/dist/rest/events.js +2 -2
  58. package/dist/rest/identity.d.ts +22 -22
  59. package/dist/rest/identity.js +5 -5
  60. package/dist/rest/index.d.ts +1 -0
  61. package/dist/rest/index.d.ts.map +1 -1
  62. package/dist/rest/index.js +1 -0
  63. package/dist/rest/intents.d.ts +787 -716
  64. package/dist/rest/intents.d.ts.map +1 -1
  65. package/dist/rest/intents.js +62 -53
  66. package/dist/rest/signatures.d.ts +11 -5
  67. package/dist/rest/signatures.d.ts.map +1 -1
  68. package/dist/rest/signatures.js +10 -0
  69. package/dist/rest/subjects.d.ts +1 -1
  70. package/dist/rest/subjects.d.ts.map +1 -1
  71. package/dist/rest/subjects.js +3 -2
  72. package/dist/rest/transfers.d.ts +612 -0
  73. package/dist/rest/transfers.d.ts.map +1 -0
  74. package/dist/rest/transfers.js +115 -0
  75. package/dist/scopes.d.ts +1 -1
  76. package/dist/signing.d.ts +13 -2
  77. package/dist/signing.d.ts.map +1 -1
  78. package/dist/signing.js +13 -0
  79. package/dist/transfer.d.ts +363 -0
  80. package/dist/transfer.d.ts.map +1 -0
  81. package/dist/transfer.js +287 -0
  82. package/dist/transport/financial-events.d.ts +21 -17
  83. package/dist/transport/financial-events.d.ts.map +1 -1
  84. package/dist/transport/generated/oauth-api.d.ts +1017 -194
  85. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  86. package/dist/transport/intents.d.ts +28 -12
  87. package/dist/transport/intents.d.ts.map +1 -1
  88. package/dist/transport/intents.js +1 -1
  89. package/dist/transport/rest.d.ts +4 -4
  90. package/dist/transport/rest.d.ts.map +1 -1
  91. package/dist/transport/rest.js +33 -4
  92. package/dist/urls.d.ts +25 -2
  93. package/dist/urls.d.ts.map +1 -1
  94. package/dist/urls.js +47 -4
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +19 -15
  98. package/dist/webhooks.d.ts.map +1 -1
  99. package/dist/webhooks.js +17 -15
  100. package/dist/window-features.d.ts +2 -2
  101. package/dist/window-features.js +2 -2
  102. package/package.json +2 -2
@@ -18,25 +18,26 @@ export declare const IntentAmountSchema: v.SchemaWithPipe<readonly [v.StrictObje
18
18
  }, "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`.">]>;
19
19
  /**
20
20
  * The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on
21
- * Andco's confirmation screen, and `value` is the initial proposal shown there; the server checks it
22
- * against the Grant's `transactions.minimum` and `transactions.maximum` and the available balance.
23
- * Without `editable` (or with `false`) the amount is locked. What moved is `settled`.
21
+ * AndCo's confirmation screen, and `value` is the initial proposal shown there; the server checks it
22
+ * against the Grant's `transactions.minimum` and `transactions.maximum` and the balance.
23
+ * Without `editable` (or with `false`) the amount is locked. What moved is `settled`. `value` is
24
+ * an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647, as Core's body carries it.
24
25
  *
25
26
  * @example
26
- * const amount = { currency: "CLP", value: "40000", editable: true };
27
+ * const amount = { currency: "CLP", value: 40000, editable: true };
27
28
  */
28
29
  export declare const TransferAmountProposalSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
29
30
  readonly currency: v.LiteralSchema<"CLP", undefined>;
30
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
31
+ 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`.">]>;
31
32
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
32
33
  }, undefined>, v.DescriptionAction<{
33
34
  currency: "CLP";
34
- value: string;
35
+ value: number;
35
36
  editable: boolean;
36
- }, "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`.">]>;
37
+ }, "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`.">]>;
37
38
  /**
38
- * The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing
39
- * left for a person to change, so there is no `editable`.
39
+ * An amount with nothing left for a person to change: the same `{ currency, value }` as a request,
40
+ * without `editable`. It is how an event reports an amount.
40
41
  */
41
42
  export declare const SignedAmountSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
42
43
  readonly currency: v.LiteralSchema<"CLP", undefined>;
@@ -44,54 +45,75 @@ export declare const SignedAmountSchema: v.SchemaWithPipe<readonly [v.StrictObje
44
45
  }, undefined>, v.DescriptionAction<{
45
46
  currency: "CLP";
46
47
  value: string;
47
- }, "The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change.">]>;
48
+ }, "An amount with nothing left for a person to change: the same `{ currency, value }` as a request, without `editable`.">]>;
49
+ /**
50
+ * The comment a transfer asks for, Core's `comment`: at most 60 bytes of UTF-8, which is a rule
51
+ * (`comment_too_long`). `editable: true` lets the person who confirms change it.
52
+ *
53
+ * @example
54
+ * const comment = { value: "Factura 42", editable: true };
55
+ */
56
+ export declare const TransferCommentProposalSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
57
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
58
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
59
+ }, undefined>, v.DescriptionAction<{
60
+ value: string;
61
+ editable: boolean;
62
+ }, "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.">]>;
48
63
  /**
49
- * The bank reference a request asks for. `editable: true` lets the person who confirms change it.
64
+ * The comment a request asks for. `editable: true` lets the person who confirms change it.
50
65
  *
51
66
  * @example
52
67
  * const note = { value: "Factura 42", editable: true };
53
68
  */
54
69
  export declare const IntentNoteSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
55
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
70
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
56
71
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
57
72
  }, undefined>, v.DescriptionAction<{
58
73
  value: string;
59
74
  editable: boolean;
60
- }, "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.">]>;
61
- /** One Andco account of the Grant's subject, named by its Account Key. */
75
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>;
76
+ /** One AndCo account of the Grant's subject, named by its Account Key. */
62
77
  export declare const IntentAccountKeySchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
63
78
  type: v.LiteralSchema<"account_key", undefined>;
64
79
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
65
80
  }, undefined>, v.DescriptionAction<{
66
81
  type: "account_key";
67
82
  accountKey: string;
68
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>;
69
- /** One Andco account, named by its identifier. */
83
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>;
84
+ /** One AndCo account, named by its identifier. */
70
85
  export declare const IntentAccountIdSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
71
86
  type: v.LiteralSchema<"account", undefined>;
72
87
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
73
88
  }, undefined>, v.DescriptionAction<{
74
89
  type: "account";
75
90
  id: string;
76
- }, "One Andco account, named by its identifier.">]>;
77
- /** One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix. */
91
+ }, "One AndCo account, named by its identifier.">]>;
92
+ /**
93
+ * A Receptor at a Chilean bank, in Core's vocabulary: the fields of Core's `receiver` without the
94
+ * amount, which the Intent carries apart. `country` and `national_kind_id` are always declared.
95
+ */
78
96
  export declare const IntentAccountExternalSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
79
97
  type: v.LiteralSchema<"external", undefined>;
80
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
81
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
82
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
83
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
84
- 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`).">]>;
98
+ country: v.LiteralSchema<"CL", undefined>;
99
+ 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`.">]>;
100
+ 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).">]>;
101
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
102
+ 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`).">]>;
103
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
104
+ 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.">]>;
85
105
  }, undefined>, v.DescriptionAction<{
86
106
  type: "external";
87
- bank_id: string;
88
- account_type: "checking" | "debit" | "savings";
89
- account_id: string;
90
- holder_id: string;
91
- holder_name: string;
92
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>;
107
+ country: "CL";
108
+ bank_code: string;
109
+ account_type: "10" | "20" | "40";
110
+ account_number: string;
111
+ name: string;
112
+ national_kind_id: "RUT";
113
+ national_id: string;
114
+ }, "A Receptor at a Chilean bank, in Core's vocabulary (`receiver` without the amount): the four-digit `bank_code` (Andco is `0739`), the `account_type` code (`\"10\"` savings, `\"20\"` checking, `\"40\"` debit), the `account_number`, and the holder's `name` and RUT. `country` and `national_kind_id` are always declared. It carries every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>;
93
115
  /**
94
- * One Andco account of the Grant's subject, named by Account Key or by identifier: where a
116
+ * One AndCo account of the Grant's subject, named by Account Key or by identifier: where a
95
117
  * transfer's money leaves from, where a deposit lands, and the account a closure closes.
96
118
  *
97
119
  * @example
@@ -103,68 +125,72 @@ export declare const IntentAccountSchema: v.SchemaWithPipe<readonly [v.VariantSc
103
125
  }, undefined>, v.DescriptionAction<{
104
126
  type: "account_key";
105
127
  accountKey: string;
106
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
128
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
107
129
  type: v.LiteralSchema<"account", undefined>;
108
130
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
109
131
  }, undefined>, v.DescriptionAction<{
110
132
  type: "account";
111
133
  id: string;
112
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
134
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
113
135
  type: "account_key";
114
136
  accountKey: string;
115
137
  } | {
116
138
  type: "account";
117
139
  id: string;
118
- }, "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.">]>;
140
+ }, "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.">]>;
119
141
  declare const andcoAccount: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
120
142
  type: v.LiteralSchema<"account_key", undefined>;
121
143
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
122
144
  }, undefined>, v.DescriptionAction<{
123
145
  type: "account_key";
124
146
  accountKey: string;
125
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
147
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
126
148
  type: v.LiteralSchema<"account", undefined>;
127
149
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
128
150
  }, undefined>, v.DescriptionAction<{
129
151
  type: "account";
130
152
  id: string;
131
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
153
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
132
154
  type: "account_key";
133
155
  accountKey: string;
134
156
  } | {
135
157
  type: "account";
136
158
  id: string;
137
- }, "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.">]>;
138
- /** One Andco account named by Account Key or by identifier, exactly as an Intent carries it. */
159
+ }, "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.">]>;
160
+ /** One AndCo account named by Account Key or by identifier, exactly as an Intent carries it. */
139
161
  export type IntentAccount = v.InferOutput<typeof andcoAccount>;
140
- /** Where a signed transfer's money lands: nothing on this path is left for a person to complete. */
141
- export declare const TransferDestinationSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
162
+ /** The Receptor of a transfer, with nothing left to complete: how an event reports it. */
163
+ export declare const TransferIntentReceiverSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
142
164
  type: v.LiteralSchema<"account_key", undefined>;
143
165
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
144
166
  }, undefined>, v.DescriptionAction<{
145
167
  type: "account_key";
146
168
  accountKey: string;
147
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
169
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
148
170
  type: v.LiteralSchema<"account", undefined>;
149
171
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
150
172
  }, undefined>, v.DescriptionAction<{
151
173
  type: "account";
152
174
  id: string;
153
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
175
+ }, "One AndCo account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
154
176
  type: v.LiteralSchema<"external", undefined>;
155
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
156
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
157
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
158
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
159
- 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`).">]>;
177
+ country: v.LiteralSchema<"CL", undefined>;
178
+ 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`.">]>;
179
+ 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).">]>;
180
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
181
+ 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`).">]>;
182
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
183
+ 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.">]>;
160
184
  }, undefined>, v.DescriptionAction<{
161
185
  type: "external";
162
- bank_id: string;
163
- account_type: "checking" | "debit" | "savings";
164
- account_id: string;
165
- holder_id: string;
166
- holder_name: string;
167
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
186
+ country: "CL";
187
+ bank_code: string;
188
+ account_type: "10" | "20" | "40";
189
+ account_number: string;
190
+ name: string;
191
+ national_kind_id: "RUT";
192
+ national_id: string;
193
+ }, "A Receptor at a Chilean bank, in Core's vocabulary (`receiver` without the amount): the four-digit `bank_code` (Andco is `0739`), the `account_type` code (`\"10\"` savings, `\"20\"` checking, `\"40\"` debit), the `account_number`, and the holder's `name` and RUT. `country` and `national_kind_id` are always declared. It carries every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
168
194
  type: "account_key";
169
195
  accountKey: string;
170
196
  } | {
@@ -172,53 +198,15 @@ export declare const TransferDestinationSchema: v.SchemaWithPipe<readonly [v.Var
172
198
  id: string;
173
199
  } | {
174
200
  type: "external";
175
- bank_id: string;
176
- account_type: "checking" | "debit" | "savings";
177
- account_id: string;
178
- holder_id: string;
179
- holder_name: string;
180
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
181
- declare const signedTransferDestination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
182
- type: v.LiteralSchema<"account_key", undefined>;
183
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
184
- }, undefined>, v.DescriptionAction<{
185
- type: "account_key";
186
- accountKey: string;
187
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
188
- type: v.LiteralSchema<"account", undefined>;
189
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
190
- }, undefined>, v.DescriptionAction<{
191
- type: "account";
192
- id: string;
193
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
194
- type: v.LiteralSchema<"external", undefined>;
195
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
196
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
197
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
198
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
199
- 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`).">]>;
200
- }, undefined>, v.DescriptionAction<{
201
- type: "external";
202
- bank_id: string;
203
- account_type: "checking" | "debit" | "savings";
204
- account_id: string;
205
- holder_id: string;
206
- holder_name: string;
207
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
208
- type: "account_key";
209
- accountKey: string;
210
- } | {
211
- type: "account";
212
- id: string;
213
- } | {
214
- 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
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
221
- export declare const TransferDestinationProposalSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
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, in the `bank_transfer` matcher vocabulary: an AndCo account by AccountKey or identifier, or a Receptor at a Chilean bank in Core's vocabulary.">]>;
209
+ export declare const TransferIntentReceiverProposalSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
222
210
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
223
211
  readonly type: v.LiteralSchema<"account_key", undefined>;
224
212
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -229,11 +217,13 @@ export declare const TransferDestinationProposalSchema: v.SchemaWithPipe<readonl
229
217
  }, undefined>, v.StrictObjectSchema<{
230
218
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
231
219
  readonly type: v.LiteralSchema<"external", undefined>;
232
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
233
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
234
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
235
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
236
- 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`).">]>;
220
+ readonly country: v.LiteralSchema<"CL", undefined>;
221
+ 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`.">]>;
222
+ 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).">]>;
223
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
224
+ 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`).">]>;
225
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
226
+ 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.">]>;
237
227
  }, undefined>], undefined>, v.DescriptionAction<{
238
228
  editable: false;
239
229
  type: "account_key";
@@ -245,14 +235,16 @@ export declare const TransferDestinationProposalSchema: v.SchemaWithPipe<readonl
245
235
  } | {
246
236
  editable: false;
247
237
  type: "external";
248
- bank_id: string;
249
- account_type: "checking" | "debit" | "savings";
250
- account_id: string;
251
- holder_id: string;
252
- holder_name: string;
253
- }, "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.">]>;
254
- /** One account a transfer names, exactly as a signed instruction carries it. */
255
- export type TransferAccount = v.InferOutput<typeof signedTransferDestination>;
238
+ country: "CL";
239
+ bank_code: string;
240
+ account_type: "10" | "20" | "40";
241
+ account_number: string;
242
+ name: string;
243
+ national_kind_id: "RUT";
244
+ national_id: string;
245
+ }, "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.">]>;
246
+ /** One account a transfer names, with nothing left to complete. */
247
+ export type TransferAccount = v.InferOutput<typeof TransferIntentReceiverSchema>;
256
248
  /** Validates fixed-duration syntax without anchoring it to a changing clock. */
257
249
  export declare function isIntentDuration(value: string): boolean;
258
250
  /** Validates a real ISO calendar datetime with a timezone; past dates remain valid for idempotent replay. */
@@ -266,19 +258,19 @@ export declare const DepositIntentCreateSchema: v.SchemaWithPipe<readonly [v.Var
266
258
  }, undefined>, v.DescriptionAction<{
267
259
  type: "account_key";
268
260
  accountKey: string;
269
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
261
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
270
262
  type: v.LiteralSchema<"account", undefined>;
271
263
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
272
264
  }, undefined>, v.DescriptionAction<{
273
265
  type: "account";
274
266
  id: string;
275
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
267
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
276
268
  type: "account_key";
277
269
  accountKey: string;
278
270
  } | {
279
271
  type: "account";
280
272
  id: string;
281
- }, "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<{
273
+ }, "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<{
282
274
  type: "account_key";
283
275
  accountKey: string;
284
276
  } | {
@@ -295,12 +287,12 @@ export declare const DepositIntentCreateSchema: v.SchemaWithPipe<readonly [v.Var
295
287
  editable: boolean;
296
288
  }, "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>;
297
289
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
298
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
290
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
299
291
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
300
292
  }, undefined>, v.DescriptionAction<{
301
293
  value: string;
302
294
  editable: boolean;
303
- }, "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>;
295
+ }, "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>;
304
296
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
305
297
  } & {
306
298
  readonly expires_in: v.StringSchema<undefined>;
@@ -313,19 +305,19 @@ export declare const DepositIntentCreateSchema: v.SchemaWithPipe<readonly [v.Var
313
305
  }, undefined>, v.DescriptionAction<{
314
306
  type: "account_key";
315
307
  accountKey: string;
316
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
308
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
317
309
  type: v.LiteralSchema<"account", undefined>;
318
310
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
319
311
  }, undefined>, v.DescriptionAction<{
320
312
  type: "account";
321
313
  id: string;
322
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
314
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
323
315
  type: "account_key";
324
316
  accountKey: string;
325
317
  } | {
326
318
  type: "account";
327
319
  id: string;
328
- }, "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<{
320
+ }, "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<{
329
321
  type: "account_key";
330
322
  accountKey: string;
331
323
  } | {
@@ -342,12 +334,12 @@ export declare const DepositIntentCreateSchema: v.SchemaWithPipe<readonly [v.Var
342
334
  editable: boolean;
343
335
  }, "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>;
344
336
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
345
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
337
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
346
338
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
347
339
  }, undefined>, v.DescriptionAction<{
348
340
  value: string;
349
341
  editable: boolean;
350
- }, "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>;
342
+ }, "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>;
351
343
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
352
344
  } & {
353
345
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -401,42 +393,43 @@ export declare const DepositIntentCreateSchema: v.SchemaWithPipe<readonly [v.Var
401
393
  }, "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.">]>;
402
394
  /** A proposal to move money, born waiting for an Approval. See {@link IntentCreateSchema}. */
403
395
  export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
396
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
404
397
  readonly type: v.LiteralSchema<"transfer", undefined>;
405
398
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
406
399
  readonly currency: v.LiteralSchema<"CLP", undefined>;
407
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
400
+ 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`.">]>;
408
401
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
409
402
  }, undefined>, v.DescriptionAction<{
410
403
  currency: "CLP";
411
- value: string;
404
+ value: number;
412
405
  editable: boolean;
413
- }, "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`.">]>;
414
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
406
+ }, "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`.">]>;
407
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
415
408
  type: v.LiteralSchema<"account_key", undefined>;
416
409
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
417
410
  }, undefined>, v.DescriptionAction<{
418
411
  type: "account_key";
419
412
  accountKey: string;
420
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
413
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
421
414
  type: v.LiteralSchema<"account", undefined>;
422
415
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
423
416
  }, undefined>, v.DescriptionAction<{
424
417
  type: "account";
425
418
  id: string;
426
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
419
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
427
420
  type: "account_key";
428
421
  accountKey: string;
429
422
  } | {
430
423
  type: "account";
431
424
  id: string;
432
- }, "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<{
425
+ }, "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<{
433
426
  type: "account_key";
434
427
  accountKey: string;
435
428
  } | {
436
429
  type: "account";
437
430
  id: string;
438
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
439
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
431
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
432
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
440
433
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
441
434
  readonly type: v.LiteralSchema<"account_key", undefined>;
442
435
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -447,11 +440,13 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
447
440
  }, undefined>, v.StrictObjectSchema<{
448
441
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
449
442
  readonly type: v.LiteralSchema<"external", undefined>;
450
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
451
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
452
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
453
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
454
- 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`).">]>;
443
+ readonly country: v.LiteralSchema<"CL", undefined>;
444
+ 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`.">]>;
445
+ 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).">]>;
446
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
447
+ 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`).">]>;
448
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
449
+ 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.">]>;
455
450
  }, undefined>], undefined>, v.DescriptionAction<{
456
451
  editable: false;
457
452
  type: "account_key";
@@ -463,12 +458,14 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
463
458
  } | {
464
459
  editable: false;
465
460
  type: "external";
466
- bank_id: string;
467
- account_type: "checking" | "debit" | "savings";
468
- account_id: string;
469
- holder_id: string;
470
- holder_name: string;
471
- }, "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<{
461
+ country: "CL";
462
+ bank_code: string;
463
+ account_type: "10" | "20" | "40";
464
+ account_number: string;
465
+ name: string;
466
+ national_kind_id: "RUT";
467
+ national_id: string;
468
+ }, "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<{
472
469
  editable: false;
473
470
  type: "account_key";
474
471
  accountKey: string;
@@ -479,60 +476,62 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
479
476
  } | {
480
477
  editable: false;
481
478
  type: "external";
482
- bank_id: string;
483
- account_type: "checking" | "debit" | "savings";
484
- account_id: string;
485
- holder_id: string;
486
- holder_name: string;
487
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
488
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
489
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
479
+ country: "CL";
480
+ bank_code: string;
481
+ account_type: "10" | "20" | "40";
482
+ account_number: string;
483
+ name: string;
484
+ national_kind_id: "RUT";
485
+ national_id: string;
486
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
487
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
488
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
490
489
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
491
490
  }, undefined>, v.DescriptionAction<{
492
491
  value: string;
493
492
  editable: boolean;
494
- }, "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>;
495
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
493
+ }, "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>;
496
494
  } & {
497
495
  readonly expires_in: v.StringSchema<undefined>;
498
496
  readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
499
497
  }, undefined>, v.StrictObjectSchema<{
498
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
500
499
  readonly type: v.LiteralSchema<"transfer", undefined>;
501
500
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
502
501
  readonly currency: v.LiteralSchema<"CLP", undefined>;
503
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
502
+ 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`.">]>;
504
503
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
505
504
  }, undefined>, v.DescriptionAction<{
506
505
  currency: "CLP";
507
- value: string;
506
+ value: number;
508
507
  editable: boolean;
509
- }, "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`.">]>;
510
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
508
+ }, "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`.">]>;
509
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
511
510
  type: v.LiteralSchema<"account_key", undefined>;
512
511
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
513
512
  }, undefined>, v.DescriptionAction<{
514
513
  type: "account_key";
515
514
  accountKey: string;
516
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
515
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
517
516
  type: v.LiteralSchema<"account", undefined>;
518
517
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
519
518
  }, undefined>, v.DescriptionAction<{
520
519
  type: "account";
521
520
  id: string;
522
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
521
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
523
522
  type: "account_key";
524
523
  accountKey: string;
525
524
  } | {
526
525
  type: "account";
527
526
  id: string;
528
- }, "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<{
527
+ }, "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<{
529
528
  type: "account_key";
530
529
  accountKey: string;
531
530
  } | {
532
531
  type: "account";
533
532
  id: string;
534
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
535
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
533
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
534
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
536
535
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
537
536
  readonly type: v.LiteralSchema<"account_key", undefined>;
538
537
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -543,11 +542,13 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
543
542
  }, undefined>, v.StrictObjectSchema<{
544
543
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
545
544
  readonly type: v.LiteralSchema<"external", undefined>;
546
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
547
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
548
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
549
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
550
- 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`).">]>;
545
+ readonly country: v.LiteralSchema<"CL", undefined>;
546
+ 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`.">]>;
547
+ 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).">]>;
548
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
549
+ 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`).">]>;
550
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
551
+ 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.">]>;
551
552
  }, undefined>], undefined>, v.DescriptionAction<{
552
553
  editable: false;
553
554
  type: "account_key";
@@ -559,12 +560,14 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
559
560
  } | {
560
561
  editable: false;
561
562
  type: "external";
562
- bank_id: string;
563
- account_type: "checking" | "debit" | "savings";
564
- account_id: string;
565
- holder_id: string;
566
- holder_name: string;
567
- }, "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<{
563
+ country: "CL";
564
+ bank_code: string;
565
+ account_type: "10" | "20" | "40";
566
+ account_number: string;
567
+ name: string;
568
+ national_kind_id: "RUT";
569
+ national_id: string;
570
+ }, "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<{
568
571
  editable: false;
569
572
  type: "account_key";
570
573
  accountKey: string;
@@ -575,38 +578,42 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
575
578
  } | {
576
579
  editable: false;
577
580
  type: "external";
578
- bank_id: string;
579
- account_type: "checking" | "debit" | "savings";
580
- account_id: string;
581
- holder_id: string;
582
- holder_name: string;
583
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
584
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
585
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
581
+ country: "CL";
582
+ bank_code: string;
583
+ account_type: "10" | "20" | "40";
584
+ account_number: string;
585
+ name: string;
586
+ national_kind_id: "RUT";
587
+ national_id: string;
588
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
589
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
590
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
586
591
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
587
592
  }, undefined>, v.DescriptionAction<{
588
593
  value: string;
589
594
  editable: boolean;
590
- }, "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>;
591
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
595
+ }, "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>;
592
596
  } & {
593
597
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
594
598
  readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
595
599
  }, undefined>], undefined>, v.DescriptionAction<{
600
+ metadata: {
601
+ [x: string]: unknown;
602
+ };
596
603
  type: "transfer";
597
604
  amount: {
598
605
  currency: "CLP";
599
- value: string;
606
+ value: number;
600
607
  editable: boolean;
601
608
  };
602
- source: {
609
+ sender: {
603
610
  type: "account_key";
604
611
  accountKey: string;
605
612
  } | {
606
613
  type: "account";
607
614
  id: string;
608
615
  } | null;
609
- destination: {
616
+ receiver: {
610
617
  editable: false;
611
618
  type: "account_key";
612
619
  accountKey: string;
@@ -617,36 +624,38 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
617
624
  } | {
618
625
  editable: false;
619
626
  type: "external";
620
- bank_id: string;
621
- account_type: "checking" | "debit" | "savings";
622
- account_id: string;
623
- holder_id: string;
624
- holder_name: string;
627
+ country: "CL";
628
+ bank_code: string;
629
+ account_type: "10" | "20" | "40";
630
+ account_number: string;
631
+ name: string;
632
+ national_kind_id: "RUT";
633
+ national_id: string;
625
634
  } | null;
626
- note?: {
635
+ comment?: {
627
636
  value: string;
628
637
  editable: boolean;
629
638
  } | undefined;
630
- metadata: {
631
- [x: string]: unknown;
632
- };
633
639
  expires_in: string;
634
640
  expires_at?: undefined;
635
641
  } | {
642
+ metadata: {
643
+ [x: string]: unknown;
644
+ };
636
645
  type: "transfer";
637
646
  amount: {
638
647
  currency: "CLP";
639
- value: string;
648
+ value: number;
640
649
  editable: boolean;
641
650
  };
642
- source: {
651
+ sender: {
643
652
  type: "account_key";
644
653
  accountKey: string;
645
654
  } | {
646
655
  type: "account";
647
656
  id: string;
648
657
  } | null;
649
- destination: {
658
+ receiver: {
650
659
  editable: false;
651
660
  type: "account_key";
652
661
  accountKey: string;
@@ -657,35 +666,34 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
657
666
  } | {
658
667
  editable: false;
659
668
  type: "external";
660
- bank_id: string;
661
- account_type: "checking" | "debit" | "savings";
662
- account_id: string;
663
- holder_id: string;
664
- holder_name: string;
669
+ country: "CL";
670
+ bank_code: string;
671
+ account_type: "10" | "20" | "40";
672
+ account_number: string;
673
+ name: string;
674
+ national_kind_id: "RUT";
675
+ national_id: string;
665
676
  } | null;
666
- note?: {
677
+ comment?: {
667
678
  value: string;
668
679
  editable: boolean;
669
680
  } | undefined;
670
- metadata: {
671
- [x: string]: unknown;
672
- };
673
681
  expires_in?: undefined;
674
682
  expires_at: string | null;
675
- }, "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.">]>;
676
- /** A proposal to open a Cuenta Vista, born waiting for an Approval. See {@link IntentCreateSchema}. */
683
+ }, "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`.">]>;
684
+ /** A proposal to open a cuenta digital, born waiting for an Approval. See {@link IntentCreateSchema}. */
677
685
  export declare const AccountOpeningIntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
678
686
  readonly type: v.LiteralSchema<"account_opening", undefined>;
679
687
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
680
688
  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.">]>;
681
689
  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.">]>;
682
690
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
683
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
691
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
684
692
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
685
693
  }, undefined>, v.DescriptionAction<{
686
694
  value: string;
687
695
  editable: boolean;
688
- }, "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>;
696
+ }, "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>;
689
697
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
690
698
  } & {
691
699
  readonly expires_in: v.StringSchema<undefined>;
@@ -696,12 +704,12 @@ export declare const AccountOpeningIntentCreateSchema: v.SchemaWithPipe<readonly
696
704
  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.">]>;
697
705
  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.">]>;
698
706
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
699
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
707
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
700
708
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
701
709
  }, undefined>, v.DescriptionAction<{
702
710
  value: string;
703
711
  editable: boolean;
704
- }, "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>;
712
+ }, "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>;
705
713
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
706
714
  } & {
707
715
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -734,8 +742,8 @@ export declare const AccountOpeningIntentCreateSchema: v.SchemaWithPipe<readonly
734
742
  };
735
743
  expires_in?: undefined;
736
744
  expires_at: string | null;
737
- }, "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.">]>;
738
- /** A proposal to close a Cuenta Vista, born waiting for an Approval. See {@link IntentCreateSchema}. */
745
+ }, "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.">]>;
746
+ /** A proposal to close a cuenta digital, born waiting for an Approval. See {@link IntentCreateSchema}. */
739
747
  export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
740
748
  readonly type: v.LiteralSchema<"account_closure", undefined>;
741
749
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -744,26 +752,26 @@ export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly
744
752
  }, undefined>, v.DescriptionAction<{
745
753
  type: "account_key";
746
754
  accountKey: string;
747
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
755
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
748
756
  type: v.LiteralSchema<"account", undefined>;
749
757
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
750
758
  }, undefined>, v.DescriptionAction<{
751
759
  type: "account";
752
760
  id: string;
753
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
761
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
754
762
  type: "account_key";
755
763
  accountKey: string;
756
764
  } | {
757
765
  type: "account";
758
766
  id: string;
759
- }, "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.">]>;
767
+ }, "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.">]>;
760
768
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
761
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
769
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
762
770
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
763
771
  }, undefined>, v.DescriptionAction<{
764
772
  value: string;
765
773
  editable: boolean;
766
- }, "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>;
774
+ }, "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>;
767
775
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
768
776
  } & {
769
777
  readonly expires_in: v.StringSchema<undefined>;
@@ -776,26 +784,26 @@ export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly
776
784
  }, undefined>, v.DescriptionAction<{
777
785
  type: "account_key";
778
786
  accountKey: string;
779
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
787
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
780
788
  type: v.LiteralSchema<"account", undefined>;
781
789
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
782
790
  }, undefined>, v.DescriptionAction<{
783
791
  type: "account";
784
792
  id: string;
785
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
793
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
786
794
  type: "account_key";
787
795
  accountKey: string;
788
796
  } | {
789
797
  type: "account";
790
798
  id: string;
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.">]>;
799
+ }, "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.">]>;
792
800
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
793
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
801
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
794
802
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
795
803
  }, undefined>, v.DescriptionAction<{
796
804
  value: string;
797
805
  editable: boolean;
798
- }, "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>;
806
+ }, "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>;
799
807
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
800
808
  } & {
801
809
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -836,7 +844,7 @@ export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly
836
844
  };
837
845
  expires_in?: undefined;
838
846
  expires_at: string;
839
- }, "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.">]>;
847
+ }, "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.">]>;
840
848
  /**
841
849
  * Public creation validation shared by the API and SDK. SQL resolves deadlines and enforces authorization.
842
850
  *
@@ -846,33 +854,33 @@ export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly
846
854
  * on purpose — when signed and unsigned members share an object, something eventually reads the
847
855
  * wrong ones.
848
856
  *
849
- * `transfer` is the only way money movement is expressed: money leaving an account towards a
850
- * `destination`, both named in the `bank_transfer` matcher vocabulary (`account_key`, `account`,
851
- * `external`). A null `source` is the confirmation screen's source picker, and a null `destination` is
852
- * the screen's destination form: the person completes where the money goes (another bank's account, or
853
- * another Andco customer's), and the server checks what she wrote against the Grant's `destinations`
854
- * when she confirms. Both are the screen's when omitted. A destination the request does name is locked
857
+ * `transfer` is the only way money movement is expressed: money leaving a `sender` account towards a
858
+ * `receiver`, both named in the `bank_transfer` matcher vocabulary (`account_key`, `account`,
859
+ * `external`, whose Receptor speaks Core's vocabulary). A null `sender` is the confirmation screen's
860
+ * source picker, and a null `receiver` is the screen's receiver form: the person completes where the
861
+ * money goes (another bank's account, or another AndCo customer's), and the server checks what she
862
+ * wrote against the Grant's `destinations` when she confirms. Both are the screen's when omitted. A
863
+ * Receptor the request does name is locked
855
864
  * there (`editable: true` is refused), and so is the amount unless it says `editable: true`, in which
856
865
  * case the person sets it. Who may approve the Intent without a person belongs to the Grant, never to
857
866
  * the operation itself.
858
867
  *
859
868
  * @example
860
869
  * parseIntentInput({
861
- * type: "transfer", expires_in: "30 minutes", source: null,
862
- * destination: { type: "account_key", accountKey: "proveedores" },
863
- * amount: { currency: "CLP", value: "40000" },
864
- * note: { value: "Factura 42", editable: true },
870
+ * type: "transfer", expires_in: "30 minutes", sender: null,
871
+ * receiver: { type: "account_key", accountKey: "proveedores" },
872
+ * amount: { currency: "CLP", value: 40000 },
873
+ * comment: { value: "Factura 42", editable: true },
865
874
  * });
866
875
  *
867
876
  * @example
868
- * // The person picks both accounts on Andco's confirmation screen.
877
+ * // The person picks both accounts on AndCo's confirmation screen.
869
878
  * parseIntentInput({
870
- * type: "transfer", expires_in: "30 minutes", source: null, destination: null,
871
- * amount: { currency: "CLP", value: "40000", editable: true },
879
+ * type: "transfer", expires_in: "30 minutes", sender: null, receiver: null,
880
+ * amount: { currency: "CLP", value: 40000, editable: true },
872
881
  * });
873
882
  *
874
- * `account_opening` is here for the same reason money movement is: everything with banking
875
- * consequence happens through an Intent, so `/accounts` has no `POST`. It carries no amount, no
883
+ * `account_opening` is here for the same reason money movement is: everything that changes an account * consequence happens through an Intent, so `/accounts` has no `POST`. It carries no amount, no
876
884
  * source and no destination — only the name the account will answer to, and whether naming one that
877
885
  * already exists is an error or a request for the account that is already there.
878
886
  */
@@ -884,19 +892,19 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
884
892
  }, undefined>, v.DescriptionAction<{
885
893
  type: "account_key";
886
894
  accountKey: string;
887
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
895
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
888
896
  type: v.LiteralSchema<"account", undefined>;
889
897
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
890
898
  }, undefined>, v.DescriptionAction<{
891
899
  type: "account";
892
900
  id: string;
893
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
901
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
894
902
  type: "account_key";
895
903
  accountKey: string;
896
904
  } | {
897
905
  type: "account";
898
906
  id: string;
899
- }, "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<{
907
+ }, "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<{
900
908
  type: "account_key";
901
909
  accountKey: string;
902
910
  } | {
@@ -913,12 +921,12 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
913
921
  editable: boolean;
914
922
  }, "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>;
915
923
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
916
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
924
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
917
925
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
918
926
  }, undefined>, v.DescriptionAction<{
919
927
  value: string;
920
928
  editable: boolean;
921
- }, "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>;
929
+ }, "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>;
922
930
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
923
931
  } & {
924
932
  readonly expires_in: v.StringSchema<undefined>;
@@ -931,19 +939,19 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
931
939
  }, undefined>, v.DescriptionAction<{
932
940
  type: "account_key";
933
941
  accountKey: string;
934
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
942
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
935
943
  type: v.LiteralSchema<"account", undefined>;
936
944
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
937
945
  }, undefined>, v.DescriptionAction<{
938
946
  type: "account";
939
947
  id: string;
940
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
948
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
941
949
  type: "account_key";
942
950
  accountKey: string;
943
951
  } | {
944
952
  type: "account";
945
953
  id: string;
946
- }, "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<{
954
+ }, "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<{
947
955
  type: "account_key";
948
956
  accountKey: string;
949
957
  } | {
@@ -960,12 +968,12 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
960
968
  editable: boolean;
961
969
  }, "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>;
962
970
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
963
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
971
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
964
972
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
965
973
  }, undefined>, v.DescriptionAction<{
966
974
  value: string;
967
975
  editable: boolean;
968
- }, "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>;
976
+ }, "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>;
969
977
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
970
978
  } & {
971
979
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -1017,42 +1025,43 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1017
1025
  expires_in?: undefined;
1018
1026
  expires_at: string | null;
1019
1027
  }, "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<{
1028
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1020
1029
  readonly type: v.LiteralSchema<"transfer", undefined>;
1021
1030
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1022
1031
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1023
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1032
+ 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`.">]>;
1024
1033
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1025
1034
  }, undefined>, v.DescriptionAction<{
1026
1035
  currency: "CLP";
1027
- value: string;
1036
+ value: number;
1028
1037
  editable: boolean;
1029
- }, "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`.">]>;
1030
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1038
+ }, "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`.">]>;
1039
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1031
1040
  type: v.LiteralSchema<"account_key", undefined>;
1032
1041
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1033
1042
  }, undefined>, v.DescriptionAction<{
1034
1043
  type: "account_key";
1035
1044
  accountKey: string;
1036
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1045
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1037
1046
  type: v.LiteralSchema<"account", undefined>;
1038
1047
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1039
1048
  }, undefined>, v.DescriptionAction<{
1040
1049
  type: "account";
1041
1050
  id: string;
1042
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1051
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1043
1052
  type: "account_key";
1044
1053
  accountKey: string;
1045
1054
  } | {
1046
1055
  type: "account";
1047
1056
  id: string;
1048
- }, "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<{
1057
+ }, "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<{
1049
1058
  type: "account_key";
1050
1059
  accountKey: string;
1051
1060
  } | {
1052
1061
  type: "account";
1053
1062
  id: string;
1054
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
1055
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1063
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
1064
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1056
1065
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1057
1066
  readonly type: v.LiteralSchema<"account_key", undefined>;
1058
1067
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1063,11 +1072,13 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1063
1072
  }, undefined>, v.StrictObjectSchema<{
1064
1073
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1065
1074
  readonly type: v.LiteralSchema<"external", undefined>;
1066
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1067
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1068
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1069
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1070
- 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`).">]>;
1075
+ readonly country: v.LiteralSchema<"CL", undefined>;
1076
+ 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`.">]>;
1077
+ 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).">]>;
1078
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1079
+ 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`).">]>;
1080
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1081
+ 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.">]>;
1071
1082
  }, undefined>], undefined>, v.DescriptionAction<{
1072
1083
  editable: false;
1073
1084
  type: "account_key";
@@ -1079,12 +1090,14 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1079
1090
  } | {
1080
1091
  editable: false;
1081
1092
  type: "external";
1082
- bank_id: string;
1083
- account_type: "checking" | "debit" | "savings";
1084
- account_id: string;
1085
- holder_id: string;
1086
- holder_name: string;
1087
- }, "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<{
1093
+ country: "CL";
1094
+ bank_code: string;
1095
+ account_type: "10" | "20" | "40";
1096
+ account_number: string;
1097
+ name: string;
1098
+ national_kind_id: "RUT";
1099
+ national_id: string;
1100
+ }, "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<{
1088
1101
  editable: false;
1089
1102
  type: "account_key";
1090
1103
  accountKey: string;
@@ -1095,60 +1108,62 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1095
1108
  } | {
1096
1109
  editable: false;
1097
1110
  type: "external";
1098
- bank_id: string;
1099
- account_type: "checking" | "debit" | "savings";
1100
- account_id: string;
1101
- holder_id: string;
1102
- holder_name: string;
1103
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1104
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1105
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1111
+ country: "CL";
1112
+ bank_code: string;
1113
+ account_type: "10" | "20" | "40";
1114
+ account_number: string;
1115
+ name: string;
1116
+ national_kind_id: "RUT";
1117
+ national_id: string;
1118
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1119
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1120
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1106
1121
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1107
1122
  }, undefined>, v.DescriptionAction<{
1108
1123
  value: string;
1109
1124
  editable: boolean;
1110
- }, "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>;
1111
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1125
+ }, "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>;
1112
1126
  } & {
1113
1127
  readonly expires_in: v.StringSchema<undefined>;
1114
1128
  readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1115
1129
  }, undefined>, v.StrictObjectSchema<{
1130
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1116
1131
  readonly type: v.LiteralSchema<"transfer", undefined>;
1117
1132
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1118
1133
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1119
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1134
+ 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`.">]>;
1120
1135
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1121
1136
  }, undefined>, v.DescriptionAction<{
1122
1137
  currency: "CLP";
1123
- value: string;
1138
+ value: number;
1124
1139
  editable: boolean;
1125
- }, "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`.">]>;
1126
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1140
+ }, "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`.">]>;
1141
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1127
1142
  type: v.LiteralSchema<"account_key", undefined>;
1128
1143
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1129
1144
  }, undefined>, v.DescriptionAction<{
1130
1145
  type: "account_key";
1131
1146
  accountKey: string;
1132
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1147
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1133
1148
  type: v.LiteralSchema<"account", undefined>;
1134
1149
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1135
1150
  }, undefined>, v.DescriptionAction<{
1136
1151
  type: "account";
1137
1152
  id: string;
1138
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1153
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1139
1154
  type: "account_key";
1140
1155
  accountKey: string;
1141
1156
  } | {
1142
1157
  type: "account";
1143
1158
  id: string;
1144
- }, "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<{
1159
+ }, "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<{
1145
1160
  type: "account_key";
1146
1161
  accountKey: string;
1147
1162
  } | {
1148
1163
  type: "account";
1149
1164
  id: string;
1150
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
1151
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1165
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
1166
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1152
1167
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1153
1168
  readonly type: v.LiteralSchema<"account_key", undefined>;
1154
1169
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1159,11 +1174,13 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1159
1174
  }, undefined>, v.StrictObjectSchema<{
1160
1175
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1161
1176
  readonly type: v.LiteralSchema<"external", undefined>;
1162
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1163
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1164
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1165
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1166
- 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`).">]>;
1177
+ readonly country: v.LiteralSchema<"CL", undefined>;
1178
+ 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`.">]>;
1179
+ 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).">]>;
1180
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1181
+ 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`).">]>;
1182
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1183
+ 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.">]>;
1167
1184
  }, undefined>], undefined>, v.DescriptionAction<{
1168
1185
  editable: false;
1169
1186
  type: "account_key";
@@ -1175,12 +1192,14 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1175
1192
  } | {
1176
1193
  editable: false;
1177
1194
  type: "external";
1178
- bank_id: string;
1179
- account_type: "checking" | "debit" | "savings";
1180
- account_id: string;
1181
- holder_id: string;
1182
- holder_name: string;
1183
- }, "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<{
1195
+ country: "CL";
1196
+ bank_code: string;
1197
+ account_type: "10" | "20" | "40";
1198
+ account_number: string;
1199
+ name: string;
1200
+ national_kind_id: "RUT";
1201
+ national_id: string;
1202
+ }, "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<{
1184
1203
  editable: false;
1185
1204
  type: "account_key";
1186
1205
  accountKey: string;
@@ -1191,38 +1210,42 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1191
1210
  } | {
1192
1211
  editable: false;
1193
1212
  type: "external";
1194
- bank_id: string;
1195
- account_type: "checking" | "debit" | "savings";
1196
- account_id: string;
1197
- holder_id: string;
1198
- holder_name: string;
1199
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1200
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1201
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1213
+ country: "CL";
1214
+ bank_code: string;
1215
+ account_type: "10" | "20" | "40";
1216
+ account_number: string;
1217
+ name: string;
1218
+ national_kind_id: "RUT";
1219
+ national_id: string;
1220
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
1221
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1222
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1202
1223
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1203
1224
  }, undefined>, v.DescriptionAction<{
1204
1225
  value: string;
1205
1226
  editable: boolean;
1206
- }, "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>;
1207
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1227
+ }, "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>;
1208
1228
  } & {
1209
1229
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1210
1230
  readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1211
1231
  }, undefined>], undefined>, v.DescriptionAction<{
1232
+ metadata: {
1233
+ [x: string]: unknown;
1234
+ };
1212
1235
  type: "transfer";
1213
1236
  amount: {
1214
1237
  currency: "CLP";
1215
- value: string;
1238
+ value: number;
1216
1239
  editable: boolean;
1217
1240
  };
1218
- source: {
1241
+ sender: {
1219
1242
  type: "account_key";
1220
1243
  accountKey: string;
1221
1244
  } | {
1222
1245
  type: "account";
1223
1246
  id: string;
1224
1247
  } | null;
1225
- destination: {
1248
+ receiver: {
1226
1249
  editable: false;
1227
1250
  type: "account_key";
1228
1251
  accountKey: string;
@@ -1233,36 +1256,38 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1233
1256
  } | {
1234
1257
  editable: false;
1235
1258
  type: "external";
1236
- bank_id: string;
1237
- account_type: "checking" | "debit" | "savings";
1238
- account_id: string;
1239
- holder_id: string;
1240
- holder_name: string;
1259
+ country: "CL";
1260
+ bank_code: string;
1261
+ account_type: "10" | "20" | "40";
1262
+ account_number: string;
1263
+ name: string;
1264
+ national_kind_id: "RUT";
1265
+ national_id: string;
1241
1266
  } | null;
1242
- note?: {
1267
+ comment?: {
1243
1268
  value: string;
1244
1269
  editable: boolean;
1245
1270
  } | undefined;
1246
- metadata: {
1247
- [x: string]: unknown;
1248
- };
1249
1271
  expires_in: string;
1250
1272
  expires_at?: undefined;
1251
1273
  } | {
1274
+ metadata: {
1275
+ [x: string]: unknown;
1276
+ };
1252
1277
  type: "transfer";
1253
1278
  amount: {
1254
1279
  currency: "CLP";
1255
- value: string;
1280
+ value: number;
1256
1281
  editable: boolean;
1257
1282
  };
1258
- source: {
1283
+ sender: {
1259
1284
  type: "account_key";
1260
1285
  accountKey: string;
1261
1286
  } | {
1262
1287
  type: "account";
1263
1288
  id: string;
1264
1289
  } | null;
1265
- destination: {
1290
+ receiver: {
1266
1291
  editable: false;
1267
1292
  type: "account_key";
1268
1293
  accountKey: string;
@@ -1273,33 +1298,32 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1273
1298
  } | {
1274
1299
  editable: false;
1275
1300
  type: "external";
1276
- bank_id: string;
1277
- account_type: "checking" | "debit" | "savings";
1278
- account_id: string;
1279
- holder_id: string;
1280
- holder_name: string;
1301
+ country: "CL";
1302
+ bank_code: string;
1303
+ account_type: "10" | "20" | "40";
1304
+ account_number: string;
1305
+ name: string;
1306
+ national_kind_id: "RUT";
1307
+ national_id: string;
1281
1308
  } | null;
1282
- note?: {
1309
+ comment?: {
1283
1310
  value: string;
1284
1311
  editable: boolean;
1285
1312
  } | undefined;
1286
- metadata: {
1287
- [x: string]: unknown;
1288
- };
1289
1313
  expires_in?: undefined;
1290
1314
  expires_at: string | null;
1291
- }, "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<{
1315
+ }, "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<{
1292
1316
  readonly type: v.LiteralSchema<"account_opening", undefined>;
1293
1317
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1294
1318
  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.">]>;
1295
1319
  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.">]>;
1296
1320
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1297
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1321
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1298
1322
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1299
1323
  }, undefined>, v.DescriptionAction<{
1300
1324
  value: string;
1301
1325
  editable: boolean;
1302
- }, "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>;
1326
+ }, "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>;
1303
1327
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1304
1328
  } & {
1305
1329
  readonly expires_in: v.StringSchema<undefined>;
@@ -1310,12 +1334,12 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1310
1334
  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.">]>;
1311
1335
  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.">]>;
1312
1336
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1313
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1337
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1314
1338
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1315
1339
  }, undefined>, v.DescriptionAction<{
1316
1340
  value: string;
1317
1341
  editable: boolean;
1318
- }, "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>;
1342
+ }, "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>;
1319
1343
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1320
1344
  } & {
1321
1345
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -1348,7 +1372,7 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1348
1372
  };
1349
1373
  expires_in?: undefined;
1350
1374
  expires_at: string | null;
1351
- }, "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<{
1375
+ }, "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<{
1352
1376
  readonly type: v.LiteralSchema<"account_closure", undefined>;
1353
1377
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1354
1378
  type: v.LiteralSchema<"account_key", undefined>;
@@ -1356,26 +1380,26 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1356
1380
  }, undefined>, v.DescriptionAction<{
1357
1381
  type: "account_key";
1358
1382
  accountKey: string;
1359
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1383
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1360
1384
  type: v.LiteralSchema<"account", undefined>;
1361
1385
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1362
1386
  }, undefined>, v.DescriptionAction<{
1363
1387
  type: "account";
1364
1388
  id: string;
1365
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1389
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1366
1390
  type: "account_key";
1367
1391
  accountKey: string;
1368
1392
  } | {
1369
1393
  type: "account";
1370
1394
  id: string;
1371
- }, "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.">]>;
1395
+ }, "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.">]>;
1372
1396
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1373
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1397
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1374
1398
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1375
1399
  }, undefined>, v.DescriptionAction<{
1376
1400
  value: string;
1377
1401
  editable: boolean;
1378
- }, "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>;
1402
+ }, "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>;
1379
1403
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1380
1404
  } & {
1381
1405
  readonly expires_in: v.StringSchema<undefined>;
@@ -1388,26 +1412,26 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1388
1412
  }, undefined>, v.DescriptionAction<{
1389
1413
  type: "account_key";
1390
1414
  accountKey: string;
1391
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1415
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1392
1416
  type: v.LiteralSchema<"account", undefined>;
1393
1417
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1394
1418
  }, undefined>, v.DescriptionAction<{
1395
1419
  type: "account";
1396
1420
  id: string;
1397
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1421
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1398
1422
  type: "account_key";
1399
1423
  accountKey: string;
1400
1424
  } | {
1401
1425
  type: "account";
1402
1426
  id: string;
1403
- }, "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.">]>;
1427
+ }, "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.">]>;
1404
1428
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1405
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1429
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1406
1430
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1407
1431
  }, undefined>, v.DescriptionAction<{
1408
1432
  value: string;
1409
1433
  editable: boolean;
1410
- }, "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>;
1434
+ }, "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>;
1411
1435
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1412
1436
  } & {
1413
1437
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -1448,7 +1472,7 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
1448
1472
  };
1449
1473
  expires_in?: undefined;
1450
1474
  expires_at: string;
1451
- }, "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>;
1475
+ }, "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>;
1452
1476
  /** Validated Intent creation payload inferred from the public schema. */
1453
1477
  export type IntentCreate = v.InferOutput<typeof IntentCreateSchema>;
1454
1478
  /** The longest note, in Unicode code points: what PostgreSQL and JSON Schema's `maxLength` count. */
@@ -1467,9 +1491,11 @@ export declare const METADATA_MAX_LENGTH = 16384;
1467
1491
  *
1468
1492
  * - `invalid_expiration_interval`: `expires_in` is not a whole number of seconds, minutes, hours or days.
1469
1493
  * - `invalid_expiration_datetime`: `expires_at` is not a real calendar datetime with a timezone.
1470
- * - `note_too_long`: the note has more than {@link NOTE_MAX_LENGTH} code points.
1494
+ * - `note_too_long`: the note of a deposit or an account Intent has more than {@link NOTE_MAX_LENGTH}
1495
+ * code points.
1496
+ * - `comment_too_long`: a transfer's comment has more than 60 bytes of UTF-8, Core's limit.
1471
1497
  * - `name_too_long`: an account opening's `name` has more than {@link ACCOUNT_NAME_MAX_LENGTH} code points.
1472
- * - `holder_name_too_long`: an external destination's `holder_name` has more than
1498
+ * - `holder_name_too_long`: an external Receptor's holder `name` has more than
1473
1499
  * {@link HOLDER_NAME_MAX_LENGTH} code points.
1474
1500
  * - `passive_deposit_requires_no_target`: a deposit that never expires names an amount; only a
1475
1501
  * deposit with a target must expire.
@@ -1487,252 +1513,14 @@ export declare function intentInputIssues(input: IntentCreate): Issue[];
1487
1513
  *
1488
1514
  * @example
1489
1515
  * const parsed = parseIntentInput({
1490
- * type: "transfer", expires_in: "30 minutes", source: null,
1491
- * destination: { type: "account_key", accountKey: "proveedores" },
1492
- * amount: { currency: "CLP", value: "40000" },
1493
- * note: { value: "Factura 42", editable: true },
1516
+ * type: "transfer", expires_in: "30 minutes", sender: null,
1517
+ * receiver: { type: "account_key", accountKey: "proveedores" },
1518
+ * amount: { currency: "CLP", value: 40000 },
1519
+ * comment: { value: "Factura 42", editable: true },
1494
1520
  * });
1495
1521
  * if (!parsed.success) console.log(parsed.issues.map((issue) => issue.type)); // e.g. ["note_too_long"]
1496
1522
  */
1497
1523
  export declare function parseIntentInput(input: unknown): ParseResult<IntentCreate>;
1498
- /** The verified claims of a Signed Instruction that moves money. See {@link SignedIntentSchema}. */
1499
- export declare const SignedTransferIntentClaimsSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1500
- readonly type: v.LiteralSchema<"transfer", undefined>;
1501
- readonly source: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1502
- type: v.LiteralSchema<"account_key", undefined>;
1503
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1504
- }, undefined>, v.DescriptionAction<{
1505
- type: "account_key";
1506
- accountKey: string;
1507
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1508
- type: v.LiteralSchema<"account", undefined>;
1509
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1510
- }, undefined>, v.DescriptionAction<{
1511
- type: "account";
1512
- id: string;
1513
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1514
- type: "account_key";
1515
- accountKey: string;
1516
- } | {
1517
- type: "account";
1518
- id: string;
1519
- }, "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.">]>;
1520
- readonly destination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1521
- type: v.LiteralSchema<"account_key", undefined>;
1522
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1523
- }, undefined>, v.DescriptionAction<{
1524
- type: "account_key";
1525
- accountKey: string;
1526
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1527
- type: v.LiteralSchema<"account", undefined>;
1528
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1529
- }, undefined>, v.DescriptionAction<{
1530
- type: "account";
1531
- id: string;
1532
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1533
- type: v.LiteralSchema<"external", undefined>;
1534
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1535
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1536
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1537
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1538
- 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`).">]>;
1539
- }, undefined>, v.DescriptionAction<{
1540
- type: "external";
1541
- bank_id: string;
1542
- account_type: "checking" | "debit" | "savings";
1543
- account_id: string;
1544
- holder_id: string;
1545
- holder_name: string;
1546
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
1547
- type: "account_key";
1548
- accountKey: string;
1549
- } | {
1550
- type: "account";
1551
- id: string;
1552
- } | {
1553
- type: "external";
1554
- bank_id: string;
1555
- account_type: "checking" | "debit" | "savings";
1556
- account_id: string;
1557
- holder_id: string;
1558
- holder_name: string;
1559
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
1560
- readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1561
- readonly currency: v.LiteralSchema<"CLP", undefined>;
1562
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1563
- }, undefined>, v.DescriptionAction<{
1564
- currency: "CLP";
1565
- value: string;
1566
- }, "The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change.">]>;
1567
- readonly note: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.DescriptionAction<string | undefined, "A plain bank reference; a Signed Instruction proposes nothing.">]>;
1568
- readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1569
- readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1570
- readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
1571
- readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1572
- readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1573
- readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1574
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1575
- } & {
1576
- readonly expires_in: v.StringSchema<undefined>;
1577
- readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1578
- }, undefined>, v.StrictObjectSchema<{
1579
- readonly type: v.LiteralSchema<"transfer", undefined>;
1580
- readonly source: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1581
- type: v.LiteralSchema<"account_key", undefined>;
1582
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1583
- }, undefined>, v.DescriptionAction<{
1584
- type: "account_key";
1585
- accountKey: string;
1586
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1587
- type: v.LiteralSchema<"account", undefined>;
1588
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1589
- }, undefined>, v.DescriptionAction<{
1590
- type: "account";
1591
- id: string;
1592
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1593
- type: "account_key";
1594
- accountKey: string;
1595
- } | {
1596
- type: "account";
1597
- id: string;
1598
- }, "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.">]>;
1599
- readonly destination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1600
- type: v.LiteralSchema<"account_key", undefined>;
1601
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1602
- }, undefined>, v.DescriptionAction<{
1603
- type: "account_key";
1604
- accountKey: string;
1605
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1606
- type: v.LiteralSchema<"account", undefined>;
1607
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1608
- }, undefined>, v.DescriptionAction<{
1609
- type: "account";
1610
- id: string;
1611
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1612
- type: v.LiteralSchema<"external", undefined>;
1613
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1614
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1615
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1616
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1617
- 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`).">]>;
1618
- }, undefined>, v.DescriptionAction<{
1619
- type: "external";
1620
- bank_id: string;
1621
- account_type: "checking" | "debit" | "savings";
1622
- account_id: string;
1623
- holder_id: string;
1624
- holder_name: string;
1625
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
1626
- type: "account_key";
1627
- accountKey: string;
1628
- } | {
1629
- type: "account";
1630
- id: string;
1631
- } | {
1632
- type: "external";
1633
- bank_id: string;
1634
- account_type: "checking" | "debit" | "savings";
1635
- account_id: string;
1636
- holder_id: string;
1637
- holder_name: string;
1638
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
1639
- readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1640
- readonly currency: v.LiteralSchema<"CLP", undefined>;
1641
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1642
- }, undefined>, v.DescriptionAction<{
1643
- currency: "CLP";
1644
- value: string;
1645
- }, "The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change.">]>;
1646
- readonly note: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.DescriptionAction<string | undefined, "A plain bank reference; a Signed Instruction proposes nothing.">]>;
1647
- readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1648
- readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1649
- readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
1650
- readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1651
- readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1652
- readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1653
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1654
- } & {
1655
- readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
1656
- readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1657
- }, undefined>], undefined>, v.DescriptionAction<{
1658
- type: "transfer";
1659
- source: {
1660
- type: "account_key";
1661
- accountKey: string;
1662
- } | {
1663
- type: "account";
1664
- id: string;
1665
- };
1666
- destination: {
1667
- type: "account_key";
1668
- accountKey: string;
1669
- } | {
1670
- type: "account";
1671
- id: string;
1672
- } | {
1673
- type: "external";
1674
- bank_id: string;
1675
- account_type: "checking" | "debit" | "savings";
1676
- account_id: string;
1677
- holder_id: string;
1678
- holder_name: string;
1679
- };
1680
- amount: {
1681
- currency: "CLP";
1682
- value: string;
1683
- };
1684
- note?: string | undefined;
1685
- iss: string;
1686
- aud: "https://api.andco.com";
1687
- jti: string;
1688
- exp: number;
1689
- iat?: number | undefined;
1690
- nbf?: number | undefined;
1691
- metadata: {
1692
- [x: string]: unknown;
1693
- };
1694
- expires_in: string;
1695
- expires_at?: undefined;
1696
- } | {
1697
- type: "transfer";
1698
- source: {
1699
- type: "account_key";
1700
- accountKey: string;
1701
- } | {
1702
- type: "account";
1703
- id: string;
1704
- };
1705
- destination: {
1706
- type: "account_key";
1707
- accountKey: string;
1708
- } | {
1709
- type: "account";
1710
- id: string;
1711
- } | {
1712
- type: "external";
1713
- bank_id: string;
1714
- account_type: "checking" | "debit" | "savings";
1715
- account_id: string;
1716
- holder_id: string;
1717
- holder_name: string;
1718
- };
1719
- amount: {
1720
- currency: "CLP";
1721
- value: string;
1722
- };
1723
- note?: string | undefined;
1724
- iss: string;
1725
- aud: "https://api.andco.com";
1726
- jti: string;
1727
- exp: number;
1728
- iat?: number | undefined;
1729
- nbf?: number | undefined;
1730
- metadata: {
1731
- [x: string]: unknown;
1732
- };
1733
- expires_in?: undefined;
1734
- expires_at: string | null;
1735
- }, "The verified claims of a Signed Instruction, sent to the same endpoint as `application/jwt`. Nothing here is optional that the transfer needs and nothing here is editable: an instruction that does not say where the money comes from or where it goes is not signable, so `source` and `destination` are required (and neither may be `null`: there is no screen on this path to complete it) and the amount carries no `editable`. `note` is a plain reference for the same reason -- there is no screen on this path, so there is nobody to propose it to. When a signature is present, every value the transfer uses comes from these claims and none from the envelope carrying them. `exp` bounds how long the instruction may be submitted; `expires_in` or `expires_at` bounds how long the Intent may be approved and executed. They are different deadlines.">]>;
1736
1524
  /** The verified claims of a Signed Instruction that opens an account. See {@link SignedIntentSchema}. */
1737
1525
  export declare const SignedAccountOpeningIntentClaimsSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1738
1526
  readonly type: v.LiteralSchema<"account_opening", undefined>;
@@ -1806,19 +1594,19 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
1806
1594
  }, undefined>, v.DescriptionAction<{
1807
1595
  type: "account_key";
1808
1596
  accountKey: string;
1809
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1597
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1810
1598
  type: v.LiteralSchema<"account", undefined>;
1811
1599
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1812
1600
  }, undefined>, v.DescriptionAction<{
1813
1601
  type: "account";
1814
1602
  id: string;
1815
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1603
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1816
1604
  type: "account_key";
1817
1605
  accountKey: string;
1818
1606
  } | {
1819
1607
  type: "account";
1820
1608
  id: string;
1821
- }, "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.">]>;
1609
+ }, "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.">]>;
1822
1610
  readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1823
1611
  readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1824
1612
  readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
@@ -1837,19 +1625,19 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
1837
1625
  }, undefined>, v.DescriptionAction<{
1838
1626
  type: "account_key";
1839
1627
  accountKey: string;
1840
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1628
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1841
1629
  type: v.LiteralSchema<"account", undefined>;
1842
1630
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1843
1631
  }, undefined>, v.DescriptionAction<{
1844
1632
  type: "account";
1845
1633
  id: string;
1846
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1634
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1847
1635
  type: "account_key";
1848
1636
  accountKey: string;
1849
1637
  } | {
1850
1638
  type: "account";
1851
1639
  id: string;
1852
- }, "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.">]>;
1640
+ }, "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.">]>;
1853
1641
  readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1854
1642
  readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1855
1643
  readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
@@ -1902,20 +1690,18 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
1902
1690
  expires_at: string;
1903
1691
  }, "The verified claims of a Signed Instruction that closes an account. `account` is required and never editable: an instruction that does not say which account it closes is not signable.">]>;
1904
1692
  /**
1905
- * The verified claims of a Signed Instruction: the `application/jwt` half of the same creation.
1693
+ * The verified claims of a Signed Instruction: the `application/jwt` half of the same creation, for
1694
+ * opening and closing an account.
1906
1695
  *
1907
- * Nothing here is optional that the transfer needs and nothing here is editable. An instruction that
1908
- * does not say where the money comes from or where it goes is not signable, so `source` and
1909
- * `destination` are required (a `null` for either is refused: there is no screen on this path to
1910
- * complete it) and the amount carries no `editable`. `note` is a plain reference for the same reason:
1911
- * there is nobody to propose it to.
1696
+ * A signed transfer is not here: it is a Transfer of its own, uploaded to `POST /transfers` as a
1697
+ * `SignedTransferEnvelope` whose claims are `SignedTransferClaims` (ADR 0093).
1912
1698
  *
1913
1699
  * There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
1914
1700
  * instruction, and nothing inside the signature may name another.
1915
1701
  *
1916
1702
  * The expiration is present on this side too, and it is not `exp`. `exp` bounds how long the
1917
1703
  * instruction may be *submitted*; the Intent expiration bounds how long the Intent may be approved
1918
- * and executed. They are different deadlines, and because every value a signed transfer uses has to
1704
+ * and executed. They are different deadlines, and because every value a signed Intent uses has to
1919
1705
  * come from inside the signature, the second one cannot arrive in a header or a query string.
1920
1706
  *
1921
1707
  * `account_opening` is signed on the same terms, and `upsert` is the reason it matters here. The
@@ -1926,245 +1712,9 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
1926
1712
  *
1927
1713
  * @example
1928
1714
  * const claims = parseSignedIntentInput(verification.claims);
1929
- * if (claims.success && claims.output.type === "transfer") console.log(claims.output.jti, claims.output.amount.value);
1715
+ * if (claims.success && claims.output.type === "account_opening") console.log(claims.output.jti, claims.output.accountKey);
1930
1716
  */
1931
1717
  export declare const SignedIntentSchema: v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
1932
- readonly type: v.LiteralSchema<"transfer", undefined>;
1933
- readonly source: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1934
- type: v.LiteralSchema<"account_key", undefined>;
1935
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1936
- }, undefined>, v.DescriptionAction<{
1937
- type: "account_key";
1938
- accountKey: string;
1939
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1940
- type: v.LiteralSchema<"account", undefined>;
1941
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1942
- }, undefined>, v.DescriptionAction<{
1943
- type: "account";
1944
- id: string;
1945
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1946
- type: "account_key";
1947
- accountKey: string;
1948
- } | {
1949
- type: "account";
1950
- id: string;
1951
- }, "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.">]>;
1952
- readonly destination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1953
- type: v.LiteralSchema<"account_key", undefined>;
1954
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1955
- }, undefined>, v.DescriptionAction<{
1956
- type: "account_key";
1957
- accountKey: string;
1958
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1959
- type: v.LiteralSchema<"account", undefined>;
1960
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1961
- }, undefined>, v.DescriptionAction<{
1962
- type: "account";
1963
- id: string;
1964
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1965
- type: v.LiteralSchema<"external", undefined>;
1966
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1967
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1968
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1969
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1970
- 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`).">]>;
1971
- }, undefined>, v.DescriptionAction<{
1972
- type: "external";
1973
- bank_id: string;
1974
- account_type: "checking" | "debit" | "savings";
1975
- account_id: string;
1976
- holder_id: string;
1977
- holder_name: string;
1978
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
1979
- type: "account_key";
1980
- accountKey: string;
1981
- } | {
1982
- type: "account";
1983
- id: string;
1984
- } | {
1985
- type: "external";
1986
- bank_id: string;
1987
- account_type: "checking" | "debit" | "savings";
1988
- account_id: string;
1989
- holder_id: string;
1990
- holder_name: string;
1991
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
1992
- readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1993
- readonly currency: v.LiteralSchema<"CLP", undefined>;
1994
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1995
- }, undefined>, v.DescriptionAction<{
1996
- currency: "CLP";
1997
- value: string;
1998
- }, "The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change.">]>;
1999
- readonly note: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.DescriptionAction<string | undefined, "A plain bank reference; a Signed Instruction proposes nothing.">]>;
2000
- readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2001
- readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
2002
- readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
2003
- readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2004
- readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
2005
- readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
2006
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2007
- } & {
2008
- readonly expires_in: v.StringSchema<undefined>;
2009
- readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2010
- }, undefined>, v.StrictObjectSchema<{
2011
- readonly type: v.LiteralSchema<"transfer", undefined>;
2012
- readonly source: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2013
- type: v.LiteralSchema<"account_key", undefined>;
2014
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2015
- }, undefined>, v.DescriptionAction<{
2016
- type: "account_key";
2017
- accountKey: string;
2018
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2019
- type: v.LiteralSchema<"account", undefined>;
2020
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2021
- }, undefined>, v.DescriptionAction<{
2022
- type: "account";
2023
- id: string;
2024
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2025
- type: "account_key";
2026
- accountKey: string;
2027
- } | {
2028
- type: "account";
2029
- id: string;
2030
- }, "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.">]>;
2031
- readonly destination: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2032
- type: v.LiteralSchema<"account_key", undefined>;
2033
- accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2034
- }, undefined>, v.DescriptionAction<{
2035
- type: "account_key";
2036
- accountKey: string;
2037
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2038
- type: v.LiteralSchema<"account", undefined>;
2039
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2040
- }, undefined>, v.DescriptionAction<{
2041
- type: "account";
2042
- id: string;
2043
- }, "One Andco account, named by its identifier.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2044
- type: v.LiteralSchema<"external", undefined>;
2045
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2046
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
2047
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2048
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2049
- 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`).">]>;
2050
- }, undefined>, v.DescriptionAction<{
2051
- type: "external";
2052
- bank_id: string;
2053
- account_type: "checking" | "debit" | "savings";
2054
- account_id: string;
2055
- holder_id: string;
2056
- holder_name: string;
2057
- }, "One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account.">]>], undefined>, v.DescriptionAction<{
2058
- type: "account_key";
2059
- accountKey: string;
2060
- } | {
2061
- type: "account";
2062
- id: string;
2063
- } | {
2064
- type: "external";
2065
- bank_id: string;
2066
- account_type: "checking" | "debit" | "savings";
2067
- account_id: string;
2068
- holder_id: string;
2069
- holder_name: string;
2070
- }, "Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank.">]>;
2071
- readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2072
- readonly currency: v.LiteralSchema<"CLP", undefined>;
2073
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2074
- }, undefined>, v.DescriptionAction<{
2075
- currency: "CLP";
2076
- value: string;
2077
- }, "The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change.">]>;
2078
- readonly note: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.DescriptionAction<string | undefined, "A plain bank reference; a Signed Instruction proposes nothing.">]>;
2079
- readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2080
- readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
2081
- readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
2082
- readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
2083
- readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
2084
- readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
2085
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2086
- } & {
2087
- readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2088
- readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2089
- }, undefined>], undefined>, v.DescriptionAction<{
2090
- type: "transfer";
2091
- source: {
2092
- type: "account_key";
2093
- accountKey: string;
2094
- } | {
2095
- type: "account";
2096
- id: string;
2097
- };
2098
- destination: {
2099
- type: "account_key";
2100
- accountKey: string;
2101
- } | {
2102
- type: "account";
2103
- id: string;
2104
- } | {
2105
- type: "external";
2106
- bank_id: string;
2107
- account_type: "checking" | "debit" | "savings";
2108
- account_id: string;
2109
- holder_id: string;
2110
- holder_name: string;
2111
- };
2112
- amount: {
2113
- currency: "CLP";
2114
- value: string;
2115
- };
2116
- note?: string | undefined;
2117
- iss: string;
2118
- aud: "https://api.andco.com";
2119
- jti: string;
2120
- exp: number;
2121
- iat?: number | undefined;
2122
- nbf?: number | undefined;
2123
- metadata: {
2124
- [x: string]: unknown;
2125
- };
2126
- expires_in: string;
2127
- expires_at?: undefined;
2128
- } | {
2129
- type: "transfer";
2130
- source: {
2131
- type: "account_key";
2132
- accountKey: string;
2133
- } | {
2134
- type: "account";
2135
- id: string;
2136
- };
2137
- destination: {
2138
- type: "account_key";
2139
- accountKey: string;
2140
- } | {
2141
- type: "account";
2142
- id: string;
2143
- } | {
2144
- type: "external";
2145
- bank_id: string;
2146
- account_type: "checking" | "debit" | "savings";
2147
- account_id: string;
2148
- holder_id: string;
2149
- holder_name: string;
2150
- };
2151
- amount: {
2152
- currency: "CLP";
2153
- value: string;
2154
- };
2155
- note?: string | undefined;
2156
- iss: string;
2157
- aud: "https://api.andco.com";
2158
- jti: string;
2159
- exp: number;
2160
- iat?: number | undefined;
2161
- nbf?: number | undefined;
2162
- metadata: {
2163
- [x: string]: unknown;
2164
- };
2165
- expires_in?: undefined;
2166
- expires_at: string | null;
2167
- }, "The verified claims of a Signed Instruction, sent to the same endpoint as `application/jwt`. Nothing here is optional that the transfer needs and nothing here is editable: an instruction that does not say where the money comes from or where it goes is not signable, so `source` and `destination` are required (and neither may be `null`: there is no screen on this path to complete it) and the amount carries no `editable`. `note` is a plain reference for the same reason -- there is no screen on this path, so there is nobody to propose it to. When a signature is present, every value the transfer uses comes from these claims and none from the envelope carrying them. `exp` bounds how long the instruction may be submitted; `expires_in` or `expires_at` bounds how long the Intent may be approved and executed. They are different deadlines.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2168
1718
  readonly type: v.LiteralSchema<"account_opening", undefined>;
2169
1719
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2170
1720
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
@@ -2234,19 +1784,19 @@ export declare const SignedIntentSchema: v.VariantSchema<"type", [v.SchemaWithPi
2234
1784
  }, undefined>, v.DescriptionAction<{
2235
1785
  type: "account_key";
2236
1786
  accountKey: string;
2237
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1787
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2238
1788
  type: v.LiteralSchema<"account", undefined>;
2239
1789
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2240
1790
  }, undefined>, v.DescriptionAction<{
2241
1791
  type: "account";
2242
1792
  id: string;
2243
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1793
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2244
1794
  type: "account_key";
2245
1795
  accountKey: string;
2246
1796
  } | {
2247
1797
  type: "account";
2248
1798
  id: string;
2249
- }, "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.">]>;
1799
+ }, "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.">]>;
2250
1800
  readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2251
1801
  readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
2252
1802
  readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
@@ -2265,19 +1815,19 @@ export declare const SignedIntentSchema: v.VariantSchema<"type", [v.SchemaWithPi
2265
1815
  }, undefined>, v.DescriptionAction<{
2266
1816
  type: "account_key";
2267
1817
  accountKey: string;
2268
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1818
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2269
1819
  type: v.LiteralSchema<"account", undefined>;
2270
1820
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2271
1821
  }, undefined>, v.DescriptionAction<{
2272
1822
  type: "account";
2273
1823
  id: string;
2274
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1824
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2275
1825
  type: "account_key";
2276
1826
  accountKey: string;
2277
1827
  } | {
2278
1828
  type: "account";
2279
1829
  id: string;
2280
- }, "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.">]>;
1830
+ }, "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.">]>;
2281
1831
  readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2282
1832
  readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
2283
1833
  readonly jti: 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 idempotency key, inside the signature, reused verbatim when retrying.">]>;
@@ -2334,8 +1884,7 @@ export type SignedIntent = v.InferOutput<typeof SignedIntentSchema>;
2334
1884
  /**
2335
1885
  * The rules of a Signed Instruction's claims that JSON Schema does not say, over claims that already
2336
1886
  * have their shape ({@link SignedIntentSchema}): `invalid_expiration_interval`,
2337
- * `invalid_expiration_datetime`, `note_too_long`, `name_too_long`, `holder_name_too_long` and
2338
- * `metadata_too_large`, as in
1887
+ * `invalid_expiration_datetime`, `name_too_long` and `metadata_too_large`, as in
2339
1888
  * {@link intentInputIssues}.
2340
1889
  */
2341
1890
  export declare function signedIntentInputIssues(input: SignedIntent): Issue[];
@@ -2401,7 +1950,7 @@ export declare const ANDCO_INTENT_ERROR_CODES: {
2401
1950
  */
2402
1951
  readonly ACCOUNT_CLOSURE_NOT_IMPLEMENTED: "account_closure_not_implemented";
2403
1952
  /**
2404
- * Opening an additional account by Account Key works where the bank serves it. Where it does not,
1953
+ * Opening an additional account by Account Key works where AndCo serves it. Where it does not,
2405
1954
  * the server answers `not_implemented` (501) with this stable `code`: at Intent creation, once the
2406
1955
  * request is valid and the Grant holds `bank_account` `create` (otherwise `400` or `403` come
2407
1956
  * first) and nothing is created, and at approval, with the `intent_id`, leaving the Intent as it
@@ -2410,12 +1959,20 @@ export declare const ANDCO_INTENT_ERROR_CODES: {
2410
1959
  readonly ACCOUNT_OPENING_NOT_IMPLEMENTED: "account_opening_not_implemented";
2411
1960
  /**
2412
1961
  * A transfer between two accounts of the same holder (the destination is an Account Key or an
2413
- * Andco account of the Grant's subject) works where the bank serves it. Where it does not, the
1962
+ * AndCo account of the Grant's subject) works where AndCo serves it. Where it does not, the
2414
1963
  * server answers `not_implemented` (501) with this stable `code`: at Intent creation, with
2415
1964
  * nothing created, and at approval, with the `intent_id`. A transfer to another bank or to
2416
- * another Andco customer is not affected.
1965
+ * another AndCo customer is not affected.
2417
1966
  */
2418
1967
  readonly OWN_ACCOUNT_TRANSFER_NOT_IMPLEMENTED: "own_account_transfer_not_implemented";
1968
+ /**
1969
+ * A signed transfer that leaves its holder (to another bank or to another AndCo customer) moves
1970
+ * only where AndCo's core verifies signatures (ADR 0092). Where it does not, `POST /transfers`
1971
+ * answers `not_implemented` (501) with this stable `code` once the instruction verified and the
1972
+ * Grant covers it, and nothing is created. A signed transfer between two accounts of the same
1973
+ * holder is not affected.
1974
+ */
1975
+ readonly SIGNED_OUTGOING_TRANSFER_NOT_IMPLEMENTED: "signed_outgoing_transfer_not_implemented";
2419
1976
  };
2420
1977
  /**
2421
1978
  * Identifies recognized unsupported Intents without silently dropping their extra instructions: an
@@ -2427,32 +1984,34 @@ export declare function unsupportedIntentShape(input: unknown): string | undefin
2427
1984
  *
2428
1985
  * Every member but `intent_id` is optional because nothing here is necessarily editable: a screen
2429
1986
  * sends only what the Intent left open, and a value that was frozen has nowhere to arrive from.
2430
- * `destination` is the one the person completes when the Intent was created with `destination: null`,
2431
- * and is required then; a transfer that named its destination takes none. `amount` is accepted only
2432
- * when the Intent was created with `amount.editable: true`. The server checks the destination against
2433
- * the Grant's `destinations` and refuses one outside them with `invalid_destination`.
1987
+ * `receiver` is the one the person completes when the Intent was created with `receiver: null`, and
1988
+ * is required then; a transfer that named its Receptor takes none. `amount` (in the minor unit of the currency) is accepted
1989
+ * only when the Intent was created with `amount.editable: true`. The server checks the Receptor
1990
+ * against the Grant's `destinations` and refuses one outside them with `invalid_destination`.
2434
1991
  */
2435
1992
  export declare const TransferConfirmationSchema: v.StrictObjectSchema<{
2436
1993
  readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2437
- readonly source_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
2438
- readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
2439
- readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
1994
+ readonly sender_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
1995
+ readonly amount: v.OptionalSchema<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>;
1996
+ readonly receiver: v.OptionalSchema<v.StrictObjectSchema<{
2440
1997
  type: v.LiteralSchema<"external", undefined>;
2441
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2442
- account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
2443
- account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2444
- holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2445
- 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`).">]>;
1998
+ country: v.LiteralSchema<"CL", undefined>;
1999
+ 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`.">]>;
2000
+ 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).">]>;
2001
+ account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2002
+ 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`).">]>;
2003
+ national_kind_id: v.LiteralSchema<"RUT", undefined>;
2004
+ 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.">]>;
2446
2005
  }, undefined>, undefined>;
2447
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
2006
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
2448
2007
  }, undefined>;
2449
2008
  /** Validated confirmation fields inferred from {@link TransferConfirmationSchema}. */
2450
2009
  export type TransferConfirmation = v.InferOutput<typeof TransferConfirmationSchema>;
2451
2010
  /**
2452
- * The rules of a confirmation that JSON Schema does not say in code points: `note_too_long`, past
2453
- * {@link NOTE_MAX_LENGTH}, and `holder_name_too_long`, past {@link HOLDER_NAME_MAX_LENGTH}.
2011
+ * The rules of a confirmation that JSON Schema does not say: `comment_too_long`, past Core's 60 bytes
2012
+ * of UTF-8, and `holder_name_too_long`, past {@link HOLDER_NAME_MAX_LENGTH} code points.
2454
2013
  */
2455
- export declare function transferConfirmationIssues(input: Pick<TransferConfirmation, "note" | "destination">): Issue[];
2014
+ export declare function transferConfirmationIssues(input: Pick<TransferConfirmation, "comment" | "receiver">): Issue[];
2456
2015
  /**
2457
2016
  * Parses proposed confirmation fields: their shape and then {@link transferConfirmationIssues}. The
2458
2017
  * server enforces editability.