@nokinc-flur/sdk 2.3.0 → 2.5.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/dist/index.d.ts CHANGED
@@ -2878,6 +2878,331 @@ type AccountsClient = {
2878
2878
  };
2879
2879
  declare function createAccountsClient(opts: AccountsClientOptions): AccountsClient;
2880
2880
 
2881
+ /**
2882
+ * Offline verification of the unified Offline Authorization Certificate (OAC).
2883
+ *
2884
+ * The OAC is issuer-signed and folds identity (phoneE164, displayName, bound
2885
+ * device key) into the same credential that carries offline spend authority.
2886
+ * This lets two users who meet for the first time recognise and pay each
2887
+ * other WITHOUT a network round-trip: the verifier checks the issuer
2888
+ * signature against a *pinned* trusted issuer key (a Trust Bundle refreshed
2889
+ * whenever the device is online), never the key embedded in the credential.
2890
+ *
2891
+ * Trust model:
2892
+ * - Provisional offline authorization, authoritative online settlement.
2893
+ * A successful offline verify proves the credential was issued by Flur
2894
+ * and is within its validity window; the backend still re-checks
2895
+ * revocation, balance, and caps at settlement. Short OAC TTL is the
2896
+ * revocation-propagation mechanism — a revoked user cannot refresh and
2897
+ * their OAC expires within the issuance TTL.
2898
+ *
2899
+ * Wire format mirrors `flur-backend/src/offline-consumer/service.ts`
2900
+ * (`oacSigningPayload`): the issuer signs `canonicalJSONBytes({ domain, ...oac })`
2901
+ * with its P-256 key. Adding fields to `ConsumerOAC` automatically includes
2902
+ * them in the signed bytes, so identity is covered without a new domain.
2903
+ */
2904
+
2905
+ /**
2906
+ * Domain tag bound into the OAC issuer signature. MUST match
2907
+ * `OAC_DOMAIN` in `flur-backend/src/offline-consumer/service.ts`.
2908
+ */
2909
+ declare const CONSUMER_OAC_DOMAIN: "flur:consumer-offline:v1:oac";
2910
+ /**
2911
+ * A pinned issuer key the device trusts for offline OAC verification.
2912
+ * Sourced from the backend Trust Bundle (`GET /v1/issuer/keys`) and cached
2913
+ * on-device. `notBeforeMs` / `notAfterMs` bound the key's own validity so a
2914
+ * rotated-out key cannot be used to verify a freshly minted credential.
2915
+ */
2916
+ interface TrustedIssuerKey {
2917
+ issuerId: string;
2918
+ /** Issuer P-256 public key as SubjectPublicKeyInfo DER, base64. */
2919
+ publicKeySpkiB64: string;
2920
+ notBeforeMs?: number;
2921
+ notAfterMs?: number;
2922
+ }
2923
+ /** Identity surfaced to the caller after a successful offline verify. */
2924
+ interface OacOfflineIdentity {
2925
+ oacId: string;
2926
+ issuerId: string;
2927
+ userId: string;
2928
+ phoneE164: string;
2929
+ displayName: string;
2930
+ /** Holder's bound device key; lets the caller verify receipts offline. */
2931
+ devicePubkeySpkiB64: string;
2932
+ }
2933
+ type VerifyOacOfflineResult = {
2934
+ ok: true;
2935
+ oac: ConsumerOAC;
2936
+ identity: OacOfflineIdentity;
2937
+ } | {
2938
+ ok: false;
2939
+ reason: 'malformed' | 'untrusted_issuer' | 'signature_invalid' | 'window_too_long' | 'not_yet_valid' | 'expired' | 'revoked';
2940
+ };
2941
+ interface VerifyOacOfflineOptions {
2942
+ /** Override the wall clock; defaults to `Date.now()`. */
2943
+ nowMs?: number;
2944
+ /**
2945
+ * Verified revoked-OAC id set from a pinned revocation status-list (see
2946
+ * `verifyRevocationList`). When supplied, an otherwise-valid OAC whose
2947
+ * `oacId` is present is rejected with reason `'revoked'`. Omitting this
2948
+ * preserves the TTL-only revocation baseline.
2949
+ */
2950
+ revokedOacIds?: ReadonlySet<string>;
2951
+ }
2952
+ /** Canonical OAC payload (domain-bound) the backend issuer signs. */
2953
+ declare function consumerOacSigningPayload(oac: ConsumerOAC): {
2954
+ phoneE164: string;
2955
+ userId: string;
2956
+ deviceId: string;
2957
+ displayName: string;
2958
+ currency: string;
2959
+ perTxCapKobo: number;
2960
+ cumulativeCapKobo: number;
2961
+ validFromMs: number;
2962
+ validUntilMs: number;
2963
+ counterSeed: number;
2964
+ issuedAtMs: number;
2965
+ issuerId: string;
2966
+ oacId: string;
2967
+ alg: "p256";
2968
+ devicePubkeySpkiB64: string;
2969
+ domain: "flur:consumer-offline:v1:oac";
2970
+ };
2971
+ /**
2972
+ * Verify a signed OAC offline against a pinned set of trusted issuer keys.
2973
+ *
2974
+ * Security invariants:
2975
+ * - The signature is checked against the PINNED key for `oac.issuerId`,
2976
+ * never the credential-embedded `issuerPublicKeySpkiB64`. An attacker who
2977
+ * forges an OAC with their own key (and a matching embedded key) fails
2978
+ * because their key is not pinned.
2979
+ * - The pinned key's own validity window is enforced.
2980
+ * - The OAC validity window is enforced (`validFromMs <= now < validUntilMs`).
2981
+ */
2982
+ declare function verifyOacOffline(signed: SignedConsumerOAC, trustedKeys: readonly TrustedIssuerKey[], options?: VerifyOacOfflineOptions): VerifyOacOfflineResult;
2983
+ /**
2984
+ * QR prefix for a presented unified OAC. A holder shows this QR to be paid
2985
+ * and/or identified offline; the scanner decodes it and calls
2986
+ * `verifyOacOffline` against its pinned trust bundle. Distinct from the
2987
+ * settlement-receipt (`FLURSR1.`) and pay-card prefixes so the scanner can
2988
+ * dispatch by prefix without ambiguity.
2989
+ */
2990
+ declare const CONSUMER_OAC_QR_PREFIX: "FLUROAC1.";
2991
+ /** True iff `value` looks like a presented OAC QR payload. */
2992
+ declare function isConsumerOacQR(value: string): boolean;
2993
+ /**
2994
+ * Advisory "pay me" request a holder may attach to a presented OAC pay code:
2995
+ * an amount, a purpose/intent, and a free-text reference. This rides as an
2996
+ * UNSIGNED suffix on the QR (see {@link encodeConsumerOacQR}) — it is never
2997
+ * part of the issuer-signed credential and carries no authority. The payer's
2998
+ * app treats it purely as a prefill hint and always confirms the amount,
2999
+ * exactly as with a NIBSS dynamic QR.
3000
+ */
3001
+ declare const OacPresentmentRequestSchema: z.ZodObject<{
3002
+ /** Requested amount in minor units (kobo). */
3003
+ amountMinor: z.ZodOptional<z.ZodNumber>;
3004
+ /** Purpose/intent code (mirrors the NIBSS intent vocabulary). */
3005
+ intent: z.ZodOptional<z.ZodString>;
3006
+ /** Free-text reference / note. */
3007
+ reference: z.ZodOptional<z.ZodString>;
3008
+ }, "strict", z.ZodTypeAny, {
3009
+ amountMinor?: number | undefined;
3010
+ reference?: string | undefined;
3011
+ intent?: string | undefined;
3012
+ }, {
3013
+ amountMinor?: number | undefined;
3014
+ reference?: string | undefined;
3015
+ intent?: string | undefined;
3016
+ }>;
3017
+ type OacPresentmentRequest = z.infer<typeof OacPresentmentRequestSchema>;
3018
+ /**
3019
+ * Encode a signed OAC as a scannable QR payload. The envelope is validated
3020
+ * before encoding so a malformed credential can never be presented.
3021
+ *
3022
+ * An optional advisory {@link OacPresentmentRequest} is appended as a
3023
+ * dot-separated, base64url-encoded suffix:
3024
+ * `FLUROAC1.<base64url(signed)>.<base64url(request)>`
3025
+ * The signed segment is byte-identical with or without the suffix, so the
3026
+ * credential's verifiability is unaffected. An empty request adds no suffix.
3027
+ */
3028
+ declare function encodeConsumerOacQR(signed: SignedConsumerOAC, request?: OacPresentmentRequest): string;
3029
+ /**
3030
+ * Decode (WITHOUT verifying) a presented OAC QR back into a signed envelope.
3031
+ * Any advisory request suffix is ignored here — use
3032
+ * {@link decodeConsumerOacRequest} to read it. The caller MUST pass the result
3033
+ * to `verifyOacOffline` against pinned keys before trusting any field —
3034
+ * decoding proves nothing about authenticity.
3035
+ */
3036
+ declare function decodeUnverifiedConsumerOacQR(value: string): SignedConsumerOAC;
3037
+ /**
3038
+ * Read the advisory {@link OacPresentmentRequest} from a presented OAC QR, or
3039
+ * `null` if absent/malformed. This is purely a prefill hint and is NEVER
3040
+ * authoritative — a malformed suffix is treated as "no request" and never
3041
+ * throws, so a bad suffix can never block a verifiable credential.
3042
+ */
3043
+ declare function decodeConsumerOacRequest(value: string): OacPresentmentRequest | null;
3044
+
3045
+ /**
3046
+ * OAC revocation status-list — offline verification.
3047
+ *
3048
+ * Short OAC TTL (24h, rolling) is the BASELINE revocation-propagation
3049
+ * mechanism: a revoked user cannot refresh, so their credential lapses within
3050
+ * the issuance window. The revocation status-list shrinks that window from
3051
+ * "up to 24h" to "time since the device last pinned a fresh list": the issuer
3052
+ * publishes a signed list of OAC IDs that are revoked AND not yet expired, and
3053
+ * the offline verifier rejects any scanned OAC whose id appears in it.
3054
+ *
3055
+ * The list is naturally bounded: an OAC that lapses on its own TTL drops off
3056
+ * the list (expiry already covers it), so the published set only ever carries
3057
+ * revocations from roughly the last 24h.
3058
+ *
3059
+ * Trust model mirrors the OAC itself: the list is issuer-signed and verified
3060
+ * OFFLINE against the SAME pinned issuer trust bundle (`GET /v1/issuer/keys`),
3061
+ * never the key embedded in the payload. A `sequence` makes the list
3062
+ * monotonic so a device never accepts an older snapshot over a newer one.
3063
+ */
3064
+
3065
+ /**
3066
+ * Domain tag bound into the revocation-list issuer signature. MUST match
3067
+ * `REVOCATION_DOMAIN` in `flur-backend/src/offline-consumer/service.ts`.
3068
+ */
3069
+ declare const CONSUMER_REVOCATION_DOMAIN: "flur:consumer-offline:v1:revocation";
3070
+ /**
3071
+ * Hard cap on the number of revoked ids in a single list. Because the list
3072
+ * only carries unexpired revocations (~24h window), this bounds the payload
3073
+ * while comfortably exceeding any realistic revocation rate.
3074
+ */
3075
+ declare const REVOCATION_LIST_MAX_ENTRIES = 100000;
3076
+ declare const RevocationListSchema: z.ZodObject<{
3077
+ issuerId: z.ZodString;
3078
+ /**
3079
+ * Monotonic snapshot counter. A device MUST NOT replace a pinned list with
3080
+ * one carrying a lower sequence — this defeats a downgrade/rollback attack
3081
+ * that replays an older list to resurrect a revoked credential.
3082
+ */
3083
+ sequence: z.ZodNumber;
3084
+ issuedAtMs: z.ZodNumber;
3085
+ /**
3086
+ * Freshness bound. After this instant the list is considered stale and the
3087
+ * verifier treats it as untrustworthy (fail-closed), forcing a re-pin.
3088
+ * Optional so the issuer may publish a list without a hard expiry.
3089
+ */
3090
+ notAfterMs: z.ZodOptional<z.ZodNumber>;
3091
+ /** OAC ids that are revoked AND not yet past their own validity window. */
3092
+ revokedOacIds: z.ZodArray<z.ZodString, "many">;
3093
+ }, "strip", z.ZodTypeAny, {
3094
+ issuedAtMs: number;
3095
+ issuerId: string;
3096
+ sequence: number;
3097
+ revokedOacIds: string[];
3098
+ notAfterMs?: number | undefined;
3099
+ }, {
3100
+ issuedAtMs: number;
3101
+ issuerId: string;
3102
+ sequence: number;
3103
+ revokedOacIds: string[];
3104
+ notAfterMs?: number | undefined;
3105
+ }>;
3106
+ type RevocationList = z.infer<typeof RevocationListSchema>;
3107
+ declare const SignedRevocationListSchema: z.ZodObject<{
3108
+ list: z.ZodObject<{
3109
+ issuerId: z.ZodString;
3110
+ /**
3111
+ * Monotonic snapshot counter. A device MUST NOT replace a pinned list with
3112
+ * one carrying a lower sequence — this defeats a downgrade/rollback attack
3113
+ * that replays an older list to resurrect a revoked credential.
3114
+ */
3115
+ sequence: z.ZodNumber;
3116
+ issuedAtMs: z.ZodNumber;
3117
+ /**
3118
+ * Freshness bound. After this instant the list is considered stale and the
3119
+ * verifier treats it as untrustworthy (fail-closed), forcing a re-pin.
3120
+ * Optional so the issuer may publish a list without a hard expiry.
3121
+ */
3122
+ notAfterMs: z.ZodOptional<z.ZodNumber>;
3123
+ /** OAC ids that are revoked AND not yet past their own validity window. */
3124
+ revokedOacIds: z.ZodArray<z.ZodString, "many">;
3125
+ }, "strip", z.ZodTypeAny, {
3126
+ issuedAtMs: number;
3127
+ issuerId: string;
3128
+ sequence: number;
3129
+ revokedOacIds: string[];
3130
+ notAfterMs?: number | undefined;
3131
+ }, {
3132
+ issuedAtMs: number;
3133
+ issuerId: string;
3134
+ sequence: number;
3135
+ revokedOacIds: string[];
3136
+ notAfterMs?: number | undefined;
3137
+ }>;
3138
+ /** ASN.1 DER ECDSA P-256 issuer signature over the signing payload, base64. */
3139
+ issuerSig: z.ZodString;
3140
+ /** Issuer's P-256 public key as SubjectPublicKeyInfo DER, base64. */
3141
+ issuerPublicKeySpkiB64: z.ZodString;
3142
+ }, "strip", z.ZodTypeAny, {
3143
+ issuerSig: string;
3144
+ issuerPublicKeySpkiB64: string;
3145
+ list: {
3146
+ issuedAtMs: number;
3147
+ issuerId: string;
3148
+ sequence: number;
3149
+ revokedOacIds: string[];
3150
+ notAfterMs?: number | undefined;
3151
+ };
3152
+ }, {
3153
+ issuerSig: string;
3154
+ issuerPublicKeySpkiB64: string;
3155
+ list: {
3156
+ issuedAtMs: number;
3157
+ issuerId: string;
3158
+ sequence: number;
3159
+ revokedOacIds: string[];
3160
+ notAfterMs?: number | undefined;
3161
+ };
3162
+ }>;
3163
+ type SignedRevocationList = z.infer<typeof SignedRevocationListSchema>;
3164
+ type VerifyRevocationListResult = {
3165
+ ok: true;
3166
+ list: RevocationList;
3167
+ revokedOacIds: ReadonlySet<string>;
3168
+ } | {
3169
+ ok: false;
3170
+ reason: 'malformed' | 'untrusted_issuer' | 'signature_invalid' | 'stale';
3171
+ };
3172
+ interface VerifyRevocationListOptions {
3173
+ /** Override the wall clock; defaults to `Date.now()`. */
3174
+ nowMs?: number;
3175
+ }
3176
+ /**
3177
+ * Canonical revocation-list payload (domain-bound) the issuer signs.
3178
+ *
3179
+ * Cross-implementation contract (MUST match the backend signer byte-for-byte):
3180
+ * optional fields with no value are OMITTED from the signed object, never
3181
+ * emitted as `null` or `undefined`. `canonicalJSONBytes` rejects `undefined`
3182
+ * object values outright, so building the payload explicitly (rather than
3183
+ * spreading a `list` that may carry an explicit `notAfterMs: undefined`) keeps
3184
+ * verification total — it can never throw on a well-typed list — and keeps the
3185
+ * signed bytes identical whether `notAfterMs` was absent or explicitly unset.
3186
+ */
3187
+ declare function revocationListSigningPayload(list: RevocationList): Record<string, unknown>;
3188
+ /**
3189
+ * Verify a signed revocation list offline against pinned issuer keys.
3190
+ *
3191
+ * Security invariants (identical to `verifyOacOffline`):
3192
+ * - The signature is checked against the PINNED key for `list.issuerId`,
3193
+ * never the payload-embedded key.
3194
+ * - The pinned key's own validity window is enforced.
3195
+ * - A list past `notAfterMs` fails closed (`stale`) so a long-offline device
3196
+ * cannot keep trusting a frozen snapshot forever.
3197
+ *
3198
+ * Note: rollback protection via `sequence` is intentionally NOT enforced here
3199
+ * (verification is stateless). The caller persisting the pinned list MUST
3200
+ * reject any replacement whose `sequence` is lower than the pinned one.
3201
+ */
3202
+ declare function verifyRevocationList(signed: SignedRevocationList, trustedKeys: readonly TrustedIssuerKey[], options?: VerifyRevocationListOptions): VerifyRevocationListResult;
3203
+ /** True iff `oacId` appears in a verified revocation set. */
3204
+ declare function isOacRevoked(oacId: string, revokedOacIds: ReadonlySet<string>): boolean;
3205
+
2881
3206
  /**
2882
3207
  * Consumer-side Offline Collect SDK client.
2883
3208
  *
@@ -2915,14 +3240,14 @@ declare const IssuerTrustKeySchema: z.ZodObject<{
2915
3240
  issuerId: string;
2916
3241
  alg: "p256";
2917
3242
  publicKeySpkiB64: string;
2918
- notBeforeMs?: number | undefined;
2919
3243
  notAfterMs?: number | undefined;
3244
+ notBeforeMs?: number | undefined;
2920
3245
  }, {
2921
3246
  issuerId: string;
2922
3247
  alg: "p256";
2923
3248
  publicKeySpkiB64: string;
2924
- notBeforeMs?: number | undefined;
2925
3249
  notAfterMs?: number | undefined;
3250
+ notBeforeMs?: number | undefined;
2926
3251
  }>;
2927
3252
  type IssuerTrustKey = z.infer<typeof IssuerTrustKeySchema>;
2928
3253
  declare const IssuerTrustBundleSchema: z.ZodObject<{
@@ -2936,30 +3261,30 @@ declare const IssuerTrustBundleSchema: z.ZodObject<{
2936
3261
  issuerId: string;
2937
3262
  alg: "p256";
2938
3263
  publicKeySpkiB64: string;
2939
- notBeforeMs?: number | undefined;
2940
3264
  notAfterMs?: number | undefined;
3265
+ notBeforeMs?: number | undefined;
2941
3266
  }, {
2942
3267
  issuerId: string;
2943
3268
  alg: "p256";
2944
3269
  publicKeySpkiB64: string;
2945
- notBeforeMs?: number | undefined;
2946
3270
  notAfterMs?: number | undefined;
3271
+ notBeforeMs?: number | undefined;
2947
3272
  }>, "many">;
2948
3273
  }, "strip", z.ZodTypeAny, {
2949
3274
  keys: {
2950
3275
  issuerId: string;
2951
3276
  alg: "p256";
2952
3277
  publicKeySpkiB64: string;
2953
- notBeforeMs?: number | undefined;
2954
3278
  notAfterMs?: number | undefined;
3279
+ notBeforeMs?: number | undefined;
2955
3280
  }[];
2956
3281
  }, {
2957
3282
  keys: {
2958
3283
  issuerId: string;
2959
3284
  alg: "p256";
2960
3285
  publicKeySpkiB64: string;
2961
- notBeforeMs?: number | undefined;
2962
3286
  notAfterMs?: number | undefined;
3287
+ notBeforeMs?: number | undefined;
2963
3288
  }[];
2964
3289
  }>;
2965
3290
  type IssuerTrustBundle = z.infer<typeof IssuerTrustBundleSchema>;
@@ -3107,8 +3432,8 @@ declare const ConsumerOACSchema: z.ZodObject<{
3107
3432
  counterSeed: number;
3108
3433
  issuedAtMs: number;
3109
3434
  issuerId: string;
3110
- alg: "p256";
3111
3435
  oacId: string;
3436
+ alg: "p256";
3112
3437
  devicePubkeySpkiB64: string;
3113
3438
  }, {
3114
3439
  phoneE164: string;
@@ -3123,8 +3448,8 @@ declare const ConsumerOACSchema: z.ZodObject<{
3123
3448
  counterSeed: number;
3124
3449
  issuedAtMs: number;
3125
3450
  issuerId: string;
3126
- alg: "p256";
3127
3451
  oacId: string;
3452
+ alg: "p256";
3128
3453
  devicePubkeySpkiB64: string;
3129
3454
  }>;
3130
3455
  type ConsumerOAC = z.infer<typeof ConsumerOACSchema>;
@@ -3178,8 +3503,8 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
3178
3503
  counterSeed: number;
3179
3504
  issuedAtMs: number;
3180
3505
  issuerId: string;
3181
- alg: "p256";
3182
3506
  oacId: string;
3507
+ alg: "p256";
3183
3508
  devicePubkeySpkiB64: string;
3184
3509
  }, {
3185
3510
  phoneE164: string;
@@ -3194,8 +3519,8 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
3194
3519
  counterSeed: number;
3195
3520
  issuedAtMs: number;
3196
3521
  issuerId: string;
3197
- alg: "p256";
3198
3522
  oacId: string;
3523
+ alg: "p256";
3199
3524
  devicePubkeySpkiB64: string;
3200
3525
  }>;
3201
3526
  /** ASN.1 DER ECDSA P-256 issuer signature, base64. */
