@atbas/m-mcp 0.1.0
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/LICENSE +21 -0
- package/README.md +364 -0
- package/dist/builder/transaction-builder.d.ts +53 -0
- package/dist/builder/transaction-builder.d.ts.map +1 -0
- package/dist/builder/transaction-builder.js +159 -0
- package/dist/builder/transaction-builder.js.map +1 -0
- package/dist/catalogue/default-catalogue.d.ts +18 -0
- package/dist/catalogue/default-catalogue.d.ts.map +1 -0
- package/dist/catalogue/default-catalogue.js +21 -0
- package/dist/catalogue/default-catalogue.js.map +1 -0
- package/dist/catalogue/endpoints.d.ts +22 -0
- package/dist/catalogue/endpoints.d.ts.map +1 -0
- package/dist/catalogue/endpoints.js +24 -0
- package/dist/catalogue/endpoints.js.map +1 -0
- package/dist/catalogue/flows.d.ts +32 -0
- package/dist/catalogue/flows.d.ts.map +1 -0
- package/dist/catalogue/flows.js +64 -0
- package/dist/catalogue/flows.js.map +1 -0
- package/dist/catalogue/hash-options.d.ts +112 -0
- package/dist/catalogue/hash-options.d.ts.map +1 -0
- package/dist/catalogue/hash-options.js +151 -0
- package/dist/catalogue/hash-options.js.map +1 -0
- package/dist/catalogue/types.d.ts +279 -0
- package/dist/catalogue/types.d.ts.map +1 -0
- package/dist/catalogue/types.js +360 -0
- package/dist/catalogue/types.js.map +1 -0
- package/dist/codegen/generate.d.ts +14 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/generate.js +490 -0
- package/dist/codegen/generate.js.map +1 -0
- package/dist/codegen/languages/node.d.ts +3 -0
- package/dist/codegen/languages/node.d.ts.map +1 -0
- package/dist/codegen/languages/node.js +32 -0
- package/dist/codegen/languages/node.js.map +1 -0
- package/dist/codegen/languages/php.d.ts +3 -0
- package/dist/codegen/languages/php.d.ts.map +1 -0
- package/dist/codegen/languages/php.js +27 -0
- package/dist/codegen/languages/php.js.map +1 -0
- package/dist/codegen/languages/python.d.ts +3 -0
- package/dist/codegen/languages/python.d.ts.map +1 -0
- package/dist/codegen/languages/python.js +27 -0
- package/dist/codegen/languages/python.js.map +1 -0
- package/dist/codegen/renderer.d.ts +24 -0
- package/dist/codegen/renderer.d.ts.map +1 -0
- package/dist/codegen/renderer.js +59 -0
- package/dist/codegen/renderer.js.map +1 -0
- package/dist/codegen/types.d.ts +50 -0
- package/dist/codegen/types.d.ts.map +1 -0
- package/dist/codegen/types.js +5 -0
- package/dist/codegen/types.js.map +1 -0
- package/dist/config/credentials.d.ts +64 -0
- package/dist/config/credentials.d.ts.map +1 -0
- package/dist/config/credentials.js +216 -0
- package/dist/config/credentials.js.map +1 -0
- package/dist/config/environment.d.ts +23 -0
- package/dist/config/environment.d.ts.map +1 -0
- package/dist/config/environment.js +54 -0
- package/dist/config/environment.js.map +1 -0
- package/dist/core/dependencies.d.ts +43 -0
- package/dist/core/dependencies.d.ts.map +1 -0
- package/dist/core/dependencies.js +2 -0
- package/dist/core/dependencies.js.map +1 -0
- package/dist/core/registry.d.ts +33 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +13 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/server.d.ts +61 -0
- package/dist/core/server.d.ts.map +1 -0
- package/dist/core/server.js +90 -0
- package/dist/core/server.js.map +1 -0
- package/dist/dependencies.d.ts +28 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +2 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/diagnostics/diagnose.d.ts +43 -0
- package/dist/diagnostics/diagnose.d.ts.map +1 -0
- package/dist/diagnostics/diagnose.js +121 -0
- package/dist/diagnostics/diagnose.js.map +1 -0
- package/dist/domain/amount.d.ts +157 -0
- package/dist/domain/amount.d.ts.map +1 -0
- package/dist/domain/amount.js +275 -0
- package/dist/domain/amount.js.map +1 -0
- package/dist/domain/datetime.d.ts +95 -0
- package/dist/domain/datetime.d.ts.map +1 -0
- package/dist/domain/datetime.js +211 -0
- package/dist/domain/datetime.js.map +1 -0
- package/dist/domain/response-codes.d.ts +116 -0
- package/dist/domain/response-codes.d.ts.map +1 -0
- package/dist/domain/response-codes.js +380 -0
- package/dist/domain/response-codes.js.map +1 -0
- package/dist/domain/secure-hash.d.ts +78 -0
- package/dist/domain/secure-hash.d.ts.map +1 -0
- package/dist/domain/secure-hash.js +69 -0
- package/dist/domain/secure-hash.js.map +1 -0
- package/dist/domain/signature/jazzcash.d.ts +56 -0
- package/dist/domain/signature/jazzcash.d.ts.map +1 -0
- package/dist/domain/signature/jazzcash.js +214 -0
- package/dist/domain/signature/jazzcash.js.map +1 -0
- package/dist/domain/signature/registry.d.ts +69 -0
- package/dist/domain/signature/registry.d.ts.map +1 -0
- package/dist/domain/signature/registry.js +92 -0
- package/dist/domain/signature/registry.js.map +1 -0
- package/dist/domain/signature/scheme.d.ts +349 -0
- package/dist/domain/signature/scheme.d.ts.map +1 -0
- package/dist/domain/signature/scheme.js +398 -0
- package/dist/domain/signature/scheme.js.map +1 -0
- package/dist/domain/txn-ref.d.ts +76 -0
- package/dist/domain/txn-ref.d.ts.map +1 -0
- package/dist/domain/txn-ref.js +126 -0
- package/dist/domain/txn-ref.js.map +1 -0
- package/dist/domain/types.d.ts +45 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/domain/types.js +70 -0
- package/dist/domain/types.js.map +1 -0
- package/dist/errors.d.ts +84 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +87 -0
- package/dist/errors.js.map +1 -0
- package/dist/gateway/checkout-form.d.ts +16 -0
- package/dist/gateway/checkout-form.d.ts.map +1 -0
- package/dist/gateway/checkout-form.js +103 -0
- package/dist/gateway/checkout-form.js.map +1 -0
- package/dist/gateway/checkout-output.d.ts +70 -0
- package/dist/gateway/checkout-output.d.ts.map +1 -0
- package/dist/gateway/checkout-output.js +199 -0
- package/dist/gateway/checkout-output.js.map +1 -0
- package/dist/gateway/guards.d.ts +37 -0
- package/dist/gateway/guards.d.ts.map +1 -0
- package/dist/gateway/guards.js +44 -0
- package/dist/gateway/guards.js.map +1 -0
- package/dist/gateway/http-client.d.ts +42 -0
- package/dist/gateway/http-client.d.ts.map +1 -0
- package/dist/gateway/http-client.js +153 -0
- package/dist/gateway/http-client.js.map +1 -0
- package/dist/gateway/rest-client.d.ts +42 -0
- package/dist/gateway/rest-client.d.ts.map +1 -0
- package/dist/gateway/rest-client.js +241 -0
- package/dist/gateway/rest-client.js.map +1 -0
- package/dist/gateway/transport.d.ts +31 -0
- package/dist/gateway/transport.d.ts.map +1 -0
- package/dist/gateway/transport.js +73 -0
- package/dist/gateway/transport.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/install/cli.d.ts +38 -0
- package/dist/install/cli.d.ts.map +1 -0
- package/dist/install/cli.js +274 -0
- package/dist/install/cli.js.map +1 -0
- package/dist/install/harnesses.d.ts +74 -0
- package/dist/install/harnesses.d.ts.map +1 -0
- package/dist/install/harnesses.js +263 -0
- package/dist/install/harnesses.js.map +1 -0
- package/dist/knowledge/corpus.d.ts +15 -0
- package/dist/knowledge/corpus.d.ts.map +1 -0
- package/dist/knowledge/corpus.js +129 -0
- package/dist/knowledge/corpus.js.map +1 -0
- package/dist/knowledge/search.d.ts +29 -0
- package/dist/knowledge/search.d.ts.map +1 -0
- package/dist/knowledge/search.js +181 -0
- package/dist/knowledge/search.js.map +1 -0
- package/dist/knowledge/source.d.ts +60 -0
- package/dist/knowledge/source.d.ts.map +1 -0
- package/dist/knowledge/source.js +91 -0
- package/dist/knowledge/source.js.map +1 -0
- package/dist/knowledge/types.d.ts +40 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +19 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/paths.d.ts +26 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +106 -0
- package/dist/paths.js.map +1 -0
- package/dist/prompts/integration-walkthrough.d.ts +11 -0
- package/dist/prompts/integration-walkthrough.d.ts.map +1 -0
- package/dist/prompts/integration-walkthrough.js +52 -0
- package/dist/prompts/integration-walkthrough.js.map +1 -0
- package/dist/prompts/register.d.ts +4 -0
- package/dist/prompts/register.d.ts.map +1 -0
- package/dist/prompts/register.js +4 -0
- package/dist/prompts/register.js.map +1 -0
- package/dist/registry.d.ts +14 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/resources/knowledge-resources.d.ts +5 -0
- package/dist/resources/knowledge-resources.d.ts.map +1 -0
- package/dist/resources/knowledge-resources.js +121 -0
- package/dist/resources/knowledge-resources.js.map +1 -0
- package/dist/resources/register.d.ts +4 -0
- package/dist/resources/register.d.ts.map +1 -0
- package/dist/resources/register.js +8 -0
- package/dist/resources/register.js.map +1 -0
- package/dist/server.d.ts +40 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +56 -0
- package/dist/server.js.map +1 -0
- package/dist/telemetry/logger.d.ts +31 -0
- package/dist/telemetry/logger.d.ts.map +1 -0
- package/dist/telemetry/logger.js +67 -0
- package/dist/telemetry/logger.js.map +1 -0
- package/dist/telemetry/redaction.d.ts +88 -0
- package/dist/telemetry/redaction.d.ts.map +1 -0
- package/dist/telemetry/redaction.js +238 -0
- package/dist/telemetry/redaction.js.map +1 -0
- package/dist/tools/build-transaction-parameters.d.ts +10 -0
- package/dist/tools/build-transaction-parameters.d.ts.map +1 -0
- package/dist/tools/build-transaction-parameters.js +154 -0
- package/dist/tools/build-transaction-parameters.js.map +1 -0
- package/dist/tools/call-context.d.ts +47 -0
- package/dist/tools/call-context.d.ts.map +1 -0
- package/dist/tools/call-context.js +15 -0
- package/dist/tools/call-context.js.map +1 -0
- package/dist/tools/codegen-tools.d.ts +4 -0
- package/dist/tools/codegen-tools.d.ts.map +1 -0
- package/dist/tools/codegen-tools.js +131 -0
- package/dist/tools/codegen-tools.js.map +1 -0
- package/dist/tools/credential-tools.d.ts +32 -0
- package/dist/tools/credential-tools.d.ts.map +1 -0
- package/dist/tools/credential-tools.js +65 -0
- package/dist/tools/credential-tools.js.map +1 -0
- package/dist/tools/descriptor.d.ts +52 -0
- package/dist/tools/descriptor.d.ts.map +1 -0
- package/dist/tools/descriptor.js +2 -0
- package/dist/tools/descriptor.js.map +1 -0
- package/dist/tools/diagnostic-tools.d.ts +3 -0
- package/dist/tools/diagnostic-tools.d.ts.map +1 -0
- package/dist/tools/diagnostic-tools.js +128 -0
- package/dist/tools/diagnostic-tools.js.map +1 -0
- package/dist/tools/gateway-tools.d.ts +6 -0
- package/dist/tools/gateway-tools.d.ts.map +1 -0
- package/dist/tools/gateway-tools.js +381 -0
- package/dist/tools/gateway-tools.js.map +1 -0
- package/dist/tools/hash-tools.d.ts +5 -0
- package/dist/tools/hash-tools.d.ts.map +1 -0
- package/dist/tools/hash-tools.js +238 -0
- package/dist/tools/hash-tools.js.map +1 -0
- package/dist/tools/knowledge-tools.d.ts +7 -0
- package/dist/tools/knowledge-tools.d.ts.map +1 -0
- package/dist/tools/knowledge-tools.js +247 -0
- package/dist/tools/knowledge-tools.js.map +1 -0
- package/dist/tools/onboarding-checklist.d.ts +3 -0
- package/dist/tools/onboarding-checklist.d.ts.map +1 -0
- package/dist/tools/onboarding-checklist.js +141 -0
- package/dist/tools/onboarding-checklist.js.map +1 -0
- package/dist/tools/register.d.ts +60 -0
- package/dist/tools/register.d.ts.map +1 -0
- package/dist/tools/register.js +145 -0
- package/dist/tools/register.js.map +1 -0
- package/dist/tools/tool-kit.d.ts +88 -0
- package/dist/tools/tool-kit.d.ts.map +1 -0
- package/dist/tools/tool-kit.js +297 -0
- package/dist/tools/tool-kit.js.map +1 -0
- package/dist/validation/payload-validator.d.ts +29 -0
- package/dist/validation/payload-validator.d.ts.map +1 -0
- package/dist/validation/payload-validator.js +79 -0
- package/dist/validation/payload-validator.js.map +1 -0
- package/dist/validation/rules/amount.d.ts +3 -0
- package/dist/validation/rules/amount.d.ts.map +1 -0
- package/dist/validation/rules/amount.js +77 -0
- package/dist/validation/rules/amount.js.map +1 -0
- package/dist/validation/rules/bill-reference.d.ts +10 -0
- package/dist/validation/rules/bill-reference.d.ts.map +1 -0
- package/dist/validation/rules/bill-reference.js +34 -0
- package/dist/validation/rules/bill-reference.js.map +1 -0
- package/dist/validation/rules/cnic.d.ts +3 -0
- package/dist/validation/rules/cnic.d.ts.map +1 -0
- package/dist/validation/rules/cnic.js +42 -0
- package/dist/validation/rules/cnic.js.map +1 -0
- package/dist/validation/rules/constants.d.ts +9 -0
- package/dist/validation/rules/constants.d.ts.map +1 -0
- package/dist/validation/rules/constants.js +28 -0
- package/dist/validation/rules/constants.js.map +1 -0
- package/dist/validation/rules/constraints.d.ts +3 -0
- package/dist/validation/rules/constraints.d.ts.map +1 -0
- package/dist/validation/rules/constraints.js +113 -0
- package/dist/validation/rules/constraints.js.map +1 -0
- package/dist/validation/rules/datetime.d.ts +3 -0
- package/dist/validation/rules/datetime.d.ts.map +1 -0
- package/dist/validation/rules/datetime.js +49 -0
- package/dist/validation/rules/datetime.js.map +1 -0
- package/dist/validation/rules/empty-string.d.ts +13 -0
- package/dist/validation/rules/empty-string.d.ts.map +1 -0
- package/dist/validation/rules/empty-string.js +32 -0
- package/dist/validation/rules/empty-string.js.map +1 -0
- package/dist/validation/rules/expiry.d.ts +3 -0
- package/dist/validation/rules/expiry.d.ts.map +1 -0
- package/dist/validation/rules/expiry.js +52 -0
- package/dist/validation/rules/expiry.js.map +1 -0
- package/dist/validation/rules/msisdn.d.ts +3 -0
- package/dist/validation/rules/msisdn.d.ts.map +1 -0
- package/dist/validation/rules/msisdn.js +45 -0
- package/dist/validation/rules/msisdn.js.map +1 -0
- package/dist/validation/rules/presence.d.ts +3 -0
- package/dist/validation/rules/presence.d.ts.map +1 -0
- package/dist/validation/rules/presence.js +90 -0
- package/dist/validation/rules/presence.js.map +1 -0
- package/dist/validation/rules/return-url.d.ts +14 -0
- package/dist/validation/rules/return-url.d.ts.map +1 -0
- package/dist/validation/rules/return-url.js +58 -0
- package/dist/validation/rules/return-url.js.map +1 -0
- package/dist/validation/rules/tool-argument.d.ts +16 -0
- package/dist/validation/rules/tool-argument.d.ts.map +1 -0
- package/dist/validation/rules/tool-argument.js +38 -0
- package/dist/validation/rules/tool-argument.js.map +1 -0
- package/dist/validation/rules/txn-ref.d.ts +3 -0
- package/dist/validation/rules/txn-ref.d.ts.map +1 -0
- package/dist/validation/rules/txn-ref.js +47 -0
- package/dist/validation/rules/txn-ref.js.map +1 -0
- package/dist/validation/rules/unknown-fields.d.ts +10 -0
- package/dist/validation/rules/unknown-fields.d.ts.map +1 -0
- package/dist/validation/rules/unknown-fields.js +29 -0
- package/dist/validation/rules/unknown-fields.js.map +1 -0
- package/dist/validation/types.d.ts +36 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +12 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/version.d.ts +23 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +23 -0
- package/dist/version.js.map +1 -0
- package/knowledge/diagnostics/symptoms.json +321 -0
- package/knowledge/docs/bnpl-guide.md +77 -0
- package/knowledge/docs/card-page-redirection.md +67 -0
- package/knowledge/docs/card-refund.md +91 -0
- package/knowledge/docs/hmac-sha256-calculation.md +72 -0
- package/knowledge/docs/index.json +189 -0
- package/knowledge/docs/ipn-implementation.md +89 -0
- package/knowledge/docs/mwallet-recurring.md +117 -0
- package/knowledge/docs/mwallet-refund.md +65 -0
- package/knowledge/docs/mwallet-rest-v1-1.md +126 -0
- package/knowledge/docs/mwallet-rest-v2-0-cnic.md +113 -0
- package/knowledge/docs/portal-guide.md +45 -0
- package/knowledge/docs/shopify-guide.md +74 -0
- package/knowledge/docs/status-inquiry-2025-26.md +32 -0
- package/knowledge/docs/status-inquiry.md +111 -0
- package/knowledge/docs/wordpress-guide.md +49 -0
- package/knowledge/flow.schema.json +390 -0
- package/knowledge/flows/bnpl-page-redirection-v1.1.json +211 -0
- package/knowledge/flows/card-page-redirection-v1.1.json +211 -0
- package/knowledge/flows/mwallet-rest-v1.1.json +187 -0
- package/knowledge/flows/mwallet-rest-v2.0-cnic.json +197 -0
- package/knowledge/flows/mwallet-token-pay-v4.0.json +130 -0
- package/knowledge/flows/refund-bnpl.json +105 -0
- package/knowledge/flows/refund-card-v1.1.json +112 -0
- package/knowledge/flows/refund-card-v2.0.json +121 -0
- package/knowledge/flows/refund-mwallet-v1.1.json +106 -0
- package/knowledge/flows/status-inquiry-v1.1.json +102 -0
- package/knowledge/flows/status-inquiry-v2.0.json +103 -0
- package/knowledge/flows/token-delete-v1.json +85 -0
- package/knowledge/flows/token-inquiry-v1.json +85 -0
- package/knowledge/flows/wallet-linking-portal.json +103 -0
- package/knowledge/templates/node/checkout-redirect.tmpl +166 -0
- package/knowledge/templates/node/ipn-handler.tmpl +108 -0
- package/knowledge/templates/node/rest-client.tmpl +197 -0
- package/knowledge/templates/node/wallet-linking.tmpl +147 -0
- package/knowledge/templates/php/checkout-redirect.tmpl +149 -0
- package/knowledge/templates/php/ipn-handler.tmpl +105 -0
- package/knowledge/templates/php/rest-client.tmpl +191 -0
- package/knowledge/templates/php/wallet-linking.tmpl +137 -0
- package/knowledge/templates/python/checkout-redirect.tmpl +148 -0
- package/knowledge/templates/python/ipn-handler.tmpl +110 -0
- package/knowledge/templates/python/rest-client.tmpl +179 -0
- package/knowledge/templates/python/wallet-linking.tmpl +133 -0
- package/package.json +84 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { type DocRef } from '../../errors.js';
|
|
2
|
+
import { type NormalisedParameters, type RawParameters } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The vocabulary a request signature is described in, and the engine that
|
|
5
|
+
* executes one.
|
|
6
|
+
*
|
|
7
|
+
* No two gateways sign the same way. JazzCash sorts the payload by field name,
|
|
8
|
+
* joins the non-empty values with `&`, prepends the Integrity Salt and HMACs
|
|
9
|
+
* the result.
|
|
10
|
+
*
|
|
11
|
+
* That is expressed here as a `SignaturePlan`: a recipe explicit enough that
|
|
12
|
+
* adding a gateway is a new plan rather than a new branch inside this file. The
|
|
13
|
+
* alternative — a second engine, or a second set of `if` statements — produces
|
|
14
|
+
* the failure this module exists to prevent. A forensic table written for one
|
|
15
|
+
* construction, replayed against a payload signed under another, reports that
|
|
16
|
+
* payload's CORRECT construction as a proven defect: several entries in the
|
|
17
|
+
* JazzCash table (a plain digest, the salt at the far end, empty components
|
|
18
|
+
* kept) are how other gateways legitimately sign.
|
|
19
|
+
*/
|
|
20
|
+
/** Every signature construction the server can produce and diagnose. */
|
|
21
|
+
export declare const SIGNATURE_SCHEME_IDS: readonly ["jazzcash"];
|
|
22
|
+
export type SignatureSchemeId = (typeof SIGNATURE_SCHEME_IDS)[number];
|
|
23
|
+
/**
|
|
24
|
+
* Digest encoding.
|
|
25
|
+
*
|
|
26
|
+
* The member names are the ones `hash.outputEncoding` uses in the flow schema,
|
|
27
|
+
* so a catalogue value reaches the engine untranslated. A mapping table between
|
|
28
|
+
* the two vocabularies would be one more place for them to drift apart, and a
|
|
29
|
+
* drift there is a wrong signature rather than a type error.
|
|
30
|
+
*/
|
|
31
|
+
export type SignatureEncoding = 'hex-lowercase' | 'base64';
|
|
32
|
+
/**
|
|
33
|
+
* How a supplied signature is compared with the computed one.
|
|
34
|
+
*
|
|
35
|
+
* `case-insensitive` is required for JazzCash, whose guides print the same
|
|
36
|
+
* digest lowercase in requests and uppercase in responses. It is wrong for
|
|
37
|
+
* base64, where case carries information: folding it maps distinct digests onto
|
|
38
|
+
* one string, so a signature nobody could have computed would verify.
|
|
39
|
+
*/
|
|
40
|
+
export type SignatureComparison = 'case-insensitive' | 'case-sensitive';
|
|
41
|
+
/** The order the selected values are joined in. */
|
|
42
|
+
type FieldOrdering = 'name-ascending' | 'name-descending' | 'name-ascending-folded' | 'as-listed';
|
|
43
|
+
/** Where the shared secret sits in the signed string, if it appears at all. */
|
|
44
|
+
type SecretPlacement = 'prepend' | 'append' | 'none';
|
|
45
|
+
/** Keyed HMAC, or a plain digest of a string the secret is part of. */
|
|
46
|
+
type SignaturePrimitive = 'hmac' | 'digest';
|
|
47
|
+
type DigestAlgorithm = 'sha256' | 'sha512';
|
|
48
|
+
/** Whether the field name travels with its value into the signed string. */
|
|
49
|
+
type ValuePairing = 'values-only' | 'name-and-value';
|
|
50
|
+
/** Whether values are signed exactly as transmitted. */
|
|
51
|
+
type ValueTransform = 'as-transmitted' | 'trimmed';
|
|
52
|
+
/** Prefix-matched field selection. */
|
|
53
|
+
interface PrefixFieldSelection {
|
|
54
|
+
readonly kind: 'prefix';
|
|
55
|
+
/** Only fields starting with one of these participate. Empty means no filter. */
|
|
56
|
+
readonly includeFieldPrefixes: readonly string[];
|
|
57
|
+
readonly excludeFields: readonly string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Which parameters contribute to the signature.
|
|
61
|
+
*
|
|
62
|
+
* A named union of one, rather than `PrefixFieldSelection` used directly: the
|
|
63
|
+
* `kind` discriminator is what a second selection rule would be added to, and
|
|
64
|
+
* every consumer already reads it. A gateway that fixes its components by
|
|
65
|
+
* position rather than by prefix cannot be expressed by widening this one — it
|
|
66
|
+
* needs its own member here and its own branch in `selectFields`.
|
|
67
|
+
*/
|
|
68
|
+
type FieldSelection = PrefixFieldSelection;
|
|
69
|
+
/**
|
|
70
|
+
* A fully resolved recipe for turning a payload into a signature.
|
|
71
|
+
*
|
|
72
|
+
* Every member is stated even where two schemes agree, so that reading one plan
|
|
73
|
+
* tells you the whole construction. A knob left implicit is a knob a second
|
|
74
|
+
* provider silently inherits.
|
|
75
|
+
*/
|
|
76
|
+
export interface SignaturePlan {
|
|
77
|
+
readonly selection: FieldSelection;
|
|
78
|
+
readonly ordering: FieldOrdering;
|
|
79
|
+
readonly pairing: ValuePairing;
|
|
80
|
+
readonly valueTransform: ValueTransform;
|
|
81
|
+
/** Drop a value that is empty after `valueTransform`. */
|
|
82
|
+
readonly omitEmptyValues: boolean;
|
|
83
|
+
/** Count a whitespace-only value as empty. */
|
|
84
|
+
readonly treatWhitespaceOnlyAsEmpty: boolean;
|
|
85
|
+
/** Placed between values, and between the secret and the values. May be empty. */
|
|
86
|
+
readonly separator: string;
|
|
87
|
+
/** Leave a separator on the end, as an append-in-a-loop implementation does. */
|
|
88
|
+
readonly trailingSeparator: boolean;
|
|
89
|
+
readonly secretPlacement: SecretPlacement;
|
|
90
|
+
readonly primitive: SignaturePrimitive;
|
|
91
|
+
readonly digest: DigestAlgorithm;
|
|
92
|
+
readonly encoding: SignatureEncoding;
|
|
93
|
+
readonly comparison: SignatureComparison;
|
|
94
|
+
}
|
|
95
|
+
export type ExclusionReason = 'empty' | 'excluded-field' | 'prefix-not-matched';
|
|
96
|
+
export interface ExcludedSignatureField {
|
|
97
|
+
readonly name: string;
|
|
98
|
+
readonly reason: ExclusionReason;
|
|
99
|
+
}
|
|
100
|
+
export interface SignatureBreakdown {
|
|
101
|
+
/** Parameter names that contributed, in the order their values were joined. */
|
|
102
|
+
readonly includedFields: readonly string[];
|
|
103
|
+
/** Parameter names that did not contribute, each with the reason. */
|
|
104
|
+
readonly excludedFields: readonly ExcludedSignatureField[];
|
|
105
|
+
/**
|
|
106
|
+
* The exact string that is digested. Contains the shared secret.
|
|
107
|
+
*
|
|
108
|
+
* Named for what it is rather than for the scheme: every consumer — the
|
|
109
|
+
* builder, the hash tools, the diagnosis output — shows this string to a
|
|
110
|
+
* merchant comparing it with their own code by eye.
|
|
111
|
+
*/
|
|
112
|
+
readonly hashString: string;
|
|
113
|
+
/** The values, in signing order, without the secret. */
|
|
114
|
+
readonly values: readonly string[];
|
|
115
|
+
}
|
|
116
|
+
export interface SignatureVerification {
|
|
117
|
+
readonly matches: boolean;
|
|
118
|
+
/** The signature this implementation computed. */
|
|
119
|
+
readonly expectedHash: string;
|
|
120
|
+
/** The signature supplied by the caller, normalised for comparison. */
|
|
121
|
+
readonly providedHash: string;
|
|
122
|
+
readonly breakdown: SignatureBreakdown;
|
|
123
|
+
}
|
|
124
|
+
/** What a provider calls its shared secret, and why a blank one cannot work. */
|
|
125
|
+
export interface SecretDescription {
|
|
126
|
+
/** The provider's own name for it, e.g. `Integrity Salt`. */
|
|
127
|
+
readonly label: string;
|
|
128
|
+
/** How it is used, phrased so the merchant can check the value they hold. */
|
|
129
|
+
readonly role: string;
|
|
130
|
+
readonly docRefs: readonly DocRef[];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The sentences a diagnosis is reported in.
|
|
134
|
+
*
|
|
135
|
+
* Provider-specific because the words are: a merchant told their "salt" is
|
|
136
|
+
* wrong when their provider issues an "API password" will check the wrong
|
|
137
|
+
* credential, and a diagnosis nobody can act on is worse than none.
|
|
138
|
+
*/
|
|
139
|
+
export interface SignatureNarrative {
|
|
140
|
+
/** Used when the supplied signature is already correct. */
|
|
141
|
+
readonly matched: string;
|
|
142
|
+
/** Used with the confirmed labels appended after a colon. */
|
|
143
|
+
readonly reproducedPrefix: string;
|
|
144
|
+
/** Used when no variant in the table reproduces the supplied signature. */
|
|
145
|
+
readonly unexplained: string;
|
|
146
|
+
}
|
|
147
|
+
/** Advice offered when nothing in the table reproduces the merchant's signature. */
|
|
148
|
+
export interface SignatureAdvice {
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly label: string;
|
|
151
|
+
readonly explanation: string;
|
|
152
|
+
readonly fix: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* One change to a plan, expressed as data rather than as a function.
|
|
156
|
+
*
|
|
157
|
+
* A closed set of single-field edits is what makes a forensic table safe to run
|
|
158
|
+
* at all. A free `(plan) => plan` callback can return ANY plan, including
|
|
159
|
+
* another provider's correct construction, and the type system has nothing to
|
|
160
|
+
* say about it: a table entry returning another gateway's plan compiled cleanly
|
|
161
|
+
* and reported that gateway's CORRECT signature as a proven defect. A delta
|
|
162
|
+
* cannot build a plan. It can only name one field of the plan it is applied to,
|
|
163
|
+
* so a variant is always its own scheme's construction with exactly one thing
|
|
164
|
+
* wrong.
|
|
165
|
+
*
|
|
166
|
+
* A delta naming a field the plan's selection does not have leaves the plan
|
|
167
|
+
* unchanged. That is harmless rather than silent: an unchanged plan computes the
|
|
168
|
+
* CORRECT signature, and `diagnoseSignature` runs the table only after the
|
|
169
|
+
* correct signature has already failed to match, so such a variant can never be
|
|
170
|
+
* reported.
|
|
171
|
+
*/
|
|
172
|
+
type PlanDelta = {
|
|
173
|
+
readonly set: 'ordering';
|
|
174
|
+
readonly to: FieldOrdering;
|
|
175
|
+
} | {
|
|
176
|
+
readonly set: 'pairing';
|
|
177
|
+
readonly to: ValuePairing;
|
|
178
|
+
} | {
|
|
179
|
+
readonly set: 'valueTransform';
|
|
180
|
+
readonly to: ValueTransform;
|
|
181
|
+
} | {
|
|
182
|
+
readonly set: 'omitEmptyValues';
|
|
183
|
+
readonly to: boolean;
|
|
184
|
+
} | {
|
|
185
|
+
readonly set: 'separator';
|
|
186
|
+
readonly to: string;
|
|
187
|
+
} | {
|
|
188
|
+
readonly set: 'trailingSeparator';
|
|
189
|
+
readonly to: boolean;
|
|
190
|
+
} | {
|
|
191
|
+
readonly set: 'secretPlacement';
|
|
192
|
+
readonly to: SecretPlacement;
|
|
193
|
+
} | {
|
|
194
|
+
readonly set: 'primitive';
|
|
195
|
+
readonly to: SignaturePrimitive;
|
|
196
|
+
} | {
|
|
197
|
+
readonly set: 'digest';
|
|
198
|
+
readonly to: DigestAlgorithm;
|
|
199
|
+
} | {
|
|
200
|
+
readonly set: 'encoding';
|
|
201
|
+
readonly to: SignatureEncoding;
|
|
202
|
+
} | {
|
|
203
|
+
readonly set: 'excludeFields';
|
|
204
|
+
readonly to: readonly string[];
|
|
205
|
+
} | {
|
|
206
|
+
readonly set: 'includeFieldPrefixes';
|
|
207
|
+
readonly to: readonly string[];
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* A wrong-but-plausible construction, stated as one change to a scheme's own plan.
|
|
211
|
+
*
|
|
212
|
+
* What is enforced is that `change` is a single field edit applied by the engine
|
|
213
|
+
* to the plan the scheme resolved from the merchant's own settings. A definition
|
|
214
|
+
* cannot construct a plan, so it cannot name another provider's construction —
|
|
215
|
+
* see `PlanDelta`. What is NOT enforced is the wording: a table bound to the
|
|
216
|
+
* wrong scheme would describe a real near miss in the wrong provider's
|
|
217
|
+
* vocabulary, which `tests/domain/signature.test.ts` pins per scheme.
|
|
218
|
+
*/
|
|
219
|
+
export interface SignatureVariantDefinition {
|
|
220
|
+
readonly id: string;
|
|
221
|
+
readonly label: string;
|
|
222
|
+
readonly explanation: string;
|
|
223
|
+
readonly fix: string;
|
|
224
|
+
/** The single plan field this mistake changes, and what it becomes. */
|
|
225
|
+
readonly change: PlanDelta;
|
|
226
|
+
}
|
|
227
|
+
/** A variant bound to a scheme, executable against a merchant's own payload. */
|
|
228
|
+
export interface SignatureVariant<TSettings> {
|
|
229
|
+
readonly id: string;
|
|
230
|
+
readonly label: string;
|
|
231
|
+
readonly explanation: string;
|
|
232
|
+
readonly fix: string;
|
|
233
|
+
compute(parameters: NormalisedParameters, secret: string, settings: TSettings): string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* One provider's signature construction, with the forensics that belong to it.
|
|
237
|
+
*
|
|
238
|
+
* `TSettings` is the per-flow configuration the scheme accepts — field prefixes
|
|
239
|
+
* and exclusions for JazzCash. It is a type parameter rather than a shared bag
|
|
240
|
+
* of optional fields so that a scheme cannot be handed another scheme's
|
|
241
|
+
* configuration and quietly sign with half of each.
|
|
242
|
+
*/
|
|
243
|
+
export interface SignatureScheme<TSettings> {
|
|
244
|
+
readonly id: SignatureSchemeId;
|
|
245
|
+
/** Human-readable name, e.g. `JazzCash pp_SecureHash`. */
|
|
246
|
+
readonly label: string;
|
|
247
|
+
readonly secret: SecretDescription;
|
|
248
|
+
readonly narrative: SignatureNarrative;
|
|
249
|
+
/** The provider's documented construction, resolved against flow settings. */
|
|
250
|
+
plan(settings: TSettings): SignaturePlan;
|
|
251
|
+
/**
|
|
252
|
+
* The resolved construction in one sentence, for a merchant to implement.
|
|
253
|
+
*
|
|
254
|
+
* A member of the scheme rather than a free function so that a provider whose
|
|
255
|
+
* construction cannot be described in the shared vocabulary has somewhere to
|
|
256
|
+
* say so. Both registered schemes delegate to `describeConstruction`, because
|
|
257
|
+
* a sentence written by hand describes the construction its author had in mind
|
|
258
|
+
* while the engine executes the one the flow configured, and the merchant
|
|
259
|
+
* implements the sentence.
|
|
260
|
+
*/
|
|
261
|
+
describePlan(plan: SignaturePlan): string;
|
|
262
|
+
/** Wrong-but-plausible constructions for THIS scheme, and only this scheme. */
|
|
263
|
+
readonly variants: readonly SignatureVariant<TSettings>[];
|
|
264
|
+
/** Ranked advice for when no variant reproduces the supplied signature. */
|
|
265
|
+
readonly advice: readonly SignatureAdvice[];
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Whether the construction a diagnosis runs under is the one the payload was
|
|
269
|
+
* signed with, or one this server chose on the payload's behalf.
|
|
270
|
+
*
|
|
271
|
+
* `confirmed` means a variant reproduced the merchant's signature, which is
|
|
272
|
+
* evidence only if the construction it varies is the construction they used.
|
|
273
|
+
* Where the construction was assumed, the same reproduction is just as likely to
|
|
274
|
+
* BE the merchant's correct construction under a provider this server has never
|
|
275
|
+
* been told about — which is how a correct `SHA256(secret&sorted-values)`
|
|
276
|
+
* signature came to be reported as "Plain SHA-256 used instead of HMAC-SHA256",
|
|
277
|
+
* with maximum confidence, to a merchant whose code was right.
|
|
278
|
+
*/
|
|
279
|
+
export type SchemeProvenance = 'declared' | 'assumed';
|
|
280
|
+
export interface SignatureHypothesis {
|
|
281
|
+
readonly id: string;
|
|
282
|
+
readonly label: string;
|
|
283
|
+
readonly explanation: string;
|
|
284
|
+
readonly fix: string;
|
|
285
|
+
/** `confirmed` means this variant reproduces the merchant's signature exactly. */
|
|
286
|
+
readonly confidence: 'confirmed' | 'possible';
|
|
287
|
+
}
|
|
288
|
+
export interface SignatureDiagnosis {
|
|
289
|
+
readonly matches: boolean;
|
|
290
|
+
readonly expectedHash: string;
|
|
291
|
+
readonly providedHash: string;
|
|
292
|
+
readonly breakdown: SignatureBreakdown;
|
|
293
|
+
/** Confirmed causes first, then remaining candidates worth checking. */
|
|
294
|
+
readonly hypotheses: readonly SignatureHypothesis[];
|
|
295
|
+
readonly summary: string;
|
|
296
|
+
}
|
|
297
|
+
/** Constant-time signature comparison under a scheme's own case rule. */
|
|
298
|
+
export declare function signaturesMatch(left: string, right: string, comparison: SignatureComparison): boolean;
|
|
299
|
+
/**
|
|
300
|
+
* One sentence describing exactly how a plan builds the string it digests.
|
|
301
|
+
*
|
|
302
|
+
* Derived from the plan rather than written out per scheme, because a sentence
|
|
303
|
+
* written by hand describes the construction its author had in mind while the
|
|
304
|
+
* engine executes the one the flow configured — and a merchant implements the
|
|
305
|
+
* sentence, not the code. The two drift silently: nothing fails when a flow is
|
|
306
|
+
* described by a paragraph belonging to a different construction.
|
|
307
|
+
*/
|
|
308
|
+
export declare function describeConstruction(plan: SignaturePlan, secretLabel: string): string;
|
|
309
|
+
/**
|
|
310
|
+
* One sentence naming the digest encoding and the comparison rule.
|
|
311
|
+
*
|
|
312
|
+
* Read from the plan for the same reason as the construction: a flow declaring
|
|
313
|
+
* base64 and case-sensitive comparison was told its output was lowercase hex
|
|
314
|
+
* compared case-insensitively, which is the advice that makes a correct
|
|
315
|
+
* signature look broken.
|
|
316
|
+
*/
|
|
317
|
+
export declare function describeEncoding(plan: SignaturePlan): string;
|
|
318
|
+
/**
|
|
319
|
+
* Bind a table of plan deltas to a scheme.
|
|
320
|
+
*
|
|
321
|
+
* Each variant re-resolves the scheme's plan from the merchant's own settings
|
|
322
|
+
* before applying its delta, so a flow that narrows the field selection is
|
|
323
|
+
* diagnosed against ITS construction rather than against the scheme default.
|
|
324
|
+
*/
|
|
325
|
+
export declare function defineVariants<TSettings>(plan: (settings: TSettings) => SignaturePlan, definitions: readonly SignatureVariantDefinition[]): readonly SignatureVariant<TSettings>[];
|
|
326
|
+
/** Build the signed string for a payload under one scheme. */
|
|
327
|
+
export declare function buildSignature<TSettings>(scheme: SignatureScheme<TSettings>, parameters: RawParameters, secret: string, settings: TSettings): SignatureBreakdown;
|
|
328
|
+
/** Compute the signature for a payload under one scheme. */
|
|
329
|
+
export declare function computeSignature<TSettings>(scheme: SignatureScheme<TSettings>, parameters: RawParameters, secret: string, settings: TSettings): string;
|
|
330
|
+
/** Verify a supplied signature against a freshly computed one. */
|
|
331
|
+
export declare function verifySignature<TSettings>(scheme: SignatureScheme<TSettings>, parameters: RawParameters, secret: string, providedSignature: string, settings: TSettings): SignatureVerification;
|
|
332
|
+
/**
|
|
333
|
+
* Explain why a signature does not match, using one scheme's forensics only.
|
|
334
|
+
*
|
|
335
|
+
* Every variant of the scheme is executed against the merchant's own parameters.
|
|
336
|
+
* One that reproduces the signature they actually sent is reported as
|
|
337
|
+
* `confirmed`: that is not a guess, it is a demonstration of what their code
|
|
338
|
+
* did — provided the construction being varied is the one the payload was signed
|
|
339
|
+
* under. `provenance` is what says whether it is; see `SchemeProvenance`. Under
|
|
340
|
+
* an assumed construction no variant runs at all, and the scheme's ranked advice
|
|
341
|
+
* is offered as `possible` instead.
|
|
342
|
+
*
|
|
343
|
+
* A variant can only ever be its own scheme's plan with one field changed, which
|
|
344
|
+
* is what stops the table offering another provider's correct construction as a
|
|
345
|
+
* defect; see `PlanDelta`.
|
|
346
|
+
*/
|
|
347
|
+
export declare function diagnoseSignature<TSettings>(scheme: SignatureScheme<TSettings>, parameters: RawParameters, secret: string, providedSignature: string, settings: TSettings, provenance: SchemeProvenance): SignatureDiagnosis;
|
|
348
|
+
export {};
|
|
349
|
+
//# sourceMappingURL=scheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme.d.ts","sourceRoot":"","sources":["../../../src/domain/signature/scheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAA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