@andco/protocol 0.0.3 → 0.0.5

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 (113) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +51 -3
  3. package/dist/api-errors.d.ts +114 -0
  4. package/dist/api-errors.d.ts.map +1 -0
  5. package/dist/api-errors.js +116 -0
  6. package/dist/authorization-preparation.d.ts +52 -543
  7. package/dist/authorization-preparation.d.ts.map +1 -1
  8. package/dist/authorization-preparation.js +19 -42
  9. package/dist/authorization.d.ts +64 -22
  10. package/dist/authorization.d.ts.map +1 -1
  11. package/dist/authorization.js +136 -55
  12. package/dist/consent.d.ts +5 -8
  13. package/dist/consent.d.ts.map +1 -1
  14. package/dist/consent.js +5 -62
  15. package/dist/constants.d.ts +19 -3
  16. package/dist/constants.d.ts.map +1 -1
  17. package/dist/constants.js +19 -3
  18. package/dist/errors.d.ts +154 -58
  19. package/dist/errors.d.ts.map +1 -1
  20. package/dist/errors.js +174 -57
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/intent-input.d.ts +1022 -288
  25. package/dist/intent-input.d.ts.map +1 -1
  26. package/dist/intent-input.js +284 -40
  27. package/dist/messages/error.d.ts +1 -2
  28. package/dist/messages/error.d.ts.map +1 -1
  29. package/dist/messages/error.js +5 -2
  30. package/dist/messages/index.d.ts +1 -1
  31. package/dist/native-copy.d.ts +23 -2
  32. package/dist/native-copy.d.ts.map +1 -1
  33. package/dist/native-copy.js +65 -117
  34. package/dist/native-intent.d.ts +126 -75
  35. package/dist/native-intent.d.ts.map +1 -1
  36. package/dist/native-intent.js +140 -48
  37. package/dist/rar/account-matchers.d.ts +579 -0
  38. package/dist/rar/account-matchers.d.ts.map +1 -0
  39. package/dist/rar/account-matchers.js +480 -0
  40. package/dist/rar/bank.d.ts +1549 -0
  41. package/dist/rar/bank.d.ts.map +1 -0
  42. package/dist/rar/bank.js +379 -0
  43. package/dist/rar/catalog.d.ts +1155 -0
  44. package/dist/rar/catalog.d.ts.map +1 -0
  45. package/dist/rar/catalog.js +175 -0
  46. package/dist/rar/detail.d.ts +39 -0
  47. package/dist/rar/detail.d.ts.map +1 -0
  48. package/dist/rar/detail.js +44 -0
  49. package/dist/rar/index.d.ts +9 -0
  50. package/dist/rar/index.d.ts.map +1 -0
  51. package/dist/rar/index.js +8 -0
  52. package/dist/rar/money.d.ts +58 -0
  53. package/dist/rar/money.d.ts.map +1 -0
  54. package/dist/rar/money.js +61 -0
  55. package/dist/rar/project-users.d.ts +43 -0
  56. package/dist/rar/project-users.d.ts.map +1 -0
  57. package/dist/rar/project-users.js +63 -0
  58. package/dist/rar/subject-data.d.ts +170 -0
  59. package/dist/rar/subject-data.d.ts.map +1 -0
  60. package/dist/rar/subject-data.js +127 -0
  61. package/dist/rar/subject.d.ts +166 -0
  62. package/dist/rar/subject.d.ts.map +1 -0
  63. package/dist/rar/subject.js +119 -0
  64. package/dist/scopes.d.ts +5 -30
  65. package/dist/scopes.d.ts.map +1 -1
  66. package/dist/scopes.js +0 -13
  67. package/dist/service-grants.d.ts +44 -0
  68. package/dist/service-grants.d.ts.map +1 -0
  69. package/dist/service-grants.js +45 -0
  70. package/dist/signing.d.ts +56 -0
  71. package/dist/signing.d.ts.map +1 -0
  72. package/dist/signing.js +233 -0
  73. package/dist/transport/financial-events.d.ts +90 -35
  74. package/dist/transport/financial-events.d.ts.map +1 -1
  75. package/dist/transport/financial-events.js +7 -1
  76. package/dist/transport/generated/oauth-api.d.ts +932 -441
  77. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  78. package/dist/transport/index.d.ts +0 -1
  79. package/dist/transport/index.d.ts.map +1 -1
  80. package/dist/transport/index.js +0 -1
  81. package/dist/transport/intents.d.ts +155 -23
  82. package/dist/transport/intents.d.ts.map +1 -1
  83. package/dist/transport/intents.js +192 -59
  84. package/dist/transport/rest.d.ts +19 -8
  85. package/dist/transport/rest.d.ts.map +1 -1
  86. package/dist/transport/rest.js +1 -1
  87. package/dist/urls.d.ts.map +1 -1
  88. package/dist/urls.js +1 -1
  89. package/dist/userinfo.d.ts +10 -1
  90. package/dist/userinfo.d.ts.map +1 -1
  91. package/dist/userinfo.js +10 -1
  92. package/dist/utils.d.ts +15 -0
  93. package/dist/utils.d.ts.map +1 -1
  94. package/dist/utils.js +31 -0
  95. package/dist/webhooks.d.ts +154 -0
  96. package/dist/webhooks.d.ts.map +1 -0
  97. package/dist/webhooks.js +249 -0
  98. package/package.json +21 -2
  99. package/dist/automatic-charge.d.ts +0 -314
  100. package/dist/automatic-charge.d.ts.map +0 -1
  101. package/dist/automatic-charge.js +0 -126
  102. package/dist/bank-account-authorization.d.ts +0 -6
  103. package/dist/bank-account-authorization.d.ts.map +0 -1
  104. package/dist/bank-account-authorization.js +0 -13
  105. package/dist/transport/webhooks.d.ts +0 -27
  106. package/dist/transport/webhooks.d.ts.map +0 -1
  107. package/dist/transport/webhooks.js +0 -68
  108. package/dist/webhook-input.d.ts +0 -22
  109. package/dist/webhook-input.d.ts.map +0 -1
  110. package/dist/webhook-input.js +0 -11
  111. package/dist/webhook-signature.d.ts +0 -54
  112. package/dist/webhook-signature.d.ts.map +0 -1
  113. package/dist/webhook-signature.js +0 -74