@@ -3217,8 +3542,8 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
3217
3542
  counterSeed: number;
3218
3543
  issuedAtMs: number;
3219
3544
  issuerId: string;
3220
- alg: "p256";
3221
3545
  oacId: string;
3546
+ alg: "p256";
3222
3547
  devicePubkeySpkiB64: string;
3223
3548
  };
3224
3549
  issuerPublicKeySpkiB64: string;
@@ -3237,8 +3562,8 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
3237
3562
  counterSeed: number;
3238
3563
  issuedAtMs: number;
3239
3564
  issuerId: string;
3240
- alg: "p256";
3241
3565
  oacId: string;
3566
+ alg: "p256";
3242
3567
  devicePubkeySpkiB64: string;
3243
3568
  };
3244
3569
  issuerPublicKeySpkiB64: string;
@@ -3294,8 +3619,8 @@ declare const OACRecordSchema: z.ZodObject<{
3294
3619
  counterSeed: number;
3295
3620
  issuedAtMs: number;
3296
3621
  issuerId: string;
3297
- alg: "p256";
3298
3622
  oacId: string;
3623
+ alg: "p256";
3299
3624
  devicePubkeySpkiB64: string;
3300
3625
  }, {
3301
3626
  phoneE164: string;
@@ -3310,8 +3635,8 @@ declare const OACRecordSchema: z.ZodObject<{
3310
3635
  counterSeed: number;
3311
3636
  issuedAtMs: number;
3312
3637
  issuerId: string;
3313
- alg: "p256";
3314
3638
  oacId: string;
3639
+ alg: "p256";
3315
3640
  devicePubkeySpkiB64: string;
3316
3641
  }>;
3317
3642
  /** ASN.1 DER ECDSA P-256 issuer signature, base64. */
@@ -3340,8 +3665,8 @@ declare const OACRecordSchema: z.ZodObject<{
3340
3665
  counterSeed: number;
3341
3666
  issuedAtMs: number;
3342
3667
  issuerId: string;
3343
- alg: "p256";
3344
3668
  oacId: string;
3669
+ alg: "p256";
3345
3670
  devicePubkeySpkiB64: string;
3346
3671
  };
3347
3672
  issuerPublicKeySpkiB64: string;
@@ -3364,8 +3689,8 @@ declare const OACRecordSchema: z.ZodObject<{
3364
3689
  counterSeed: number;
3365
3690
  issuedAtMs: number;
3366
3691
  issuerId: string;
3367
- alg: "p256";
3368
3692
  oacId: string;
3693
+ alg: "p256";
3369
3694
  devicePubkeySpkiB64: string;
3370
3695
  };
3371
3696
  issuerPublicKeySpkiB64: string;
@@ -3450,8 +3775,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3450
3775
  counterSeed: number;
3451
3776
  issuedAtMs: number;
3452
3777
  issuerId: string;
3453
- alg: "p256";
3454
3778
  oacId: string;
3779
+ alg: "p256";
3455
3780
  devicePubkeySpkiB64: string;
3456
3781
  }, {
3457
3782
  phoneE164: string;
@@ -3466,8 +3791,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3466
3791
  counterSeed: number;
3467
3792
  issuedAtMs: number;
3468
3793
  issuerId: string;
3469
- alg: "p256";
3470
3794
  oacId: string;
3795
+ alg: "p256";
3471
3796
  devicePubkeySpkiB64: string;
3472
3797
  }>;
