@andco/protocol 0.1.0-ti.2 → 0.1.0-ti.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/intent-input.d.ts +2 -12
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +2 -12
- package/dist/rest/contract.d.ts +11 -11
- package/dist/rest/intents.d.ts +1 -71
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +3 -23
- package/dist/rest/signatures.d.ts +10 -9
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +11 -10
- package/dist/rest/transfers.d.ts +16 -16
- package/dist/rest/transfers.d.ts.map +1 -1
- package/dist/rest/transfers.js +6 -6
- package/dist/transfer.d.ts +10 -10
- package/dist/transfer.d.ts.map +1 -1
- package/dist/transfer.js +10 -9
- package/dist/transport/generated/oauth-api.d.ts +13 -29
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +9 -1
- package/dist/transport/intents.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/intent-input.d.ts
CHANGED
|
@@ -1693,8 +1693,8 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
|
|
|
1693
1693
|
* The verified claims of a Signed Instruction: the `application/jwt` half of the same creation, for
|
|
1694
1694
|
* opening and closing an account.
|
|
1695
1695
|
*
|
|
1696
|
-
* A signed transfer is not here: it
|
|
1697
|
-
* `
|
|
1696
|
+
* A signed transfer is not here: it travels as a `SignedTransferEnvelope` whose claims are
|
|
1697
|
+
* `SignedTransferClaims`, submitted to `POST /transfers` or requested at `POST /intents`.
|
|
1698
1698
|
*
|
|
1699
1699
|
* There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
|
|
1700
1700
|
* instruction, and nothing inside the signature may name another.
|
|
@@ -1976,16 +1976,6 @@ export declare const ANDCO_INTENT_ERROR_CODES: {
|
|
|
1976
1976
|
* holder is not affected.
|
|
1977
1977
|
*/
|
|
1978
1978
|
readonly SIGNED_OUTGOING_TRANSFER_NOT_IMPLEMENTED: "signed_outgoing_transfer_not_implemented";
|
|
1979
|
-
/**
|
|
1980
|
-
* `POST /transfers` answers `400` with this code for a signed transfer with `approved: false`: that
|
|
1981
|
-
* transfer waits for a decision, so it is an Intent. Send it to `POST /intents`. Nothing is recorded.
|
|
1982
|
-
*/
|
|
1983
|
-
readonly APPROVAL_REQUIRED_USE_INTENTS: "approval_required_use_intents";
|
|
1984
|
-
/**
|
|
1985
|
-
* `POST /intents` answers `400` with this code for a signed transfer with `approved: true`: its
|
|
1986
|
-
* signature is the approval, so it is a Transfer. Send it to `POST /transfers`. Nothing is recorded.
|
|
1987
|
-
*/
|
|
1988
|
-
readonly APPROVED_USE_TRANSFERS: "approved_use_transfers";
|
|
1989
1979
|
};
|
|
1990
1980
|
/**
|
|
1991
1981
|
* Identifies recognized unsupported Intents without silently dropping their extra instructions: an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-input.d.ts","sourceRoot":"","sources":["../src/intent-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;AAU3E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;sKAS9B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;+dASxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;4HAK9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;sLAQzC,CAAC;AASF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;2JAQ5B,CAAC;AAgCF,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB;;;;;;2EAGlC,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,qBAAqB;;;;;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WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,eAAe,CAAC,CAEjF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;IACnC,4EAA4E;;IAE5E;;;OAGG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;CAEK,CAAC;AAEX;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAWzE;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;aASrC,CAAC;AAEH,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEpF;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,GAAG,UAAU,CAAC,GAAG,KAAK,EAAE,CAE7G;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAE3F"}
|
package/dist/intent-input.js
CHANGED
|
@@ -386,8 +386,8 @@ export const SignedAccountClosureIntentClaimsSchema = /* @__PURE__ */ v.pipe(wit
|
|
|
386
386
|
* The verified claims of a Signed Instruction: the `application/jwt` half of the same creation, for
|
|
387
387
|
* opening and closing an account.
|
|
388
388
|
*
|
|
389
|
-
* A signed transfer is not here: it
|
|
390
|
-
* `
|
|
389
|
+
* A signed transfer is not here: it travels as a `SignedTransferEnvelope` whose claims are
|
|
390
|
+
* `SignedTransferClaims`, submitted to `POST /transfers` or requested at `POST /intents`.
|
|
391
391
|
*
|
|
392
392
|
* There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
|
|
393
393
|
* instruction, and nothing inside the signature may name another.
|
|
@@ -516,16 +516,6 @@ export const ANDCO_INTENT_ERROR_CODES = {
|
|
|
516
516
|
* holder is not affected.
|
|
517
517
|
*/
|
|
518
518
|
SIGNED_OUTGOING_TRANSFER_NOT_IMPLEMENTED: "signed_outgoing_transfer_not_implemented",
|
|
519
|
-
/**
|
|
520
|
-
* `POST /transfers` answers `400` with this code for a signed transfer with `approved: false`: that
|
|
521
|
-
* transfer waits for a decision, so it is an Intent. Send it to `POST /intents`. Nothing is recorded.
|
|
522
|
-
*/
|
|
523
|
-
APPROVAL_REQUIRED_USE_INTENTS: "approval_required_use_intents",
|
|
524
|
-
/**
|
|
525
|
-
* `POST /intents` answers `400` with this code for a signed transfer with `approved: true`: its
|
|
526
|
-
* signature is the approval, so it is a Transfer. Send it to `POST /transfers`. Nothing is recorded.
|
|
527
|
-
*/
|
|
528
|
-
APPROVED_USE_TRANSFERS: "approved_use_transfers",
|
|
529
519
|
};
|
|
530
520
|
/**
|
|
531
521
|
* Identifies recognized unsupported Intents without silently dropping their extra instructions: an
|
package/dist/rest/contract.d.ts
CHANGED
|
@@ -1869,7 +1869,7 @@ export declare const contract: {
|
|
|
1869
1869
|
server_time: string;
|
|
1870
1870
|
created_at: string;
|
|
1871
1871
|
authorization_url: string;
|
|
1872
|
-
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").
|
|
1872
|
+
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./intents.js").AccountKeyOutOfGrant, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./intents.js").DepositAmountOutOfBounds, typeof import("./intents.js").DepositDestinationAmbiguous, typeof import("./intents.js").DestinationNotOwnAccount, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").UnsupportedBank, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankAccountNumberMissing, typeof import("./intents.js").BankAuthorizationDenied, typeof import("./intents.js").BankHolderWithoutAccount, typeof import("./intents.js").BankAccountLimitReached, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1873
1873
|
createTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1874
1874
|
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
|
|
1875
1875
|
readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -1947,8 +1947,8 @@ export declare const contract: {
|
|
|
1947
1947
|
national_id: string | null;
|
|
1948
1948
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
1949
1949
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
1950
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
1951
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
1950
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
1951
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
1952
1952
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
1953
1953
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
1954
1954
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -1982,7 +1982,7 @@ export declare const contract: {
|
|
|
1982
1982
|
jti: string | null;
|
|
1983
1983
|
transaction_id: string | null;
|
|
1984
1984
|
created_at: string;
|
|
1985
|
-
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").
|
|
1985
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./transfers.js").SenderMismatch, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1986
1986
|
getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1987
1987
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
1988
1988
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -2563,8 +2563,8 @@ export declare const contract: {
|
|
|
2563
2563
|
national_id: string | null;
|
|
2564
2564
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2565
2565
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2566
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
2567
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
2566
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
2567
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2568
2568
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2569
2569
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2570
2570
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -2778,8 +2778,8 @@ export declare const contract: {
|
|
|
2778
2778
|
national_id: string | null;
|
|
2779
2779
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2780
2780
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2781
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
2782
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
2781
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
2782
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2783
2783
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2784
2784
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2785
2785
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -3298,8 +3298,8 @@ export declare const contract: {
|
|
|
3298
3298
|
national_id: string | null;
|
|
3299
3299
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
3300
3300
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
3301
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
3302
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
3301
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
3302
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
3303
3303
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
3304
3304
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
3305
3305
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -4111,7 +4111,7 @@ export declare const contract: {
|
|
|
4111
4111
|
claims: {
|
|
4112
4112
|
[x: string]: unknown;
|
|
4113
4113
|
};
|
|
4114
|
-
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
4114
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./signatures.js").UnverifiedSignedInstruction, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
4115
4115
|
};
|
|
4116
4116
|
/**
|
|
4117
4117
|
* The Valibot schemas the OpenAPI document writes once under `components.schemas`, by name, and
|
package/dist/rest/intents.d.ts
CHANGED
|
@@ -34,76 +34,6 @@ declare const IdempotencyKeyNotAllowed_base: (abstract new (data: {}, message?:
|
|
|
34
34
|
export declare class IdempotencyKeyNotAllowed extends /* @__PURE__ */ IdempotencyKeyNotAllowed_base {
|
|
35
35
|
constructor(message?: string);
|
|
36
36
|
}
|
|
37
|
-
declare const ApprovalRequiredUseIntents_base: (abstract new (data: {}, message?: string, hint?: string) => {
|
|
38
|
-
readonly error: "approval_required_use_intents";
|
|
39
|
-
readonly hint?: string;
|
|
40
|
-
readonly data: {};
|
|
41
|
-
name: string;
|
|
42
|
-
message: string;
|
|
43
|
-
stack?: string;
|
|
44
|
-
cause?: unknown;
|
|
45
|
-
}) & {
|
|
46
|
-
readonly error: "approval_required_use_intents";
|
|
47
|
-
readonly status: 400;
|
|
48
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`POST /transfers` takes only a signed transfer with `approved: true`. Send one with `approved: false` to `POST /intents`.">]>;
|
|
49
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
|
|
50
|
-
readonly error: Code;
|
|
51
|
-
readonly hint?: string;
|
|
52
|
-
readonly data: v.InferOutput<Data>;
|
|
53
|
-
name: string;
|
|
54
|
-
message: string;
|
|
55
|
-
stack?: string;
|
|
56
|
-
cause?: unknown;
|
|
57
|
-
}) & {
|
|
58
|
-
readonly error: Code;
|
|
59
|
-
readonly status: Status;
|
|
60
|
-
readonly data: Data;
|
|
61
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* A signed transfer with `approved: false` arrived at `POST /transfers`. That door takes a transfer
|
|
66
|
-
* its own signature approved. A signed transfer that waits for a decision is an Intent: send it to
|
|
67
|
-
* `POST /intents`. Nothing was recorded.
|
|
68
|
-
*/
|
|
69
|
-
export declare class ApprovalRequiredUseIntents extends /* @__PURE__ */ ApprovalRequiredUseIntents_base {
|
|
70
|
-
constructor(message?: string);
|
|
71
|
-
}
|
|
72
|
-
declare const ApprovedUseTransfers_base: (abstract new (data: {}, message?: string, hint?: string) => {
|
|
73
|
-
readonly error: "approved_use_transfers";
|
|
74
|
-
readonly hint?: string;
|
|
75
|
-
readonly data: {};
|
|
76
|
-
name: string;
|
|
77
|
-
message: string;
|
|
78
|
-
stack?: string;
|
|
79
|
-
cause?: unknown;
|
|
80
|
-
}) & {
|
|
81
|
-
readonly error: "approved_use_transfers";
|
|
82
|
-
readonly status: 400;
|
|
83
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`POST /intents` takes a signed transfer only with `approved: false`. Send one with `approved: true` to `POST /transfers`.">]>;
|
|
84
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
|
|
85
|
-
readonly error: Code;
|
|
86
|
-
readonly hint?: string;
|
|
87
|
-
readonly data: v.InferOutput<Data>;
|
|
88
|
-
name: string;
|
|
89
|
-
message: string;
|
|
90
|
-
stack?: string;
|
|
91
|
-
cause?: unknown;
|
|
92
|
-
}) & {
|
|
93
|
-
readonly error: Code;
|
|
94
|
-
readonly status: Status;
|
|
95
|
-
readonly data: Data;
|
|
96
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* A signed transfer with `approved: true` arrived at `POST /intents`. Its signature is the approval,
|
|
101
|
-
* so no decision is left to wait for: send it to `POST /transfers`. A signed account opening or
|
|
102
|
-
* closure with `approved: true` stays accepted here. Nothing was recorded.
|
|
103
|
-
*/
|
|
104
|
-
export declare class ApprovedUseTransfers extends /* @__PURE__ */ ApprovedUseTransfers_base {
|
|
105
|
-
constructor(message?: string);
|
|
106
|
-
}
|
|
107
37
|
declare const InvalidSignedInstruction_base: (abstract new (data: {
|
|
108
38
|
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
|
|
109
39
|
issues?: {
|
|
@@ -3158,7 +3088,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
|
|
|
3158
3088
|
server_time: string;
|
|
3159
3089
|
created_at: string;
|
|
3160
3090
|
authorization_url: string;
|
|
3161
|
-
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof
|
|
3091
|
+
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof InvalidSignedInstruction, typeof InvalidToken, typeof ExpiredSignedInstruction, typeof InvalidOrigin, typeof InsufficientAuthorization, typeof AccountKeyOutOfGrant, typeof NotFound, typeof UnsupportedVersion, typeof ServerError, typeof IdempotencyConflict, typeof IntentInteractionRequired, typeof AccountKeyTaken, typeof BankAccountQuotaExceeded, typeof InvalidIntentState, typeof IntentExpired, typeof PayloadTooLarge, typeof UnsupportedMediaType, typeof DepositAmountOutOfBounds, typeof DepositDestinationAmbiguous, typeof DestinationNotOwnAccount, typeof AmountOutOfGrant, typeof InvalidSource, typeof InvalidDestination, typeof TransferSenderIdentityUnavailable, typeof UnsupportedBank, typeof BankConnectionUnavailable, typeof BankAccountNumberMissing, typeof BankAuthorizationDenied, typeof BankHolderWithoutAccount, typeof BankAccountLimitReached, typeof BankRefused, typeof InsufficientFunds, typeof BankRejected, typeof BankReviewRequired, typeof NotImplemented, typeof TemporarilyUnavailable]>>;
|
|
3162
3092
|
/** Reads one Intent created under the same exact OAuth Grant. */
|
|
3163
3093
|
export declare const getIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
3164
3094
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/rest/intents.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAc7B,OAAO,EAEL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EAER,eAAe,EACf,WAAW,EACX,sBAAsB,EAC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class IdempotencyKeyNotAllowed extends /* @__PURE__ */ AndcoAPIError.defi
|
|
|
26
26
|
super({}, message);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* A signed transfer with `approved: false` arrived at `POST /transfers`. That door takes a transfer
|
|
31
|
-
* its own signature approved. A signed transfer that waits for a decision is an Intent: send it to
|
|
32
|
-
* `POST /intents`. Nothing was recorded.
|
|
33
|
-
*/
|
|
34
|
-
export class ApprovalRequiredUseIntents extends /* @__PURE__ */ AndcoAPIError.define("approval_required_use_intents", 400, v.pipe(v.object({}), v.description("`POST /transfers` takes only a signed transfer with `approved: true`. Send one with `approved: false` to `POST /intents`."))) {
|
|
35
|
-
constructor(message) {
|
|
36
|
-
super({}, message);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* A signed transfer with `approved: true` arrived at `POST /intents`. Its signature is the approval,
|
|
41
|
-
* so no decision is left to wait for: send it to `POST /transfers`. A signed account opening or
|
|
42
|
-
* closure with `approved: true` stays accepted here. Nothing was recorded.
|
|
43
|
-
*/
|
|
44
|
-
export class ApprovedUseTransfers extends /* @__PURE__ */ AndcoAPIError.define("approved_use_transfers", 400, v.pipe(v.object({}), v.description("`POST /intents` takes a signed transfer only with `approved: false`. Send one with `approved: true` to `POST /transfers`."))) {
|
|
45
|
-
constructor(message) {
|
|
46
|
-
super({}, message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
29
|
/**
|
|
50
30
|
* The Signed Instruction sent to create an Intent was refused: it did not verify (`reason` names the
|
|
51
31
|
* one cause), or its verified claims are not an Intent (`invalid_claims`, with `issues`). An expired
|
|
@@ -465,20 +445,20 @@ export const createIntent = /* @__PURE__ */ oc
|
|
|
465
445
|
method: "POST",
|
|
466
446
|
path: "/intents",
|
|
467
447
|
summary: "Create an intent under the exact OAuth Grant",
|
|
468
|
-
description: "The same creation has three representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. An `application/jose+json` body is a signed transfer
|
|
448
|
+
description: "The same creation has three representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. An `application/jose+json` body is a signed transfer: a `SignedTransferEnvelope`, a JWS in the General JSON Serialization, whose payload is `SignedTransferClaims` (no `approved`: this route is the request, `POST /transfers` the submission). It creates a transfer Intent that waits for a member of the holder to approve it in AndCo (dual control) and answers a TransferIntent with `transfer_id` null. The Intent waits until it is decided or until its deadline, `min(exp, 24 hours after its creation)`, passes; on approval AndCo sends that same signed instruction to the bank, so the Transfer is the one the signature describes. It is verified as `POST /transfers` verifies a signed transfer, with the same rules for the `jti` (a UUID in lowercase, and the only idempotency-key), `exp`, the keys, the `sender` and the `receiver`; the `unusable_key` reason means that the key is registered, but AndCo could not load it to check this signature, so its person registers a new key and revokes this one, then you sign again. A repeat of the same envelope answers the same Intent, and another body under the same `jti` answers `409 idempotency_conflict`. A signed account opening or closure with `approved: true` stays accepted here and is born approved. A string body sent as anything but `application/jwt` answers `415 unsupported_media_type`. A Signed Instruction that does not verify answers `400 invalid_signed_instruction` with its `reason`, and one whose `exp` passed `401 expired_signed_instruction`. A signed account Intent is born approved when the signing client's Grant holds the family's `approve` action (`bank_account`); otherwise it waits, like a proposal, for the person on the hosted screen or for `POST /intents/{intent_id}/approve` by a Grant that holds it. Opening and closing an account fail synchronously with `403 account_key_out_of_grant` when the account_key is outside the Grant's `accounts` patterns and with `409 account_key_taken` when the account_key names an account of the subject (always for a closed one; otherwise unless `upsert`). The new account's number arrives in the `account_opening.succeeded` event as `account: { id, accountKey, number, name }`. Once the request is valid and authorized (a malformed body is still `400 invalid_request` and a Grant without the permission still `403 insufficient_authorization`), an opening and a `bank_transfer` proposal between two accounts of the same holder work where the bank serves them: the answer is `201` with the Intent `requires_action` and its `authorization_url`, or, for a signed account Intent whose signer also holds the family's `approve`, the Intent born `approved`. A transfer that `bank_own_account_transfer` covers is released at once instead (below). Where the deployment's bank does not serve one, the same request answers `501 not_implemented` with `code: account_opening_not_implemented` or `code: own_account_transfer_not_implemented`; a closure always answers `501 not_implemented` with `code: account_closure_not_implemented`. Nothing is created in those cases. A subject without a bank connection to a company cannot open an account: `422 bank_connection_unavailable` with the `intent_id`. A signed account Intent born approved answers the refusals of `POST /intents/{intent_id}/approve`.\n\nA `transfer` proposal needs `bank_transfer` `create` or `bank_own_account_transfer` `create`. When the Grant holds `bank_own_account_transfer` `create` whose `accounts` cover the named `sender` and `receiver` (two different active accounts of the Grant's subject) and the amount is not `editable`, the answer is a TransferIntent born `approved` with `transfer_id` set: nobody decides it, and it is released at once with nobody present. Its outcome lives on the Transfer, which reads `processing` and then `succeeded` or `failed`, never on the Intent. The same `Idempotency-Key` never names both kinds of transfer (`409 idempotency_conflict`). Any other transfer is a `bank_transfer` proposal, bounded by that detail alone. A Grant that holds no `bank_transfer` `create` refuses what `bank_own_account_transfer` does not cover with nothing created: `422 destination_not_own_account` when the `receiver` is missing or is not an account of the subject, `422 invalid_source` when the `sender` is missing, unusable or outside `accounts`, `422 invalid_destination` when the `receiver` cannot receive (closed, another currency, the `sender` itself) or is outside `accounts`, and `400 invalid_request` with the detail `transfer_amount_not_editable` for an editable amount. Where the deployment's bank does not serve transfers between own accounts, `501 not_implemented` with `code: own_account_transfer_not_implemented`. If the release cannot go on because only a person can, the answer is `409 interaction_required` before anything is stored. If it fails after the Transfer was stored, the same request sent again releases that Transfer again and answers the same Intent. An approved Intent has no client cancel.",
|
|
469
449
|
successStatus: 201,
|
|
470
450
|
successDescription: "Intent created or returned from an idempotent retry",
|
|
471
451
|
inputStructure: "detailed",
|
|
472
452
|
spec: (operation) => servedAsSignedInstructionOrTransfer(withCanonicalHeaderNames(operation)),
|
|
473
453
|
}))
|
|
474
|
-
.errors(errors(InvalidRequest, IdempotencyKeyNotAllowed,
|
|
454
|
+
.errors(errors(InvalidRequest, IdempotencyKeyNotAllowed, InvalidSignedInstruction, InvalidToken, ExpiredSignedInstruction, InvalidOrigin, InsufficientAuthorization, AccountKeyOutOfGrant, NotFound, UnsupportedVersion, ServerError, IdempotencyConflict, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, PayloadTooLarge, UnsupportedMediaType, DepositAmountOutOfBounds, DepositDestinationAmbiguous, DestinationNotOwnAccount, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
|
|
475
455
|
.input(v.object({
|
|
476
456
|
headers: v.object({
|
|
477
457
|
"idempotency-key": v.pipe(v.optional(v.pipe(v.string(), v.regex(/^[A-Za-z0-9._:-]{1,128}$/))), v.description("Required with `application/json`, and refused with `application/jwt` and `application/jose+json`, which answer `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.")),
|
|
478
458
|
}),
|
|
479
459
|
body: v.union([
|
|
480
460
|
IntentCreateSchema,
|
|
481
|
-
signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key
|
|
461
|
+
signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key of a person who may sign for the Grant's holder. The body is the serialized token, not a JSON object: what the claim schemas describe is its decoded payload.", {
|
|
482
462
|
oneOf: [
|
|
483
463
|
{ $ref: "#/components/schemas/SignedAccountOpeningIntentClaims" },
|
|
484
464
|
{ $ref: "#/components/schemas/SignedAccountClosureIntentClaims" },
|
|
@@ -4,8 +4,8 @@ import { InvalidOrigin, InvalidToken, PayloadTooLarge, ServerError, TemporarilyU
|
|
|
4
4
|
export declare const SIGNED_INSTRUCTION_MEDIA_TYPE = "application/jwt";
|
|
5
5
|
/**
|
|
6
6
|
* The media type a signed transfer travels as: a JWS in the General JSON Serialization (RFC 7515
|
|
7
|
-
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it
|
|
8
|
-
*
|
|
7
|
+
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it to submit the transfer now, and
|
|
8
|
+
* `POST /intents` takes the same envelope to request a decision on it.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SIGNED_TRANSFER_MEDIA_TYPE = "application/jose+json";
|
|
11
11
|
/**
|
|
@@ -40,9 +40,10 @@ export declare function servedAsSignedInstructionOrTransfer(operation: Record<st
|
|
|
40
40
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
41
41
|
* that was wrong, and any of those from a payload altered in flight.
|
|
42
42
|
*
|
|
43
|
-
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents`
|
|
44
|
-
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key
|
|
45
|
-
*
|
|
43
|
+
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents` for a signed transfer):
|
|
44
|
+
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key that signed the
|
|
45
|
+
* transfer and is not active for transfers yet (its person activates it in her settings with one AndCo
|
|
46
|
+
* verification, then the same envelope is sent again); `unusable_key`, a key that is registered but that AndCo could not
|
|
46
47
|
* load to check this signature (its person registers a new key and revokes this one, then you sign
|
|
47
48
|
* again); and `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the submission
|
|
48
49
|
* (a repeat of a stored transfer is never refused for it).
|
|
@@ -73,7 +74,7 @@ declare const UnverifiedSignedInstruction_base: (abstract new (data: {
|
|
|
73
74
|
}, undefined>, v.DescriptionAction<{
|
|
74
75
|
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
75
76
|
key_id: string | null;
|
|
76
|
-
}, "The assertion did not verify against the
|
|
77
|
+
}, "The assertion did not verify against the Signing Keys of a person who may sign for the Grant's holder.">]>;
|
|
77
78
|
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
|
|
78
79
|
readonly error: Code;
|
|
79
80
|
readonly hint?: string;
|
|
@@ -111,10 +112,10 @@ export declare const SignedInstructionVerification: v.SchemaWithPipe<readonly [v
|
|
|
111
112
|
claims: {
|
|
112
113
|
[x: string]: unknown;
|
|
113
114
|
};
|
|
114
|
-
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
115
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>;
|
|
115
116
|
/** The verified `kid`, algorithm and claims of a Signed Instruction. */
|
|
116
117
|
export type SignedInstructionVerification = v.InferOutput<typeof SignedInstructionVerification>;
|
|
117
|
-
/** Verifies a Signed Instruction against the
|
|
118
|
+
/** Verifies a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it. */
|
|
118
119
|
export declare const verifySignature: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
120
|
readonly key_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "RFC 7638 JWK Thumbprint of the Signing Key that verified the assertion.">]>;
|
|
120
121
|
readonly algorithm: v.PicklistSchema<["RS256", "ES256"], undefined>;
|
|
@@ -125,6 +126,6 @@ export declare const verifySignature: import("@orpc/contract").ProcedureContract
|
|
|
125
126
|
claims: {
|
|
126
127
|
[x: string]: unknown;
|
|
127
128
|
};
|
|
128
|
-
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
129
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidToken, typeof InvalidOrigin, typeof UnsupportedVersion, typeof ServerError, typeof PayloadTooLarge, typeof UnsupportedMediaType, typeof UnverifiedSignedInstruction, typeof TemporarilyUnavailable]>>;
|
|
129
130
|
export {};
|
|
130
131
|
//# sourceMappingURL=signatures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/rest/signatures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAKlE;;;;;;;;GAQG;AAEH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kJAM1F;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBrG;AA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MAAM,EAAE,gCAAgC,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,MAAM;CAGxG;AAED,wEAAwE;AACxE,eAAO,MAAM,6BAA6B;;;;;;;;;;8WAYzC,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEhG,4HAA4H;AAC5H,eAAO,MAAM,eAAe;;;;;;;;;;unBA0BY,CAAC"}
|
package/dist/rest/signatures.js
CHANGED
|
@@ -7,8 +7,8 @@ import { http } from "./http.js";
|
|
|
7
7
|
export const SIGNED_INSTRUCTION_MEDIA_TYPE = "application/jwt";
|
|
8
8
|
/**
|
|
9
9
|
* The media type a signed transfer travels as: a JWS in the General JSON Serialization (RFC 7515
|
|
10
|
-
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it
|
|
11
|
-
*
|
|
10
|
+
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it to submit the transfer now, and
|
|
11
|
+
* `POST /intents` takes the same envelope to request a decision on it.
|
|
12
12
|
*/
|
|
13
13
|
export const SIGNED_TRANSFER_MEDIA_TYPE = "application/jose+json";
|
|
14
14
|
/** What a compact JWS looks like: three base64url segments separated by dots. */
|
|
@@ -103,9 +103,10 @@ export function servedAsSignedInstructionOrTransfer(operation) {
|
|
|
103
103
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
104
104
|
* that was wrong, and any of those from a payload altered in flight.
|
|
105
105
|
*
|
|
106
|
-
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents`
|
|
107
|
-
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key
|
|
108
|
-
*
|
|
106
|
+
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents` for a signed transfer):
|
|
107
|
+
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key that signed the
|
|
108
|
+
* transfer and is not active for transfers yet (its person activates it in her settings with one AndCo
|
|
109
|
+
* verification, then the same envelope is sent again); `unusable_key`, a key that is registered but that AndCo could not
|
|
109
110
|
* load to check this signature (its person registers a new key and revokes this one, then you sign
|
|
110
111
|
* again); and `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the submission
|
|
111
112
|
* (a repeat of a stored transfer is never refused for it).
|
|
@@ -139,7 +140,7 @@ export const SignedInstructionRejectionReason = /* @__PURE__ */ v.picklist([
|
|
|
139
140
|
export class UnverifiedSignedInstruction extends /* @__PURE__ */ AndcoAPIError.define("unverified_signed_instruction", 422, v.pipe(v.object({
|
|
140
141
|
reason: v.pipe(SignedInstructionRejectionReason, v.description("The one cause, never a generic failure.")),
|
|
141
142
|
key_id: v.pipe(v.nullable(v.string()), v.description("The `kid` the assertion declared, when one could be read from it.")),
|
|
142
|
-
}), v.description("The assertion did not verify against the
|
|
143
|
+
}), v.description("The assertion did not verify against the Signing Keys of a person who may sign for the Grant's holder."))) {
|
|
143
144
|
constructor(data, message) {
|
|
144
145
|
super(data, message);
|
|
145
146
|
}
|
|
@@ -149,14 +150,14 @@ export const SignedInstructionVerification = /* @__PURE__ */ v.pipe(v.object({
|
|
|
149
150
|
key_id: v.pipe(v.string(), v.description("RFC 7638 JWK Thumbprint of the Signing Key that verified the assertion.")),
|
|
150
151
|
algorithm: v.picklist(["RS256", "ES256"]),
|
|
151
152
|
claims: v.record(v.string(), v.unknown()),
|
|
152
|
-
}), v.description("The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
153
|
-
/** Verifies a Signed Instruction against the
|
|
153
|
+
}), v.description("The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema."));
|
|
154
|
+
/** Verifies a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it. */
|
|
154
155
|
export const verifySignature = /* @__PURE__ */ oc
|
|
155
156
|
.meta(http({
|
|
156
157
|
method: "POST",
|
|
157
158
|
path: "/signatures/verify",
|
|
158
|
-
summary: "Verify a Signed Instruction against the
|
|
159
|
-
description: "Verifies the assertion's signature, `kid`, algorithm, issuer, audience and expiration against the Signing Keys the
|
|
159
|
+
summary: "Verify a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it",
|
|
160
|
+
description: "Verifies the assertion's signature, `kid`, algorithm, issuer, audience and expiration against the Signing Keys of a person who may sign for the Grant's holder (a key belongs to a person, who registers it in her own settings), and returns its verified claims untouched. Acts on nothing: this is the smallest surface that exercises signing end to end, so an integrator can confirm that the key registered for it, the `kid` its SDK derived and the claims it signs all line up before any of them is submitted to create, execute or approve an Intent. Requires only a valid OAuth bearer token, no scope or authorization detail.",
|
|
160
161
|
successDescription: "The assertion verified; its claims as signed",
|
|
161
162
|
spec: servedAsSignedInstruction,
|
|
162
163
|
}))
|