package/LICENSE CHANGED
@@ -187,7 +187,7 @@
187
187
  same "printed page" as the copyright notice for easier
188
188
  identification within third-party archives.
189
189
 
190
- Copyright 2026 Andco
190
+ Copyright 2026 Haulmer
191
191
 
192
192
  Licensed under the Apache License, Version 2.0 (the "License");
193
193
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # `@andco/protocol`
2
2
 
3
+ > [!WARNING]
4
+ > **Pre-1.0 software.** Until version 1.0.0 is released, any new version may include breaking
5
+ > changes, including minor and patch releases. Expect any API incompatibility and data resets
6
+ > in the Andco environments without prior notice. Pin an exact version and review the release
7
+ > notes before upgrading.
8
+
3
9
  Shared protocol types, schemas, constants, URL helpers, errors, OAuth utilities,
4
10
  and portable resource transport used by the AndCo JavaScript packages.
5
11
 
@@ -27,6 +33,27 @@ const transactionId = RANDOM_UUID(runtimeCrypto);
27
33
  If neither an injected source nor a compatible `globalThis.crypto` exists, the helper throws an `AndCoSDKError` with
28
34
  the `WEB_CRYPTO_UNAVAILABLE` code. A cryptographically insecure random-number generator must never be used as a fallback.
29
35
 
36
+ ## Permissions
37
+
38
+ The root exports the domain RAR model: scopes are OpenID Connect only (`AndCoKnownScope`), and every
39
+ resource permission is a RAR with a `subject`. Each type has a valibot schema for its Grant Request
40
+ (what an application asks, with `editable` and `null`) and for its Grant (what was conceded):
41
+ `ANDCO_RAR_CATALOG`, `parseAndcoGrantRequest`, `parseAndcoGrant`, the account matchers and
42
+ `accountMatcherContains`. `decodeJwtPayload` reads a JWT payload without verifying it.
43
+
44
+ ```ts
45
+ import { parseAndcoGrantRequest } from "@andco/protocol";
46
+
47
+ // Throws AndcoRarError ("invalid_request") when the detail breaks the schema.
48
+ parseAndcoGrantRequest({
49
+ type: "bank_deposit",
50
+ actions: ["create", "read"],
51
+ subject: { type: "organization" },
52
+ destinations: [{ type: "alias", pattern: "cobros" }],
53
+ locations: ["https://api.andco.com"],
54
+ });
55
+ ```
56
+
30
57
  ## Public subpaths