3473
3798
  /** ASN.1 DER ECDSA P-256 issuer signature, base64. */
@@ -3496,8 +3821,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3496
3821
  counterSeed: number;
3497
3822
  issuedAtMs: number;
3498
3823
  issuerId: string;
3499
- alg: "p256";
3500
3824
  oacId: string;
3825
+ alg: "p256";
3501
3826
  devicePubkeySpkiB64: string;
3502
3827
  };
3503
3828
  issuerPublicKeySpkiB64: string;
@@ -3520,8 +3845,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3520
3845
  counterSeed: number;
3521
3846
  issuedAtMs: number;
3522
3847
  issuerId: string;
3523
- alg: "p256";
3524
3848
  oacId: string;
3849
+ alg: "p256";
3525
3850
  devicePubkeySpkiB64: string;
3526
3851
  };
3527
3852
  issuerPublicKeySpkiB64: string;
@@ -3546,8 +3871,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3546
3871
  counterSeed: number;
3547
3872
  issuedAtMs: number;
3548
3873
  issuerId: string;
3549
- alg: "p256";
3550
3874
  oacId: string;
3875
+ alg: "p256";
3551
3876
  devicePubkeySpkiB64: string;
3552
3877
  };
3553
3878
  issuerPublicKeySpkiB64: string;
@@ -3572,8 +3897,8 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
3572
3897
  counterSeed: number;
3573
3898
  issuedAtMs: number;
3574
3899
  issuerId: string;
3575
- alg: "p256";
3576
3900
  oacId: string;
3901
+ alg: "p256";
3577
3902
  devicePubkeySpkiB64: string;
3578
3903
  };
3579
3904
  issuerPublicKeySpkiB64: string;
@@ -3621,8 +3946,8 @@ declare const ConsumerPaymentClaimSchema: z.ZodObject<{
3621
3946
  payerNonce: string;
3622
3947
  payeeNonce: string;
3623
3948
  occurredAtMs: number;
3624
- alg: "p256";
3625
3949
  oacId: string;
3950
+ alg: "p256";
3626
3951
  payerDeviceId: string;
3627
3952
  payerPubkeySpkiB64: string;
3628
3953
  payerSignatureDerB64: string;
@@ -3848,6 +4173,12 @@ type MeOfflineClient = {
3848
4173
  getSettlement: (idOrKey: string) => Promise<ConsumerSettlement>;
3849
4174
  /** Fetch the public pinned issuer trust bundle (`GET /v1/issuer/keys`). */
3850
4175
  getIssuerKeys: () => Promise<IssuerTrustBundle>;
4176
+ /**
4177
+ * Fetch the issuer-signed OAC revocation status-list
4178
+ * (`GET /v1/issuer/revocations`). Pinned and checked offline alongside the
4179
+ * issuer trust bundle to bound the revocation window below the OAC TTL.
4180
+ */
4181
+ getRevocations: () => Promise<SignedRevocationList>;
3851
4182
  };
3852
4183
  declare function createMeOfflineClient(opts: MeOfflineClientOptions): MeOfflineClient;
3853
4184
 
@@ -4104,99 +4435,6 @@ declare function verifyConsumerSettlementReceiptQR(value: string, issuerPublicKe
4104
4435
  declare function decodeConsumerSettlementReceiptQR(value: string): ConsumerSettlement;
4105
4436
  declare function decodeConsumerSettlementReceiptQR(value: string, issuerPublicKeySpkiB64: string): ConsumerSettlement;
4106
4437
 
4107
- /**
4108
- * Domain tag bound into the OAC issuer signature. MUST match
4109
- * `OAC_DOMAIN` in `flur-backend/src/offline-consumer/service.ts`.
4110
- */
4111
- declare const CONSUMER_OAC_DOMAIN: "flur:consumer-offline:v1:oac";
4112
- /**
4113
- * A pinned issuer key the device trusts for offline OAC verification.
4114
- * Sourced from the backend Trust Bundle (`GET /v1/issuer/keys`) and cached
4115
- * on-device. `notBeforeMs` / `notAfterMs` bound the key's own validity so a
4116
- * rotated-out key cannot be used to verify a freshly minted credential.
4117
- */
4118
- interface TrustedIssuerKey {
4119
- issuerId: string;
4120
- /** Issuer P-256 public key as SubjectPublicKeyInfo DER, base64. */
4121
- publicKeySpkiB64: string;
4122
- notBeforeMs?: number;
4123
- notAfterMs?: number;
4124
- }
4125
- /** Identity surfaced to the caller after a successful offline verify. */
4126
- interface OacOfflineIdentity {
4127
- oacId: string;
4128
- issuerId: string;
4129
- userId: string;
4130
- phoneE164: string;
4131
- displayName: string;
4132
- /** Holder's bound device key; lets the caller verify receipts offline. */
4133
- devicePubkeySpkiB64: string;
4134
- }
4135
- type VerifyOacOfflineResult = {
4136
- ok: true;
4137
- oac: ConsumerOAC;
4138
- identity: OacOfflineIdentity;
4139
- } | {
4140
- ok: false;
4141
- reason: 'malformed' | 'untrusted_issuer' | 'signature_invalid' | 'window_too_long' | 'not_yet_valid' | 'expired';
4142
- };
4143
- interface VerifyOacOfflineOptions {
4144
- /** Override the wall clock; defaults to `Date.now()`. */
4145
- nowMs?: number;
4146
- }
4147
- /** Canonical OAC payload (domain-bound) the backend issuer signs. */
4148
- declare function consumerOacSigningPayload(oac: ConsumerOAC): {
4149
- phoneE164: string;
4150
- userId: string;
4151
- deviceId: string;
4152
- displayName: string;
4153
- currency: string;
4154
- perTxCapKobo: number;
4155
- cumulativeCapKobo: number;
4156
- validFromMs: number;
4157
- validUntilMs: number;
4158
- counterSeed: number;
4159
- issuedAtMs: number;
4160
- issuerId: string;
4161
- alg: "p256";
4162
- oacId: string;
4163
- devicePubkeySpkiB64: string;
4164
- domain: "flur:consumer-offline:v1:oac";
4165
- };
4166
- /**
4167
- * Verify a signed OAC offline against a pinned set of trusted issuer keys.
4168
- *
4169
- * Security invariants:
4170
- * - The signature is checked against the PINNED key for `oac.issuerId`,
4171
- * never the credential-embedded `issuerPublicKeySpkiB64`. An attacker who
4172
- * forges an OAC with their own key (and a matching embedded key) fails
4173
- * because their key is not pinned.
4174
- * - The pinned key's own validity window is enforced.
4175
- * - The OAC validity window is enforced (`validFromMs <= now < validUntilMs`).
4176
- */
4177
- declare function verifyOacOffline(signed: SignedConsumerOAC, trustedKeys: readonly TrustedIssuerKey[], options?: VerifyOacOfflineOptions): VerifyOacOfflineResult;
4178
- /**
4179
- * QR prefix for a presented unified OAC. A holder shows this QR to be paid
4180
- * and/or identified offline; the scanner decodes it and calls
4181
- * `verifyOacOffline` against its pinned trust bundle. Distinct from the
4182
- * settlement-receipt (`FLURSR1.`) and pay-card prefixes so the scanner can
4183
- * dispatch by prefix without ambiguity.
4184
- */
4185
- declare const CONSUMER_OAC_QR_PREFIX: "FLUROAC1.";
4186
- /** True iff `value` looks like a presented OAC QR payload. */
4187
- declare function isConsumerOacQR(value: string): boolean;
4188
- /**
4189
- * Encode a signed OAC as a scannable QR payload. The envelope is validated
4190
- * before encoding so a malformed credential can never be presented.
4191
- */
4192
- declare function encodeConsumerOacQR(signed: SignedConsumerOAC): string;
4193
- /**
4194
- * Decode (WITHOUT verifying) a presented OAC QR back into a signed envelope.
4195
- * The caller MUST pass the result to `verifyOacOffline` against pinned keys
4196
- * before trusting any field — decoding proves nothing about authenticity.
4197
- */
4198
- declare function decodeUnverifiedConsumerOacQR(value: string): SignedConsumerOAC;
4199
-
4200
4438
  /**
4201
4439
  * FLURA1 — single-SMS consumer-offline settle token.
4202
4440
  *
@@ -5206,7 +5444,6 @@ declare const ARTIFACT_TYPES: {
5206
5444
  readonly STATEMENT: "statement";
5207
5445
  readonly PASS: "pass";
5208
5446
  readonly IDENTITY: "identity";
5209
- readonly PAY_CARD: "pay_card";
5210
5447
  };
5211
5448
  type ArtifactType = (typeof ARTIFACT_TYPES)[keyof typeof ARTIFACT_TYPES];
5212
5449
  declare const OfflinePaymentAuthorizationArtifactSchema: z.ZodObject<{
@@ -5850,23 +6087,6 @@ declare const IdentityArtifactSchema: z.ZodObject<{
5850
6087
  claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
5851
6088
  claimValueHash: string;
5852
6089
  }>;
5853
- declare const PayCardArtifactSchema: z.ZodObject<{
5854
- userId: z.ZodString;
5855
- phoneE164: z.ZodString;
5856
- displayName: z.ZodString;
5857
- devicePubKeySpkiB64: z.ZodString;
5858
- }, "strip", z.ZodTypeAny, {
5859
- phoneE164: string;
5860
- userId: string;
5861
- displayName: string;
5862
- devicePubKeySpkiB64: string;
5863
- }, {
5864
- phoneE164: string;
5865
- userId: string;
5866
- displayName: string;
5867
- devicePubKeySpkiB64: string;
5868
- }>;
5869
- type PayCardArtifact = z.infer<typeof PayCardArtifactSchema>;
5870
6090
  declare const ARTIFACT_BODY_SCHEMAS: {
5871
6091
  readonly offline_payment_authorization: z.ZodObject<{
5872
6092
  authorization: z.ZodObject<{
@@ -6507,22 +6727,6 @@ declare const ARTIFACT_BODY_SCHEMAS: {
6507
6727
  claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
6508
6728
  claimValueHash: string;
6509
6729
  }>;
6510
- readonly pay_card: z.ZodObject<{
6511
- userId: z.ZodString;
6512
- phoneE164: z.ZodString;
6513
- displayName: z.ZodString;
6514
- devicePubKeySpkiB64: z.ZodString;
6515
- }, "strip", z.ZodTypeAny, {
6516
- phoneE164: string;
6517
- userId: string;
6518
- displayName: string;
6519
- devicePubKeySpkiB64: string;
6520
- }, {
6521
- phoneE164: string;
6522
- userId: string;
6523
- displayName: string;
6524
- devicePubKeySpkiB64: string;
6525
- }>;
6526
6730
  };
6527
6731
  /** Artifact types whose body schema is fully specified and safe to dispatch. */
6528
6732
  declare const HARDENED_ARTIFACT_TYPES: Set<ArtifactType>;
@@ -6641,154 +6845,4 @@ declare function createOfflinePaymentAuthorizationArtifactUri(input: {
6641
6845
  }>;
6642
6846
  };
6643
6847
 
6644
- /**
6645
- * Pay Card — Tier B of the Flur recipient-trust ladder.
6646
- *
6647
- * A Pay Card is a holder-signed, expiring identity attestation rendered as a
6648
- * QR. When a payer scans a Pay Card and verifies its signature against the
6649
- * holder's registered device-key, they obtain a trusted (userId, phoneE164,
6650
- * displayName, devicePubKey) tuple they can cache locally and reuse to pay
6651
- * the holder fully offline thereafter.
6652
- *
6653
- * Transport: the standard Flur v1 signed-artifact envelope
6654
- * `flur://v1/pay_card/<base64url(canonical-json(body))>.<base64url(sig)>`
6655
- *
6656
- * Trust model:
6657
- * - Card is signed by the holder's device key (P-256, ECDSA-SHA256, DER).
6658
- * - Verifier resolves (issuer=userId, kid) to a SubjectPublicKeyInfo via
6659
- * Flur's device-key registry — typically online at scan time.
6660
- * - On successful verify, the scanner upserts the card into its local
6661
- * verified-contact cache (Tier A) so future pays are offline.
6662
- *
6663
- * This module is the canonical implementation. The backend and mobile MUST
6664
- * use it for build, verify, and freshness checks — no parallel implementations.
6665
- *
6666
- * Industry-standard defaults (configurable per call):
6667
- * - TTL: 90 days from issue.
6668
- * - Refresh threshold: 30 days remaining triggers a 'refresh_recommended'
6669
- * freshness state.
6670
- *
6671
- * Field policy (enforced by {@link PayCardArtifactSchema}):
6672
- * - displayName \u2264 64 chars
6673
- * - phoneE164 must match /^\+[1-9]\d{7,14}$/
6674
- * - devicePubKeySpkiB64 must be standard base64 (no url-safe variants),
6675
- * 64..256 chars (covers P-256 SPKI = 91 chars plus forward-compat).
6676
- */
6677
-
6678
- /** Default Pay Card lifetime (ms): 90 days. */
6679
- declare const PAY_CARD_DEFAULT_TTL_MS: number;
6680
- /**
6681
- * When the remaining lifetime drops below this threshold (ms),
6682
- * {@link inspectPayCardFreshness} returns `'refresh_recommended'`.
6683
- *
6684
- * Holders should refresh in the background well before hard-expiry so
6685
- * a stale-card scan never blocks a payment.
6686
- */
6687
- declare const PAY_CARD_REFRESH_THRESHOLD_MS: number;
6688
- /** URI prefix for Pay Card artifacts. */
6689
- declare const PAY_CARD_URI_PREFIX: string;
6690
- /**
6691
- * Inputs for {@link createPayCardArtifactUri}. Mirrors the artifact codec
6692
- * inputs but pins type to `pay_card`, validates the data shape, and applies
6693
- * the default TTL when `expiresAtSeconds` is omitted.
6694
- */
6695
- interface CreatePayCardArtifactInput {
6696
- /** Holder Flur userId (also used as the envelope issuer). */
6697
- issuer: string;
6698
- /** Holder device key id. */
6699
- keyId: string;
6700
- /** Holder device private key (raw 32-byte P-256 scalar). */
6701
- privateKey: Uint8Array;
6702
- /** Pay Card business payload. */
6703
- data: PayCardArtifact;
6704
- /** URL-safe nonce, 8..64 chars. Required for envelope uniqueness. */
6705
- nonce: string;
6706
- /** Override the issued-at (seconds). Defaults to now. */
6707
- issuedAtSeconds?: number;
6708
- /**
6709
- * Override the expiry (seconds). Defaults to `issuedAt + 90 days`.
6710
- *
6711
- * SECURITY: a Pay Card is a holder-signed identity attestation, so a
6712
- * hard expiry is mandatory at the protocol level — there is no opt-out.
6713
- * Callers may shorten the TTL but cannot remove it; backend verifiers
6714
- * additionally reject envelopes without `exp` (`PAY_CARD_NO_EXPIRY`).
6715
- */
6716
- expiresAtSeconds?: number;
6717
- }
6718
- /**
6719
- * Build, sign, and encode a Pay Card as a `flur://v1/pay_card/...` URI.
6720
- *
6721
- * Defaults the envelope's `exp` to `iat + 90 days` so callers do not need
6722
- * to compute lifetimes. Refuses to emit a card whose `userId` payload
6723
- * field disagrees with the envelope `issuer` \u2014 the holder must sign their
6724
- * own card.
6725
- */
6726
- declare function createPayCardArtifactUri(input: CreatePayCardArtifactInput): {
6727
- uri: string;
6728
- signed: SignedArtifact<PayCardArtifact>;
6729
- };
6730
- /** True when the URI is shaped as a Pay Card artifact (prefix check only). */
6731
- declare function isPayCardArtifactUri(uri: string): boolean;
6732
- interface DecodedPayCard {
6733
- /** Validated Pay Card body (data + envelope header). */
6734
- body: ArtifactBody<PayCardArtifact>;
6735
- /** ASN.1 DER ECDSA P-256 signature, base64 (standard). */
6736
- sig: string;
6737
- /** Raw decoded envelope \u2014 useful when re-emitting or relaying. */
6738
- decoded: DecodedArtifactUri;
6739
- }
6740
- /**
6741
- * Decode a Pay Card URI without verifying its signature. Validates the URI
6742
- * shape, the envelope header, and the data schema. Use when the caller wants
6743
- * to inspect the card before deciding whether/how to verify it.
6744
- */
6745
- declare function decodePayCardArtifact(uri: string): DecodedPayCard;
6746
- /**
6747
- * Verify a Pay Card URI fully:
6748
- * 1. URI + envelope + data schema (via {@link decodePayCardArtifact}).
6749
- * 2. Envelope expiry (unless `options.enforceExpiry === false`).
6750
- * 3. ECDSA P-256 signature against the supplied holder SPKI public key.
6751
- *
6752
- * The caller is responsible for resolving `(issuer, kid)` to the holder's
6753
- * registered SPKI public key (typically via the backend device-key registry).
6754
- */
6755
- declare function verifyPayCardArtifact(uri: string, publicKeySpkiB64: string, options?: VerifyArtifactOptions): DecodedPayCard;
6756
- type PayCardFreshness = 'fresh' | 'refresh_recommended' | 'expired' | 'no_expiry';
6757
- /**
6758
- * Classify a Pay Card by remaining lifetime. Used by holders to decide when
6759
- * to re-fetch a freshly-signed card from the backend, and by scanners to
6760
- * decide whether to prompt the holder to refresh.
6761
- *
6762
- * - `'expired'` : envelope.exp \u2264 now
6763
- * - `'refresh_recommended'` : 0 < remaining \u2264 PAY_CARD_REFRESH_THRESHOLD_MS
6764
- * - `'fresh'` : remaining > PAY_CARD_REFRESH_THRESHOLD_MS
6765
- * - `'no_expiry'` : envelope omits `exp` (non-production cards only)
6766
- */
6767
- declare function inspectPayCardFreshness(decoded: DecodedPayCard, nowMs?: number): PayCardFreshness;
6768
- /**
6769
- * Compute the canonical body bytes a backend must sign when issuing a
6770
- * Pay Card on behalf of the holder via a *server-side* signing path.
6771
- *
6772
- * This export exists so a backend (which holds neither the holder's private
6773
- * key nor a parallel envelope implementation) can call into the SDK to
6774
- * obtain the exact bytes to sign with a hardware-backed device key abstraction.
6775
- * Mobile clients that sign locally should use {@link createPayCardArtifactUri}
6776
- * instead.
6777
- *
6778
- * Returned bytes are the same input passed to ECDSA P-256(SHA-256). Callers
6779
- * MUST keep this contract \u2014 changing the signing input is a protocol break.
6780
- */
6781
- declare function buildPayCardSigningInput(input: {
6782
- issuer: string;
6783
- keyId: string;
6784
- data: PayCardArtifact;
6785
- nonce: string;
6786
- issuedAtSeconds?: number;
6787
- /** See {@link CreatePayCardArtifactInput.expiresAtSeconds}. */
6788
- expiresAtSeconds?: number;
6789
- }): {
6790
- body: ArtifactBody<PayCardArtifact>;
6791
- bodyBytes: Uint8Array;
6792
- };
6793
-
6794
- export { ACCOUNT_FUNDED_OAC_MAX_TTL_MS, ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, ARTIFACT_BODY_SCHEMAS, ARTIFACT_TYPES, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type ArtifactBody, type ArtifactHeader, ArtifactHeaderSchema, type ArtifactType, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AttestationSecurityLevel, AttestationSecurityLevelSchema, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, CLAIM_DOMAIN_V2, COLLECTION_INTENT_STATUSES, COLLECTION_PAYMENT_STATUSES, CONSUMER_OAC_DOMAIN, CONSUMER_OAC_QR_PREFIX, CONSUMER_OFFLINE_CLAIM_SUBMIT_GRACE_MS, CONSUMER_PAYMENT_REQUEST_DOMAIN, CONSUMER_SETTLEMENT_DOMAIN, CONSUMER_SETTLEMENT_RECEIPT_QR_PREFIX, CUSTODIAL_MODES, type CanonicalClaimInput, type CashNamespace, type ClaimSignature, type CollectionIntent, CollectionIntentSchema, type CollectionPayment, type CollectionPaymentResult, CollectionPaymentResultSchema, CollectionPaymentSchema, type CollectionReportSummary, CollectionReportSummarySchema, type CollectionStatement, CollectionStatementSchema, type CollectionsClient, type CollectionsClientOptions, type ConsumerCollectionsClient, type ConsumerOAC, type OACRecord as ConsumerOACRecord, OACRecordSchema as ConsumerOACRecordSchema, ConsumerOACSchema, type ConsumerPaymentClaim, ConsumerPaymentClaimSchema, type ConsumerPaymentRequestEnvelope, ConsumerPaymentRequestEnvelopeSchema, type ConsumerSettleResult, ConsumerSettleResultSchema, type ConsumerSettlement, ConsumerSettlementSchema, type ConsumerWithdrawalsClient, type ConsumerWithdrawalsClientOptions, type CreateBusinessAccountInput, type CreateCollectionIntentInput, CreateCollectionIntentInputSchema, type CreatePayCardArtifactInput, type CreatePayLinkResponse, type CreatePayoutDestinationInput, CreatePayoutDestinationInputSchema, type CreatePayoutInput, CreatePayoutInputSchema, type CreateTransferOptions, type CreateWithdrawalInput, CreateWithdrawalInputSchema, type CreateWithdrawalResult, CreateWithdrawalResultSchema, type CustodialMode, type DecodedArtifactUri, type DecodedOfflineSmsSettleToken, type DecodedPayCard, type DeviceKeyAlg, DeviceKeyAlgSchema, type DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, FIELD, FLUR_ARTIFACT_URI_PREFIX, FLUR_ARTIFACT_URI_SCHEME, FLUR_ARTIFACT_VERSION, FlurApiError, FlurArtifactError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, HARDENED_ARTIFACT_TYPES, type HmacFetchOptions, IdentityArtifactSchema, type IngestFundingResult, IngestFundingResultSchema, type IssueAccountOacInput, IssueAccountOacInputSchema, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type IssuerTrustBundle, IssuerTrustBundleSchema, type IssuerTrustKey, IssuerTrustKeySchema, LedgerJournalEntryArtifactSchema, type ListPassesInput, type ListPassesResponse, type ListPayoutDestinationsResult, ListPayoutDestinationsResultSchema, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, MERCHANT_PAYOUT_STATUSES, MERCHANT_PROFILE_STATUSES, type MeOfflineClient, type MeOfflineClientOptions, type MembershipRole, type MerchantAccountInfo, type MerchantPayout, MerchantPayoutSchema, type MerchantProfile, MerchantProfileSchema, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, NqrPaymentRequestArtifactSchema, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, OFFLINE_CLAIM_SMS_PREFIX, OFFLINE_SMS_SETTLE_DOMAIN, OFFLINE_SMS_SETTLE_HEADER_BYTES, OFFLINE_SMS_SETTLE_PREFIX, OFFLINE_SMS_SETTLE_SIGNATURE_BYTES, OFFLINE_SMS_SETTLE_TOKEN_BYTES, OFFLINE_SMS_SETTLE_VERSION, type OacOfflineIdentity, type OfflineClaimAlgorithm, OfflineClaimArtifactSchema, type OfflineClaimSigner, type OfflinePaymentAuthorization, type OfflinePaymentAuthorizationArtifact, OfflinePaymentAuthorizationArtifactSchema, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineSmsSettleInput, type OfflineSmsSettleSigner, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, type P256EnrollmentChallengeInput, P256EnrollmentChallengeInputSchema, type P256EnrollmentChallengeResult, P256EnrollmentChallengeResultSchema, PARTNER_FUNDING_DIRECTIONS, PARTNER_FUNDING_STATUSES, PARTNER_KINDS, PARTNER_PROFILE_STATUSES, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, PAYOUT_DESTINATION_STATUSES, PAY_CARD_DEFAULT_TTL_MS, PAY_CARD_REFRESH_THRESHOLD_MS, PAY_CARD_URI_PREFIX, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerCollectionsClient, type PartnerFunding, type PartnerFundingClient, type PartnerFundingDirection, type PartnerFundingEventInput, PartnerFundingEventInputSchema, PartnerFundingSchema, type PartnerFundingStatus, type PartnerKind, type PartnerProfile, type PartnerProfileAdminClient, type PartnerProfileAdminClientOptions, PartnerProfileSchema, type PartnerProfileStatus, type PartnerScope, type PartnerSignResult, type Pass, PassArtifactSchema, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PayCardArtifact, PayCardArtifactSchema, type PayCardFreshness, type PayCollectionInput, PayCollectionInputSchema, type PayCollectionOptions, type PayCollectionResponse, type PaymentClaim, PaymentClaimSchema, PaymentIntentArtifactSchema, type PayoutDestination, PayoutDestinationSchema, type PayoutDestinationStatus, type PayoutEventInput, PayoutEventInputSchema, type PinSetInput, type PinVerifyInput, type ProviderEventInput, ProviderEventInputSchema, type ProviderEventRecord, ProviderEventRecordSchema, type PublicCollectionIntent, PublicCollectionIntentSchema, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, type Receipt, type ReceiptArtifact, ReceiptArtifactSchema, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type ReconciliationReport, ReconciliationReportSchema, type RecordPayoutEventResult, RecordPayoutEventResultSchema, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceKeyP256Input, RegisterDeviceKeyP256InputSchema, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolveCollectionOptions, type ResolveCollectionResponse, type ResolvePayLinkResponse, ReversalRecordArtifactSchema, RevokeDeviceKeyInputSchema, type RevokePassInput, type RoutingHint, SETTLEMENT_SCHEDULES, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementRecordArtifactSchema, SettlementSchema, type SignedArtifact, type SignedConsumerOAC, SignedConsumerOACSchema, type SignerPublicKey, StatementArtifactSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type TrustedIssuerKey, type UnsignedConsumerPaymentRequest, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, type UpsertMerchantProfileInput, UpsertMerchantProfileInputSchema, type UpsertPartnerProfileInput, UpsertPartnerProfileInputSchema, type VerifiedArtifact, type VerifyArtifactOptions, type VerifyClaimSignatureInput, type VerifyOacOfflineOptions, type VerifyOacOfflineResult, WITHDRAWAL_STATES, type Withdrawal, WithdrawalSchema, type WithdrawalState, base64UrlDecode, base64UrlEncode, bodySha256Hex, buildArtifactBody, buildAuthorization, buildConsumerPaymentRequest, buildOAC, buildPass, buildPayCardSigningInput, buildPaymentRequest, buildReceipt, buildRedemption, buildSmsSettleHeader, domainTag as buildSmsSettleSignedBytes, canonicalClaimSigningBytes, canonicalClaimSigningPayload, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeConsumerClaimEncounterId, computeEncounterId, constantTimeEqual, consumerOacSigningPayload, consumerPaymentRequestSigningBytes, consumerPaymentRequestSigningPayload, consumerSettlementSigningPayload, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createArtifactUri, createCollectionsClient, createConsumerCollectionsClient, createConsumerWithdrawalsClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflinePaymentAuthorizationArtifactUri, createOfflineSettlementsClient, createPartnerCollectionsClient, createPartnerFundingClient, createPartnerProfileAdminClient, createPassesClient, createPayCardArtifactUri, createReceiptArtifactUri, createReceiptsClient, createSoftwareP256Signer, decodeArtifactUri, decodeAuthorizationQR, decodeBase45, decodeConsumerSettlementReceiptQR, decodeOfflineClaimSmsMessage, decodeOfflineSmsSettleToken, decodePayCardArtifact, decodePaymentRequestQR, decodeUnverifiedConsumerOacQR, decodeUnverifiedConsumerSettlementReceiptQR, derToRawP256Signature, encodeArtifactUri, encodeAuthorizationQR, encodeBase45, encodeConsumerOacQR, encodeConsumerSettlementReceiptQR, encodeNQR, encodeOfflineClaimSmsMessage, encodeOfflineSmsSettleToken, encodePaymentRequestQR, extractOfflineClaimSmsToken, extractOfflineSmsSettleToken, formatAmount, generateDynamicQR, generateStaticQR, init, inspectPayCardFreshness, isConsumerOacQR, isConsumerPaymentRequestExpired, isHardenedArtifactType, isKnownArtifactType, isPassWithinValidity, isPayCardArtifactUri, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, readTLV, routingHint, signArtifact, signAuthorization, signConsumerPaymentRequest, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verifyArtifactSignature, verifyArtifactUri, verifyAuthorization, verifyClaimSignature, verifyConsumerPaymentRequest, verifyConsumerSettlement, verifyConsumerSettlementReceiptQR, verifyOAC, verifyOacOffline, verifyOfflineSmsSettleToken, verifyPass, verifyPayCardArtifact, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
6848
+ export { ACCOUNT_FUNDED_OAC_MAX_TTL_MS, ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, ARTIFACT_BODY_SCHEMAS, ARTIFACT_TYPES, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type ArtifactBody, type ArtifactHeader, ArtifactHeaderSchema, type ArtifactType, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AttestationSecurityLevel, AttestationSecurityLevelSchema, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, CLAIM_DOMAIN_V2, COLLECTION_INTENT_STATUSES, COLLECTION_PAYMENT_STATUSES, CONSUMER_OAC_DOMAIN, CONSUMER_OAC_QR_PREFIX, CONSUMER_OFFLINE_CLAIM_SUBMIT_GRACE_MS, CONSUMER_PAYMENT_REQUEST_DOMAIN, CONSUMER_REVOCATION_DOMAIN, CONSUMER_SETTLEMENT_DOMAIN, CONSUMER_SETTLEMENT_RECEIPT_QR_PREFIX, CUSTODIAL_MODES, type CanonicalClaimInput, type CashNamespace, type ClaimSignature, type CollectionIntent, CollectionIntentSchema, type CollectionPayment, type CollectionPaymentResult, CollectionPaymentResultSchema, CollectionPaymentSchema, type CollectionReportSummary, CollectionReportSummarySchema, type CollectionStatement, CollectionStatementSchema, type CollectionsClient, type CollectionsClientOptions, type ConsumerCollectionsClient, type ConsumerOAC, type OACRecord as ConsumerOACRecord, OACRecordSchema as ConsumerOACRecordSchema, ConsumerOACSchema, type ConsumerPaymentClaim, ConsumerPaymentClaimSchema, type ConsumerPaymentRequestEnvelope, ConsumerPaymentRequestEnvelopeSchema, type ConsumerSettleResult, ConsumerSettleResultSchema, type ConsumerSettlement, ConsumerSettlementSchema, type ConsumerWithdrawalsClient, type ConsumerWithdrawalsClientOptions, type CreateBusinessAccountInput, type CreateCollectionIntentInput, CreateCollectionIntentInputSchema, type CreatePayLinkResponse, type CreatePayoutDestinationInput, CreatePayoutDestinationInputSchema, type CreatePayoutInput, CreatePayoutInputSchema, type CreateTransferOptions, type CreateWithdrawalInput, CreateWithdrawalInputSchema, type CreateWithdrawalResult, CreateWithdrawalResultSchema, type CustodialMode, type DecodedArtifactUri, type DecodedOfflineSmsSettleToken, type DeviceKeyAlg, DeviceKeyAlgSchema, type DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, FIELD, FLUR_ARTIFACT_URI_PREFIX, FLUR_ARTIFACT_URI_SCHEME, FLUR_ARTIFACT_VERSION, FlurApiError, FlurArtifactError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, HARDENED_ARTIFACT_TYPES, type HmacFetchOptions, IdentityArtifactSchema, type IngestFundingResult, IngestFundingResultSchema, type IssueAccountOacInput, IssueAccountOacInputSchema, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type IssuerTrustBundle, IssuerTrustBundleSchema, type IssuerTrustKey, IssuerTrustKeySchema, LedgerJournalEntryArtifactSchema, type ListPassesInput, type ListPassesResponse, type ListPayoutDestinationsResult, ListPayoutDestinationsResultSchema, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, MERCHANT_PAYOUT_STATUSES, MERCHANT_PROFILE_STATUSES, type MeOfflineClient, type MeOfflineClientOptions, type MembershipRole, type MerchantAccountInfo, type MerchantPayout, MerchantPayoutSchema, type MerchantProfile, MerchantProfileSchema, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, NqrPaymentRequestArtifactSchema, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, OFFLINE_CLAIM_SMS_PREFIX, OFFLINE_SMS_SETTLE_DOMAIN, OFFLINE_SMS_SETTLE_HEADER_BYTES, OFFLINE_SMS_SETTLE_PREFIX, OFFLINE_SMS_SETTLE_SIGNATURE_BYTES, OFFLINE_SMS_SETTLE_TOKEN_BYTES, OFFLINE_SMS_SETTLE_VERSION, type OacOfflineIdentity, type OacPresentmentRequest, OacPresentmentRequestSchema, type OfflineClaimAlgorithm, OfflineClaimArtifactSchema, type OfflineClaimSigner, type OfflinePaymentAuthorization, type OfflinePaymentAuthorizationArtifact, OfflinePaymentAuthorizationArtifactSchema, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineSmsSettleInput, type OfflineSmsSettleSigner, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, type P256EnrollmentChallengeInput, P256EnrollmentChallengeInputSchema, type P256EnrollmentChallengeResult, P256EnrollmentChallengeResultSchema, PARTNER_FUNDING_DIRECTIONS, PARTNER_FUNDING_STATUSES, PARTNER_KINDS, PARTNER_PROFILE_STATUSES, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, PAYOUT_DESTINATION_STATUSES, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerCollectionsClient, type PartnerFunding, type PartnerFundingClient, type PartnerFundingDirection, type PartnerFundingEventInput, PartnerFundingEventInputSchema, PartnerFundingSchema, type PartnerFundingStatus, type PartnerKind, type PartnerProfile, type PartnerProfileAdminClient, type PartnerProfileAdminClientOptions, PartnerProfileSchema, type PartnerProfileStatus, type PartnerScope, type PartnerSignResult, type Pass, PassArtifactSchema, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PayCollectionInput, PayCollectionInputSchema, type PayCollectionOptions, type PayCollectionResponse, type PaymentClaim, PaymentClaimSchema, PaymentIntentArtifactSchema, type PayoutDestination, PayoutDestinationSchema, type PayoutDestinationStatus, type PayoutEventInput, PayoutEventInputSchema, type PinSetInput, type PinVerifyInput, type ProviderEventInput, ProviderEventInputSchema, type ProviderEventRecord, ProviderEventRecordSchema, type PublicCollectionIntent, PublicCollectionIntentSchema, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, REVOCATION_LIST_MAX_ENTRIES, type Receipt, type ReceiptArtifact, ReceiptArtifactSchema, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type ReconciliationReport, ReconciliationReportSchema, type RecordPayoutEventResult, RecordPayoutEventResultSchema, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceKeyP256Input, RegisterDeviceKeyP256InputSchema, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolveCollectionOptions, type ResolveCollectionResponse, type ResolvePayLinkResponse, ReversalRecordArtifactSchema, type RevocationList, RevocationListSchema, RevokeDeviceKeyInputSchema, type RevokePassInput, type RoutingHint, SETTLEMENT_SCHEDULES, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementRecordArtifactSchema, SettlementSchema, type SignedArtifact, type SignedConsumerOAC, SignedConsumerOACSchema, type SignedRevocationList, SignedRevocationListSchema, type SignerPublicKey, StatementArtifactSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type TrustedIssuerKey, type UnsignedConsumerPaymentRequest, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, type UpsertMerchantProfileInput, UpsertMerchantProfileInputSchema, type UpsertPartnerProfileInput, UpsertPartnerProfileInputSchema, type VerifiedArtifact, type VerifyArtifactOptions, type VerifyClaimSignatureInput, type VerifyOacOfflineOptions, type VerifyOacOfflineResult, type VerifyRevocationListOptions, type VerifyRevocationListResult, WITHDRAWAL_STATES, type Withdrawal, WithdrawalSchema, type WithdrawalState, base64UrlDecode, base64UrlEncode, bodySha256Hex, buildArtifactBody, buildAuthorization, buildConsumerPaymentRequest, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, buildSmsSettleHeader, domainTag as buildSmsSettleSignedBytes, canonicalClaimSigningBytes, canonicalClaimSigningPayload, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeConsumerClaimEncounterId, computeEncounterId, constantTimeEqual, consumerOacSigningPayload, consumerPaymentRequestSigningBytes, consumerPaymentRequestSigningPayload, consumerSettlementSigningPayload, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createArtifactUri, createCollectionsClient, createConsumerCollectionsClient, createConsumerWithdrawalsClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflinePaymentAuthorizationArtifactUri, createOfflineSettlementsClient, createPartnerCollectionsClient, createPartnerFundingClient, createPartnerProfileAdminClient, createPassesClient, createReceiptArtifactUri, createReceiptsClient, createSoftwareP256Signer, decodeArtifactUri, decodeAuthorizationQR, decodeBase45, decodeConsumerOacRequest, decodeConsumerSettlementReceiptQR, decodeOfflineClaimSmsMessage, decodeOfflineSmsSettleToken, decodePaymentRequestQR, decodeUnverifiedConsumerOacQR, decodeUnverifiedConsumerSettlementReceiptQR, derToRawP256Signature, encodeArtifactUri, encodeAuthorizationQR, encodeBase45, encodeConsumerOacQR, encodeConsumerSettlementReceiptQR, encodeNQR, encodeOfflineClaimSmsMessage, encodeOfflineSmsSettleToken, encodePaymentRequestQR, extractOfflineClaimSmsToken, extractOfflineSmsSettleToken, formatAmount, generateDynamicQR, generateStaticQR, init, isConsumerOacQR, isConsumerPaymentRequestExpired, isHardenedArtifactType, isKnownArtifactType, isOacRevoked, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, readTLV, revocationListSigningPayload, routingHint, signArtifact, signAuthorization, signConsumerPaymentRequest, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verifyArtifactSignature, verifyArtifactUri, verifyAuthorization, verifyClaimSignature, verifyConsumerPaymentRequest, verifyConsumerSettlement, verifyConsumerSettlementReceiptQR, verifyOAC, verifyOacOffline, verifyOfflineSmsSettleToken, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, verifyRevocationList, writeTLV };