31
58
 
32
59
  - `@andco/protocol` contains the runtime-neutral protocol and validation
@@ -34,11 +61,32 @@ the `WEB_CRYPTO_UNAVAILABLE` code. A cryptographically insecure random-number ge
34
61
  - `@andco/protocol/authorization` contains the GET/PAR authorization-request
35
62
  transport helpers (`resolveAndCoAuthorization` and related types).
36
63
  - `@andco/protocol/messages` contains the secure iframe message union.
37
- - `@andco/protocol/transport` contains the generated REST client, Financial
38
- Intent and webhook clients, resource types, and lazy Fetch adapter shared
39
- by server and browser packages.
64
+ - `@andco/protocol/transport` contains the generated REST client, the Financial
65
+ Intent client, resource types, and lazy Fetch adapter shared by server and
66
+ browser packages.
67
+ - `@andco/protocol/webhooks` contains `andcoWebhooks.verifier()`, which verifies
68
+ Andco's Ed25519-signed webhook deliveries against Andco's public JWKS (cached
69
+ by `kid`), and its header and error constants.
40
70
  - `@andco/protocol/server` contains server-only helpers for a confidential
41
71
  client authenticated with `client_secret_basic`.
42
72
 
43
73
  The root intentionally does not reexport `transport`, which prevents protocol
44
74
  consumers from pulling `openapi-fetch` into bundles accidentally.
75
+
76
+ ## Conformance vectors
77
+
78
+ The Python, Ruby and Go SDKs do not reimplement this package's rules from prose:
79
+ they test against vectors generated from it. `scripts/rar-fixture-cases.mjs`
80
+ (valid and invalid authorization details) and
81
+ `scripts/account-matcher-containment-cases.mjs` are the shared fixtures; this
82
+ package's vitest suite checks them, and
83
+ `scripts/generate-conformance-vectors.mjs` publishes them, with the money, alias,
84
+ Organization and identifier syntaxes and the members of each Signed Instruction
85
+ (read from `openapi/oauth-api.yaml`), as one JSON document:
86
+
87
+ ```sh
88
+ pnpm --filter @andco/protocol build
89
+ pnpm --filter @andco/protocol run generate:conformance # writes into the three sibling SDK repos
90
+ ```
91
+
92
+ Add a case to a fixture, never to only one suite.
@@ -0,0 +1,114 @@
1
+ /**
2
+ * What the Andco API answers with in `{ "error": "..." }`. The SDK relays these untouched, so the
3
+ * string an integrator receives here is the one the API reference documents.
4
+ *
5
+ * Known values, not an exhaustive type. The server gains codes without an SDK release -- closing
6
+ * this would make every new server condition wait for a coordinated publish of four SDKs, and would
7
+ * leave a code the server already sends unnameable until then. `AndcoError.code` stays a `string`
8
+ * for the same reason, and {@link ANDCO_ERROR_CODES} shows the comparison shape: branch on the
9
+ * members you handle, keep a `default` for the rest.
10
+ *
11
+ * @see https://sdk.andco.com/docs/reference/error-codes
12
+ */
13
+ export declare const ANDCO_API_ERROR_CODES: {
14
+ /**
15
+ * The access token is missing, malformed, or no longer valid. Refresh once and retry; a second
16
+ * failure means the Grant is gone and the person has to authorize the application again.
17
+ */
18
+ readonly INVALID_TOKEN: "invalid_token";
19
+ /**
20
+ * The Grant is valid but carries no scope for this operation. Not retryable: the application has
21
+ * to request that scope and the person has to consent to it. The missing one arrives in
22
+ * `error.details.required_scope`.
23
+ */
24
+ readonly INSUFFICIENT_SCOPE: "insufficient_scope";
25
+ /**
26
+ * The Grant covers the scope but not this exact resource -- an account outside the pattern it was
27
+ * given, an action its authorization details do not name.
28
+ */
29
+ readonly INSUFFICIENT_AUTHORIZATION: "insufficient_authorization";
30
+ /**
31
+ * The operation needs a stronger authentication than the session carries. The person completes it
32
+ * and the same request succeeds afterwards.
33
+ */
34
+ readonly STEP_UP_REQUIRED: "step_up_required";
35
+ /** The request arrived from an origin this Client is not registered for. */
36
+ readonly INVALID_ORIGIN: "invalid_origin";
37
+ /**
38
+ * A Service asked for a token and no approved Grant matches its subject and resource. Someone has
39
+ * to approve the permissions in Platform; there is nothing to retry.
40
+ */
41
+ readonly AUTHORIZATION_REQUIRED: "authorization_required";
42
+ /**
43
+ * More than one Grant of the Service matches its subject and resource. `error.details.candidate_grant_ids`
44
+ * names them; pin one with `grant`.
45
+ */
46
+ readonly AMBIGUOUS_GRANT: "ambiguous_grant";
47
+ /** The request body or parameters did not satisfy the contract. `error.details` names the fields. */
48
+ readonly INVALID_REQUEST: "invalid_request";
49
+ /**
50
+ * An identifier in the path (an account, an Intent) is not well formed. The SDKs check it before
51
+ * any request and fail with this same code, so a typo never reads as `not_found`.
52
+ */
53
+ readonly INVALID_IDENTIFIER: "invalid_identifier";
54
+ /** The addressed resource does not exist, or exists outside what this Grant can see. */
55
+ readonly NOT_FOUND: "not_found";
56
+ /** The route exists and this case of it is not built yet. Not a client error: do not retry. */
57
+ readonly NOT_IMPLEMENTED: "not_implemented";
58
+ /** The `Content-Type` is not one this endpoint accepts. */
59
+ readonly UNSUPPORTED_MEDIA_TYPE: "unsupported_media_type";
60
+ /** The API version in the path is not one this deployment serves. */
61
+ readonly UNSUPPORTED_VERSION: "unsupported_version";
62
+ /**
63
+ * An `Idempotency-Key` was reused for a different money movement. The first operation stands and
64
+ * this one is refused on purpose: replaying a key with changed values is the shape a duplicated
65
+ * payment takes.
66
+ */
67
+ readonly IDEMPOTENCY_CONFLICT: "idempotency_conflict";
68
+ /**
69
+ * The amount of an Intent is outside what the Grant allows: it exceeds `transactions.maximum` (or
70
+ * differs from `transactions.value`) at creation, or exceeds the approver's maximum at approval,
71
+ * which leaves the Intent pending for another approver. Raised before anything is presented.
72
+ */
73
+ readonly AMOUNT_OUT_OF_GRANT: "amount_out_of_grant";
74
+ /** The alias of an account to open does not match the `bank_account` Grant's alias patterns. */
75
+ readonly ALIAS_OUT_OF_GRANT: "alias_out_of_grant";
76
+ /**
77
+ * The Account Alias is already in use by an account of this subject and `upsert` was not asked, or
78
+ * it belonged to an account that was closed: Aliases are never reused.
79
+ */
80
+ readonly ALIAS_TAKEN: "alias_taken";
81
+ /** The source of a transfer is not one the Grant's `sources` admit. */
82
+ readonly INVALID_SOURCE: "invalid_source";
83
+ /** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
84
+ readonly INVALID_DESTINATION: "invalid_destination";
85
+ /**
86
+ * A deposit named no `destination` and the `bank_deposit` Grant admits more than one account.
87
+ * Name the account in `destination`; a new Grant is not needed.
88
+ */
89
+ readonly DEPOSIT_DESTINATION_AMBIGUOUS: "deposit_destination_ambiguous";
90
+ /** The Intent still needs a person (for example to pick the source account), so it cannot be approved by API. */
91
+ readonly INTERACTION_REQUIRED: "interaction_required";
92
+ /** The source account does not hold enough money for this movement. */
93
+ readonly INSUFFICIENT_FUNDS: "insufficient_funds";
94
+ /** The Intent is not in a state where this operation applies -- already decided, already executed. */
95
+ readonly INVALID_INTENT_STATE: "invalid_intent_state";
96
+ /** The Intent's deadline passed before it was decided. A new Intent is the only way forward. */
97
+ readonly INTENT_EXPIRED: "intent_expired";
98
+ /** The compact JWS carrying the instruction did not verify against a registered signing key. */
99
+ readonly INVALID_SIGNED_INSTRUCTION: "invalid_signed_instruction";
100
+ /** The cursor was not issued for this collection, or was issued to a different caller. */
101
+ readonly INVALID_CURSOR: "invalid_cursor";
102
+ /** The cursor was not issued for this account listing. */
103
+ readonly INVALID_ACCOUNTS_CURSOR: "invalid_accounts_cursor";
104
+ /** The cursor was not issued for this event feed. */
105
+ readonly INVALID_EVENT_CURSOR: "invalid_event_cursor";
106
+ /**
107
+ * Andco could not serve the request and the caller did nothing wrong. Safe to retry with backoff;
108
+ * a money operation should carry the same `Idempotency-Key` when it does.
109
+ */
110
+ readonly TEMPORARILY_UNAVAILABLE: "temporarily_unavailable";
111
+ };
112
+ /** One of the conditions {@link ANDCO_API_ERROR_CODES} names. */
113
+ export type AndcoApiErrorCode = (typeof ANDCO_API_ERROR_CODES)[keyof typeof ANDCO_API_ERROR_CODES];
114
+ //# sourceMappingURL=api-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-errors.d.ts","sourceRoot":"","sources":["../src/api-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB;IAEhC;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH,4EAA4E;;IAE5E;;;OAGG;;IAEH;;;OAGG;;IAIH,qGAAqG;;IAErG;;;OAGG;;IAEH,wFAAwF;;IAExF,+FAA+F;;IAE/F,2DAA2D;;IAE3D,qEAAqE;;IAIrE;;;;OAIG;;IAEH;;;;OAIG;;IAEH,gGAAgG;;IAEhG;;;OAGG;;IAEH,uEAAuE;;IAEvE,kGAAkG;;IAElG;;;OAGG;;IAEH,iHAAiH;;IAEjH,uEAAuE;;IAEvE,sGAAsG;;IAEtG,gGAAgG;;IAEhG,gGAAgG;;IAIhG,0FAA0F;;IAE1F,0DAA0D;;IAE1D,qDAAqD;;IAIrD;;;OAGG;;CAEK,CAAC;AAEX,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * What the Andco API answers with in `{ "error": "..." }`. The SDK relays these untouched, so the
3
+ * string an integrator receives here is the one the API reference documents.
4
+ *
5
+ * Known values, not an exhaustive type. The server gains codes without an SDK release -- closing
6
+ * this would make every new server condition wait for a coordinated publish of four SDKs, and would
7
+ * leave a code the server already sends unnameable until then. `AndcoError.code` stays a `string`
8
+ * for the same reason, and {@link ANDCO_ERROR_CODES} shows the comparison shape: branch on the
9
+ * members you handle, keep a `default` for the rest.
10
+ *
11
+ * @see https://sdk.andco.com/docs/reference/error-codes
12
+ */
13
+ export const ANDCO_API_ERROR_CODES = {
14
+ // -- Authorization ---------------------------------------------------------------------------
15
+ /**
16
+ * The access token is missing, malformed, or no longer valid. Refresh once and retry; a second
17
+ * failure means the Grant is gone and the person has to authorize the application again.
18
+ */
19
+ INVALID_TOKEN: "invalid_token",
20
+ /**
21
+ * The Grant is valid but carries no scope for this operation. Not retryable: the application has
22
+ * to request that scope and the person has to consent to it. The missing one arrives in
23
+ * `error.details.required_scope`.
24
+ */
25
+ INSUFFICIENT_SCOPE: "insufficient_scope",
26
+ /**
27
+ * The Grant covers the scope but not this exact resource -- an account outside the pattern it was
28
+ * given, an action its authorization details do not name.
29
+ */
30
+ INSUFFICIENT_AUTHORIZATION: "insufficient_authorization",
31
+ /**
32
+ * The operation needs a stronger authentication than the session carries. The person completes it
33
+ * and the same request succeeds afterwards.
34
+ */
35
+ STEP_UP_REQUIRED: "step_up_required",
36
+ /** The request arrived from an origin this Client is not registered for. */
37
+ INVALID_ORIGIN: "invalid_origin",
38
+ /**
39
+ * A Service asked for a token and no approved Grant matches its subject and resource. Someone has
40
+ * to approve the permissions in Platform; there is nothing to retry.
41
+ */
42
+ AUTHORIZATION_REQUIRED: "authorization_required",
43
+ /**
44
+ * More than one Grant of the Service matches its subject and resource. `error.details.candidate_grant_ids`
45
+ * names them; pin one with `grant`.
46
+ */
47
+ AMBIGUOUS_GRANT: "ambiguous_grant",
48
+ // -- Request ---------------------------------------------------------------------------------
49
+ /** The request body or parameters did not satisfy the contract. `error.details` names the fields. */
50
+ INVALID_REQUEST: "invalid_request",
51
+ /**
52
+ * An identifier in the path (an account, an Intent) is not well formed. The SDKs check it before
53
+ * any request and fail with this same code, so a typo never reads as `not_found`.
54
+ */
55
+ INVALID_IDENTIFIER: "invalid_identifier",
56
+ /** The addressed resource does not exist, or exists outside what this Grant can see. */
57
+ NOT_FOUND: "not_found",
58
+ /** The route exists and this case of it is not built yet. Not a client error: do not retry. */
59
+ NOT_IMPLEMENTED: "not_implemented",
60
+ /** The `Content-Type` is not one this endpoint accepts. */
61
+ UNSUPPORTED_MEDIA_TYPE: "unsupported_media_type",
62
+ /** The API version in the path is not one this deployment serves. */
63
+ UNSUPPORTED_VERSION: "unsupported_version",
64
+ // -- Money -----------------------------------------------------------------------------------
65
+ /**
66
+ * An `Idempotency-Key` was reused for a different money movement. The first operation stands and
67
+ * this one is refused on purpose: replaying a key with changed values is the shape a duplicated
68
+ * payment takes.
69
+ */
70
+ IDEMPOTENCY_CONFLICT: "idempotency_conflict",
71
+ /**
72
+ * The amount of an Intent is outside what the Grant allows: it exceeds `transactions.maximum` (or
73
+ * differs from `transactions.value`) at creation, or exceeds the approver's maximum at approval,
74
+ * which leaves the Intent pending for another approver. Raised before anything is presented.
75
+ */
76
+ AMOUNT_OUT_OF_GRANT: "amount_out_of_grant",
77
+ /** The alias of an account to open does not match the `bank_account` Grant's alias patterns. */
78
+ ALIAS_OUT_OF_GRANT: "alias_out_of_grant",
79
+ /**
80
+ * The Account Alias is already in use by an account of this subject and `upsert` was not asked, or
81
+ * it belonged to an account that was closed: Aliases are never reused.
82
+ */
83
+ ALIAS_TAKEN: "alias_taken",
84
+ /** The source of a transfer is not one the Grant's `sources` admit. */
85
+ INVALID_SOURCE: "invalid_source",
86
+ /** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
87
+ INVALID_DESTINATION: "invalid_destination",
88
+ /**
89
+ * A deposit named no `destination` and the `bank_deposit` Grant admits more than one account.
90
+ * Name the account in `destination`; a new Grant is not needed.
91
+ */
92
+ DEPOSIT_DESTINATION_AMBIGUOUS: "deposit_destination_ambiguous",
93
+ /** The Intent still needs a person (for example to pick the source account), so it cannot be approved by API. */
94
+ INTERACTION_REQUIRED: "interaction_required",
95
+ /** The source account does not hold enough money for this movement. */
96
+ INSUFFICIENT_FUNDS: "insufficient_funds",
97
+ /** The Intent is not in a state where this operation applies -- already decided, already executed. */
98
+ INVALID_INTENT_STATE: "invalid_intent_state",
99
+ /** The Intent's deadline passed before it was decided. A new Intent is the only way forward. */
100
+ INTENT_EXPIRED: "intent_expired",
101
+ /** The compact JWS carrying the instruction did not verify against a registered signing key. */
102
+ INVALID_SIGNED_INSTRUCTION: "invalid_signed_instruction",
103
+ // -- Pagination ------------------------------------------------------------------------------
104
+ /** The cursor was not issued for this collection, or was issued to a different caller. */
105
+ INVALID_CURSOR: "invalid_cursor",
106
+ /** The cursor was not issued for this account listing. */
107
+ INVALID_ACCOUNTS_CURSOR: "invalid_accounts_cursor",
108
+ /** The cursor was not issued for this event feed. */
109
+ INVALID_EVENT_CURSOR: "invalid_event_cursor",
110
+ // -- Availability ----------------------------------------------------------------------------
111
+ /**
112
+ * Andco could not serve the request and the caller did nothing wrong. Safe to retry with backoff;
113
+ * a money operation should carry the same `Idempotency-Key` when it does.
114
+ */
115
+ TEMPORARILY_UNAVAILABLE: "temporarily_unavailable",
116
+ };