@nokinc-flur/sdk 2.2.0 → 2.4.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.cjs +325 -310
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -191
- package/dist/index.d.ts +329 -191
- package/dist/index.js +314 -300
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2891,7 +2891,78 @@ declare function createAccountsClient(opts: AccountsClientOptions): AccountsClie
|
|
|
2891
2891
|
* Schemas mirror `flur-backend/src/offline-consumer/types.ts`.
|
|
2892
2892
|
*/
|
|
2893
2893
|
|
|
2894
|
+
/**
|
|
2895
|
+
* Hard upper bound on an account-funded OAC's validity window (24h). The OAC
|
|
2896
|
+
* is a *rolling* 24h credential: a device that comes online at any point
|
|
2897
|
+
* proactively reissues a fresh 24h window, while a device that stays offline
|
|
2898
|
+
* beyond 24h loses spend authority (short TTL is the revocation-propagation
|
|
2899
|
+
* mechanism). The offline verifier rejects any window longer than this.
|
|
2900
|
+
*/
|
|
2894
2901
|
declare const ACCOUNT_FUNDED_OAC_MAX_TTL_MS: number;
|
|
2902
|
+
/**
|
|
2903
|
+
* Pinned issuer trust-bundle entry returned by `GET /v1/issuer/keys`. Devices
|
|
2904
|
+
* pin these public keys and verify unified OACs OFFLINE against them — never
|
|
2905
|
+
* against the key embedded in the credential. The shape is a superset of
|
|
2906
|
+
* `TrustedIssuerKey` so it can be passed straight to `verifyOacOffline`.
|
|
2907
|
+
*/
|
|
2908
|
+
declare const IssuerTrustKeySchema: z.ZodObject<{
|
|
2909
|
+
issuerId: z.ZodString;
|
|
2910
|
+
alg: z.ZodLiteral<"p256">;
|
|
2911
|
+
publicKeySpkiB64: z.ZodString;
|
|
2912
|
+
notBeforeMs: z.ZodOptional<z.ZodNumber>;
|
|
2913
|
+
notAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
2914
|
+
}, "strip", z.ZodTypeAny, {
|
|
2915
|
+
issuerId: string;
|
|
2916
|
+
alg: "p256";
|
|
2917
|
+
publicKeySpkiB64: string;
|
|
2918
|
+
notBeforeMs?: number | undefined;
|
|
2919
|
+
notAfterMs?: number | undefined;
|
|
2920
|
+
}, {
|
|
2921
|
+
issuerId: string;
|
|
2922
|
+
alg: "p256";
|
|
2923
|
+
publicKeySpkiB64: string;
|
|
2924
|
+
notBeforeMs?: number | undefined;
|
|
2925
|
+
notAfterMs?: number | undefined;
|
|
2926
|
+
}>;
|
|
2927
|
+
type IssuerTrustKey = z.infer<typeof IssuerTrustKeySchema>;
|
|
2928
|
+
declare const IssuerTrustBundleSchema: z.ZodObject<{
|
|
2929
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
2930
|
+
issuerId: z.ZodString;
|
|
2931
|
+
alg: z.ZodLiteral<"p256">;
|
|
2932
|
+
publicKeySpkiB64: z.ZodString;
|
|
2933
|
+
notBeforeMs: z.ZodOptional<z.ZodNumber>;
|
|
2934
|
+
notAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
2935
|
+
}, "strip", z.ZodTypeAny, {
|
|
2936
|
+
issuerId: string;
|
|
2937
|
+
alg: "p256";
|
|
2938
|
+
publicKeySpkiB64: string;
|
|
2939
|
+
notBeforeMs?: number | undefined;
|
|
2940
|
+
notAfterMs?: number | undefined;
|
|
2941
|
+
}, {
|
|
2942
|
+
issuerId: string;
|
|
2943
|
+
alg: "p256";
|
|
2944
|
+
publicKeySpkiB64: string;
|
|
2945
|
+
notBeforeMs?: number | undefined;
|
|
2946
|
+
notAfterMs?: number | undefined;
|
|
2947
|
+
}>, "many">;
|
|
2948
|
+
}, "strip", z.ZodTypeAny, {
|
|
2949
|
+
keys: {
|
|
2950
|
+
issuerId: string;
|
|
2951
|
+
alg: "p256";
|
|
2952
|
+
publicKeySpkiB64: string;
|
|
2953
|
+
notBeforeMs?: number | undefined;
|
|
2954
|
+
notAfterMs?: number | undefined;
|
|
2955
|
+
}[];
|
|
2956
|
+
}, {
|
|
2957
|
+
keys: {
|
|
2958
|
+
issuerId: string;
|
|
2959
|
+
alg: "p256";
|
|
2960
|
+
publicKeySpkiB64: string;
|
|
2961
|
+
notBeforeMs?: number | undefined;
|
|
2962
|
+
notAfterMs?: number | undefined;
|
|
2963
|
+
}[];
|
|
2964
|
+
}>;
|
|
2965
|
+
type IssuerTrustBundle = z.infer<typeof IssuerTrustBundleSchema>;
|
|
2895
2966
|
/**
|
|
2896
2967
|
* Counterparty claim-submission grace after `oac.validUntilMs`. Claims
|
|
2897
2968
|
* signed while the OAC was valid may still be relayed within this window
|
|
@@ -2969,9 +3040,9 @@ declare const DeviceKeyRecordSchema: z.ZodObject<{
|
|
|
2969
3040
|
id: string;
|
|
2970
3041
|
createdAtMs: number;
|
|
2971
3042
|
revokedAtMs: number | null;
|
|
3043
|
+
alg: "p256";
|
|
2972
3044
|
publicKeySpkiB64: string | null;
|
|
2973
3045
|
securityLevel: "STRONGBOX" | "TEE" | "SECURE_ENCLAVE" | "SOFTWARE" | null;
|
|
2974
|
-
alg: "p256";
|
|
2975
3046
|
hardwareBacked: boolean;
|
|
2976
3047
|
attestedAtMs: number | null;
|
|
2977
3048
|
}, {
|
|
@@ -2980,9 +3051,9 @@ declare const DeviceKeyRecordSchema: z.ZodObject<{
|
|
|
2980
3051
|
id: string;
|
|
2981
3052
|
createdAtMs: number;
|
|
2982
3053
|
revokedAtMs: number | null;
|
|
3054
|
+
alg?: "p256" | undefined;
|
|
2983
3055
|
publicKeySpkiB64?: string | null | undefined;
|
|
2984
3056
|
securityLevel?: "STRONGBOX" | "TEE" | "SECURE_ENCLAVE" | "SOFTWARE" | null | undefined;
|
|
2985
|
-
alg?: "p256" | undefined;
|
|
2986
3057
|
hardwareBacked?: boolean | undefined;
|
|
2987
3058
|
attestedAtMs?: number | null | undefined;
|
|
2988
3059
|
}>;
|
|
@@ -3001,6 +3072,13 @@ declare const ConsumerOACSchema: z.ZodObject<{
|
|
|
3001
3072
|
alg: z.ZodLiteral<"p256">;
|
|
3002
3073
|
/** P-256 SubjectPublicKeyInfo DER, base64. */
|
|
3003
3074
|
devicePubkeySpkiB64: z.ZodString;
|
|
3075
|
+
/**
|
|
3076
|
+
* Per-transaction / cumulative offline spend ceilings. Zero is valid and
|
|
3077
|
+
* denotes an identity-only OAC: the credential proves who the holder is and
|
|
3078
|
+
* binds their device key for offline-verifiable first contact, but carries
|
|
3079
|
+
* no offline spend authority (every claim against it routes to REVIEW).
|
|
3080
|
+
* Issued to zero-balance wallets so they can still be paid offline.
|
|
3081
|
+
*/
|
|
3004
3082
|
perTxCapKobo: z.ZodNumber;
|
|
3005
3083
|
cumulativeCapKobo: z.ZodNumber;
|
|
3006
3084
|
currency: z.ZodString;
|
|
@@ -3008,9 +3086,19 @@ declare const ConsumerOACSchema: z.ZodObject<{
|
|
|
3008
3086
|
validUntilMs: z.ZodNumber;
|
|
3009
3087
|
counterSeed: z.ZodNumber;
|
|
3010
3088
|
issuedAtMs: z.ZodNumber;
|
|
3089
|
+
/**
|
|
3090
|
+
* Issuer-attested identity folded into the OAC so a single signed
|
|
3091
|
+
* credential serves both Tier B offline-verifiable identity and offline
|
|
3092
|
+
* spend authority. Verified offline against a pinned issuer key; the
|
|
3093
|
+
* backend remains authoritative at settlement.
|
|
3094
|
+
*/
|
|
3095
|
+
phoneE164: z.ZodString;
|
|
3096
|
+
displayName: z.ZodString;
|
|
3011
3097
|
}, "strip", z.ZodTypeAny, {
|
|
3098
|
+
phoneE164: string;
|
|
3012
3099
|
userId: string;
|
|
3013
3100
|
deviceId: string;
|
|
3101
|
+
displayName: string;
|
|
3014
3102
|
currency: string;
|
|
3015
3103
|
perTxCapKobo: number;
|
|
3016
3104
|
cumulativeCapKobo: number;
|
|
@@ -3023,8 +3111,10 @@ declare const ConsumerOACSchema: z.ZodObject<{
|
|
|
3023
3111
|
oacId: string;
|
|
3024
3112
|
devicePubkeySpkiB64: string;
|
|
3025
3113
|
}, {
|
|
3114
|
+
phoneE164: string;
|
|
3026
3115
|
userId: string;
|
|
3027
3116
|
deviceId: string;
|
|
3117
|
+
displayName: string;
|
|
3028
3118
|
currency: string;
|
|
3029
3119
|
perTxCapKobo: number;
|
|
3030
3120
|
cumulativeCapKobo: number;
|
|
@@ -3053,6 +3143,13 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
|
|
|
3053
3143
|
alg: z.ZodLiteral<"p256">;
|
|
3054
3144
|
/** P-256 SubjectPublicKeyInfo DER, base64. */
|
|
3055
3145
|
devicePubkeySpkiB64: z.ZodString;
|
|
3146
|
+
/**
|
|
3147
|
+
* Per-transaction / cumulative offline spend ceilings. Zero is valid and
|
|
3148
|
+
* denotes an identity-only OAC: the credential proves who the holder is and
|
|
3149
|
+
* binds their device key for offline-verifiable first contact, but carries
|
|
3150
|
+
* no offline spend authority (every claim against it routes to REVIEW).
|
|
3151
|
+
* Issued to zero-balance wallets so they can still be paid offline.
|
|
3152
|
+
*/
|
|
3056
3153
|
perTxCapKobo: z.ZodNumber;
|
|
3057
3154
|
cumulativeCapKobo: z.ZodNumber;
|
|
3058
3155
|
currency: z.ZodString;
|
|
@@ -3060,9 +3157,19 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
|
|
|
3060
3157
|
validUntilMs: z.ZodNumber;
|
|
3061
3158
|
counterSeed: z.ZodNumber;
|
|
3062
3159
|
issuedAtMs: z.ZodNumber;
|
|
3160
|
+
/**
|
|
3161
|
+
* Issuer-attested identity folded into the OAC so a single signed
|
|
3162
|
+
* credential serves both Tier B offline-verifiable identity and offline
|
|
3163
|
+
* spend authority. Verified offline against a pinned issuer key; the
|
|
3164
|
+
* backend remains authoritative at settlement.
|
|
3165
|
+
*/
|
|
3166
|
+
phoneE164: z.ZodString;
|
|
3167
|
+
displayName: z.ZodString;
|
|
3063
3168
|
}, "strip", z.ZodTypeAny, {
|
|
3169
|
+
phoneE164: string;
|
|
3064
3170
|
userId: string;
|
|
3065
3171
|
deviceId: string;
|
|
3172
|
+
displayName: string;
|
|
3066
3173
|
currency: string;
|
|
3067
3174
|
perTxCapKobo: number;
|
|
3068
3175
|
cumulativeCapKobo: number;
|
|
@@ -3075,8 +3182,10 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
|
|
|
3075
3182
|
oacId: string;
|
|
3076
3183
|
devicePubkeySpkiB64: string;
|
|
3077
3184
|
}, {
|
|
3185
|
+
phoneE164: string;
|
|
3078
3186
|
userId: string;
|
|
3079
3187
|
deviceId: string;
|
|
3188
|
+
displayName: string;
|
|
3080
3189
|
currency: string;
|
|
3081
3190
|
perTxCapKobo: number;
|
|
3082
3191
|
cumulativeCapKobo: number;
|
|
@@ -3096,8 +3205,10 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
|
|
|
3096
3205
|
}, "strip", z.ZodTypeAny, {
|
|
3097
3206
|
issuerSig: string;
|
|
3098
3207
|
oac: {
|
|
3208
|
+
phoneE164: string;
|
|
3099
3209
|
userId: string;
|
|
3100
3210
|
deviceId: string;
|
|
3211
|
+
displayName: string;
|
|
3101
3212
|
currency: string;
|
|
3102
3213
|
perTxCapKobo: number;
|
|
3103
3214
|
cumulativeCapKobo: number;
|
|
@@ -3114,8 +3225,10 @@ declare const SignedConsumerOACSchema: z.ZodObject<{
|
|
|
3114
3225
|
}, {
|
|
3115
3226
|
issuerSig: string;
|
|
3116
3227
|
oac: {
|
|
3228
|
+
phoneE164: string;
|
|
3117
3229
|
userId: string;
|
|
3118
3230
|
deviceId: string;
|
|
3231
|
+
displayName: string;
|
|
3119
3232
|
currency: string;
|
|
3120
3233
|
perTxCapKobo: number;
|
|
3121
3234
|
cumulativeCapKobo: number;
|
|
@@ -3146,6 +3259,13 @@ declare const OACRecordSchema: z.ZodObject<{
|
|
|
3146
3259
|
alg: z.ZodLiteral<"p256">;
|
|
3147
3260
|
/** P-256 SubjectPublicKeyInfo DER, base64. */
|
|
3148
3261
|
devicePubkeySpkiB64: z.ZodString;
|
|
3262
|
+
/**
|
|
3263
|
+
* Per-transaction / cumulative offline spend ceilings. Zero is valid and
|
|
3264
|
+
* denotes an identity-only OAC: the credential proves who the holder is and
|
|
3265
|
+
* binds their device key for offline-verifiable first contact, but carries
|
|
3266
|
+
* no offline spend authority (every claim against it routes to REVIEW).
|
|
3267
|
+
* Issued to zero-balance wallets so they can still be paid offline.
|
|
3268
|
+
*/
|
|
3149
3269
|
perTxCapKobo: z.ZodNumber;
|
|
3150
3270
|
cumulativeCapKobo: z.ZodNumber;
|
|
3151
3271
|
currency: z.ZodString;
|
|
@@ -3153,9 +3273,19 @@ declare const OACRecordSchema: z.ZodObject<{
|
|
|
3153
3273
|
validUntilMs: z.ZodNumber;
|
|
3154
3274
|
counterSeed: z.ZodNumber;
|
|
3155
3275
|
issuedAtMs: z.ZodNumber;
|
|
3276
|
+
/**
|
|
3277
|
+
* Issuer-attested identity folded into the OAC so a single signed
|
|
3278
|
+
* credential serves both Tier B offline-verifiable identity and offline
|
|
3279
|
+
* spend authority. Verified offline against a pinned issuer key; the
|
|
3280
|
+
* backend remains authoritative at settlement.
|
|
3281
|
+
*/
|
|
3282
|
+
phoneE164: z.ZodString;
|
|
3283
|
+
displayName: z.ZodString;
|
|
3156
3284
|
}, "strip", z.ZodTypeAny, {
|
|
3285
|
+
phoneE164: string;
|
|
3157
3286
|
userId: string;
|
|
3158
3287
|
deviceId: string;
|
|
3288
|
+
displayName: string;
|
|
3159
3289
|
currency: string;
|
|
3160
3290
|
perTxCapKobo: number;
|
|
3161
3291
|
cumulativeCapKobo: number;
|
|
@@ -3168,8 +3298,10 @@ declare const OACRecordSchema: z.ZodObject<{
|
|
|
3168
3298
|
oacId: string;
|
|
3169
3299
|
devicePubkeySpkiB64: string;
|
|
3170
3300
|
}, {
|
|
3301
|
+
phoneE164: string;
|
|
3171
3302
|
userId: string;
|
|
3172
3303
|
deviceId: string;
|
|
3304
|
+
displayName: string;
|
|
3173
3305
|
currency: string;
|
|
3174
3306
|
perTxCapKobo: number;
|
|
3175
3307
|
cumulativeCapKobo: number;
|
|
@@ -3196,8 +3328,10 @@ declare const OACRecordSchema: z.ZodObject<{
|
|
|
3196
3328
|
issuerSig: string;
|
|
3197
3329
|
revokedAtMs: number | null;
|
|
3198
3330
|
oac: {
|
|
3331
|
+
phoneE164: string;
|
|
3199
3332
|
userId: string;
|
|
3200
3333
|
deviceId: string;
|
|
3334
|
+
displayName: string;
|
|
3201
3335
|
currency: string;
|
|
3202
3336
|
perTxCapKobo: number;
|
|
3203
3337
|
cumulativeCapKobo: number;
|
|
@@ -3218,8 +3352,10 @@ declare const OACRecordSchema: z.ZodObject<{
|
|
|
3218
3352
|
issuerSig: string;
|
|
3219
3353
|
revokedAtMs: number | null;
|
|
3220
3354
|
oac: {
|
|
3355
|
+
phoneE164: string;
|
|
3221
3356
|
userId: string;
|
|
3222
3357
|
deviceId: string;
|
|
3358
|
+
displayName: string;
|
|
3223
3359
|
currency: string;
|
|
3224
3360
|
perTxCapKobo: number;
|
|
3225
3361
|
cumulativeCapKobo: number;
|
|
@@ -3279,6 +3415,13 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3279
3415
|
alg: z.ZodLiteral<"p256">;
|
|
3280
3416
|
/** P-256 SubjectPublicKeyInfo DER, base64. */
|
|
3281
3417
|
devicePubkeySpkiB64: z.ZodString;
|
|
3418
|
+
/**
|
|
3419
|
+
* Per-transaction / cumulative offline spend ceilings. Zero is valid and
|
|
3420
|
+
* denotes an identity-only OAC: the credential proves who the holder is and
|
|
3421
|
+
* binds their device key for offline-verifiable first contact, but carries
|
|
3422
|
+
* no offline spend authority (every claim against it routes to REVIEW).
|
|
3423
|
+
* Issued to zero-balance wallets so they can still be paid offline.
|
|
3424
|
+
*/
|
|
3282
3425
|
perTxCapKobo: z.ZodNumber;
|
|
3283
3426
|
cumulativeCapKobo: z.ZodNumber;
|
|
3284
3427
|
currency: z.ZodString;
|
|
@@ -3286,9 +3429,19 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3286
3429
|
validUntilMs: z.ZodNumber;
|
|
3287
3430
|
counterSeed: z.ZodNumber;
|
|
3288
3431
|
issuedAtMs: z.ZodNumber;
|
|
3432
|
+
/**
|
|
3433
|
+
* Issuer-attested identity folded into the OAC so a single signed
|
|
3434
|
+
* credential serves both Tier B offline-verifiable identity and offline
|
|
3435
|
+
* spend authority. Verified offline against a pinned issuer key; the
|
|
3436
|
+
* backend remains authoritative at settlement.
|
|
3437
|
+
*/
|
|
3438
|
+
phoneE164: z.ZodString;
|
|
3439
|
+
displayName: z.ZodString;
|
|
3289
3440
|
}, "strip", z.ZodTypeAny, {
|
|
3441
|
+
phoneE164: string;
|
|
3290
3442
|
userId: string;
|
|
3291
3443
|
deviceId: string;
|
|
3444
|
+
displayName: string;
|
|
3292
3445
|
currency: string;
|
|
3293
3446
|
perTxCapKobo: number;
|
|
3294
3447
|
cumulativeCapKobo: number;
|
|
@@ -3301,8 +3454,10 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3301
3454
|
oacId: string;
|
|
3302
3455
|
devicePubkeySpkiB64: string;
|
|
3303
3456
|
}, {
|
|
3457
|
+
phoneE164: string;
|
|
3304
3458
|
userId: string;
|
|
3305
3459
|
deviceId: string;
|
|
3460
|
+
displayName: string;
|
|
3306
3461
|
currency: string;
|
|
3307
3462
|
perTxCapKobo: number;
|
|
3308
3463
|
cumulativeCapKobo: number;
|
|
@@ -3329,8 +3484,10 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3329
3484
|
issuerSig: string;
|
|
3330
3485
|
revokedAtMs: number | null;
|
|
3331
3486
|
oac: {
|
|
3487
|
+
phoneE164: string;
|
|
3332
3488
|
userId: string;
|
|
3333
3489
|
deviceId: string;
|
|
3490
|
+
displayName: string;
|
|
3334
3491
|
currency: string;
|
|
3335
3492
|
perTxCapKobo: number;
|
|
3336
3493
|
cumulativeCapKobo: number;
|
|
@@ -3351,8 +3508,10 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3351
3508
|
issuerSig: string;
|
|
3352
3509
|
revokedAtMs: number | null;
|
|
3353
3510
|
oac: {
|
|
3511
|
+
phoneE164: string;
|
|
3354
3512
|
userId: string;
|
|
3355
3513
|
deviceId: string;
|
|
3514
|
+
displayName: string;
|
|
3356
3515
|
currency: string;
|
|
3357
3516
|
perTxCapKobo: number;
|
|
3358
3517
|
cumulativeCapKobo: number;
|
|
@@ -3375,8 +3534,10 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3375
3534
|
issuerSig: string;
|
|
3376
3535
|
revokedAtMs: number | null;
|
|
3377
3536
|
oac: {
|
|
3537
|
+
phoneE164: string;
|
|
3378
3538
|
userId: string;
|
|
3379
3539
|
deviceId: string;
|
|
3540
|
+
displayName: string;
|
|
3380
3541
|
currency: string;
|
|
3381
3542
|
perTxCapKobo: number;
|
|
3382
3543
|
cumulativeCapKobo: number;
|
|
@@ -3399,8 +3560,10 @@ declare const OfflineStatusResultSchema: z.ZodObject<{
|
|
|
3399
3560
|
issuerSig: string;
|
|
3400
3561
|
revokedAtMs: number | null;
|
|
3401
3562
|
oac: {
|
|
3563
|
+
phoneE164: string;
|
|
3402
3564
|
userId: string;
|
|
3403
3565
|
deviceId: string;
|
|
3566
|
+
displayName: string;
|
|
3404
3567
|
currency: string;
|
|
3405
3568
|
perTxCapKobo: number;
|
|
3406
3569
|
cumulativeCapKobo: number;
|
|
@@ -3683,6 +3846,8 @@ type MeOfflineClient = {
|
|
|
3683
3846
|
getStatus: (deviceId?: string) => Promise<OfflineStatusResult>;
|
|
3684
3847
|
submitClaim: (claim: ConsumerPaymentClaim) => Promise<ConsumerSettleResult>;
|
|
3685
3848
|
getSettlement: (idOrKey: string) => Promise<ConsumerSettlement>;
|
|
3849
|
+
/** Fetch the public pinned issuer trust bundle (`GET /v1/issuer/keys`). */
|
|
3850
|
+
getIssuerKeys: () => Promise<IssuerTrustBundle>;
|
|
3686
3851
|
};
|
|
3687
3852
|
declare function createMeOfflineClient(opts: MeOfflineClientOptions): MeOfflineClient;
|
|
3688
3853
|
|
|
@@ -3939,6 +4104,163 @@ declare function verifyConsumerSettlementReceiptQR(value: string, issuerPublicKe
|
|
|
3939
4104
|
declare function decodeConsumerSettlementReceiptQR(value: string): ConsumerSettlement;
|
|
3940
4105
|
declare function decodeConsumerSettlementReceiptQR(value: string, issuerPublicKeySpkiB64: string): ConsumerSettlement;
|
|
3941
4106
|
|
|
4107
|
+
/**
|
|
4108
|
+
* Offline verification of the unified Offline Authorization Certificate (OAC).
|
|
4109
|
+
*
|
|
4110
|
+
* The OAC is issuer-signed and folds identity (phoneE164, displayName, bound
|
|
4111
|
+
* device key) into the same credential that carries offline spend authority.
|
|
4112
|
+
* This lets two users who meet for the first time recognise and pay each
|
|
4113
|
+
* other WITHOUT a network round-trip: the verifier checks the issuer
|
|
4114
|
+
* signature against a *pinned* trusted issuer key (a Trust Bundle refreshed
|
|
4115
|
+
* whenever the device is online), never the key embedded in the credential.
|
|
4116
|
+
*
|
|
4117
|
+
* Trust model:
|
|
4118
|
+
* - Provisional offline authorization, authoritative online settlement.
|
|
4119
|
+
* A successful offline verify proves the credential was issued by Flur
|
|
4120
|
+
* and is within its validity window; the backend still re-checks
|
|
4121
|
+
* revocation, balance, and caps at settlement. Short OAC TTL is the
|
|
4122
|
+
* revocation-propagation mechanism — a revoked user cannot refresh and
|
|
4123
|
+
* their OAC expires within the issuance TTL.
|
|
4124
|
+
*
|
|
4125
|
+
* Wire format mirrors `flur-backend/src/offline-consumer/service.ts`
|
|
4126
|
+
* (`oacSigningPayload`): the issuer signs `canonicalJSONBytes({ domain, ...oac })`
|
|
4127
|
+
* with its P-256 key. Adding fields to `ConsumerOAC` automatically includes
|
|
4128
|
+
* them in the signed bytes, so identity is covered without a new domain.
|
|
4129
|
+
*/
|
|
4130
|
+
|
|
4131
|
+
/**
|
|
4132
|
+
* Domain tag bound into the OAC issuer signature. MUST match
|
|
4133
|
+
* `OAC_DOMAIN` in `flur-backend/src/offline-consumer/service.ts`.
|
|
4134
|
+
*/
|
|
4135
|
+
declare const CONSUMER_OAC_DOMAIN: "flur:consumer-offline:v1:oac";
|
|
4136
|
+
/**
|
|
4137
|
+
* A pinned issuer key the device trusts for offline OAC verification.
|
|
4138
|
+
* Sourced from the backend Trust Bundle (`GET /v1/issuer/keys`) and cached
|
|
4139
|
+
* on-device. `notBeforeMs` / `notAfterMs` bound the key's own validity so a
|
|
4140
|
+
* rotated-out key cannot be used to verify a freshly minted credential.
|
|
4141
|
+
*/
|
|
4142
|
+
interface TrustedIssuerKey {
|
|
4143
|
+
issuerId: string;
|
|
4144
|
+
/** Issuer P-256 public key as SubjectPublicKeyInfo DER, base64. */
|
|
4145
|
+
publicKeySpkiB64: string;
|
|
4146
|
+
notBeforeMs?: number;
|
|
4147
|
+
notAfterMs?: number;
|
|
4148
|
+
}
|
|
4149
|
+
/** Identity surfaced to the caller after a successful offline verify. */
|
|
4150
|
+
interface OacOfflineIdentity {
|
|
4151
|
+
oacId: string;
|
|
4152
|
+
issuerId: string;
|
|
4153
|
+
userId: string;
|
|
4154
|
+
phoneE164: string;
|
|
4155
|
+
displayName: string;
|
|
4156
|
+
/** Holder's bound device key; lets the caller verify receipts offline. */
|
|
4157
|
+
devicePubkeySpkiB64: string;
|
|
4158
|
+
}
|
|
4159
|
+
type VerifyOacOfflineResult = {
|
|
4160
|
+
ok: true;
|
|
4161
|
+
oac: ConsumerOAC;
|
|
4162
|
+
identity: OacOfflineIdentity;
|
|
4163
|
+
} | {
|
|
4164
|
+
ok: false;
|
|
4165
|
+
reason: 'malformed' | 'untrusted_issuer' | 'signature_invalid' | 'window_too_long' | 'not_yet_valid' | 'expired';
|
|
4166
|
+
};
|
|
4167
|
+
interface VerifyOacOfflineOptions {
|
|
4168
|
+
/** Override the wall clock; defaults to `Date.now()`. */
|
|
4169
|
+
nowMs?: number;
|
|
4170
|
+
}
|
|
4171
|
+
/** Canonical OAC payload (domain-bound) the backend issuer signs. */
|
|
4172
|
+
declare function consumerOacSigningPayload(oac: ConsumerOAC): {
|
|
4173
|
+
phoneE164: string;
|
|
4174
|
+
userId: string;
|
|
4175
|
+
deviceId: string;
|
|
4176
|
+
displayName: string;
|
|
4177
|
+
currency: string;
|
|
4178
|
+
perTxCapKobo: number;
|
|
4179
|
+
cumulativeCapKobo: number;
|
|
4180
|
+
validFromMs: number;
|
|
4181
|
+
validUntilMs: number;
|
|
4182
|
+
counterSeed: number;
|
|
4183
|
+
issuedAtMs: number;
|
|
4184
|
+
issuerId: string;
|
|
4185
|
+
alg: "p256";
|
|
4186
|
+
oacId: string;
|
|
4187
|
+
devicePubkeySpkiB64: string;
|
|
4188
|
+
domain: "flur:consumer-offline:v1:oac";
|
|
4189
|
+
};
|
|
4190
|
+
/**
|
|
4191
|
+
* Verify a signed OAC offline against a pinned set of trusted issuer keys.
|
|
4192
|
+
*
|
|
4193
|
+
* Security invariants:
|
|
4194
|
+
* - The signature is checked against the PINNED key for `oac.issuerId`,
|
|
4195
|
+
* never the credential-embedded `issuerPublicKeySpkiB64`. An attacker who
|
|
4196
|
+
* forges an OAC with their own key (and a matching embedded key) fails
|
|
4197
|
+
* because their key is not pinned.
|
|
4198
|
+
* - The pinned key's own validity window is enforced.
|
|
4199
|
+
* - The OAC validity window is enforced (`validFromMs <= now < validUntilMs`).
|
|
4200
|
+
*/
|
|
4201
|
+
declare function verifyOacOffline(signed: SignedConsumerOAC, trustedKeys: readonly TrustedIssuerKey[], options?: VerifyOacOfflineOptions): VerifyOacOfflineResult;
|
|
4202
|
+
/**
|
|
4203
|
+
* QR prefix for a presented unified OAC. A holder shows this QR to be paid
|
|
4204
|
+
* and/or identified offline; the scanner decodes it and calls
|
|
4205
|
+
* `verifyOacOffline` against its pinned trust bundle. Distinct from the
|
|
4206
|
+
* settlement-receipt (`FLURSR1.`) and pay-card prefixes so the scanner can
|
|
4207
|
+
* dispatch by prefix without ambiguity.
|
|
4208
|
+
*/
|
|
4209
|
+
declare const CONSUMER_OAC_QR_PREFIX: "FLUROAC1.";
|
|
4210
|
+
/** True iff `value` looks like a presented OAC QR payload. */
|
|
4211
|
+
declare function isConsumerOacQR(value: string): boolean;
|
|
4212
|
+
/**
|
|
4213
|
+
* Advisory "pay me" request a holder may attach to a presented OAC pay code:
|
|
4214
|
+
* an amount, a purpose/intent, and a free-text reference. This rides as an
|
|
4215
|
+
* UNSIGNED suffix on the QR (see {@link encodeConsumerOacQR}) — it is never
|
|
4216
|
+
* part of the issuer-signed credential and carries no authority. The payer's
|
|
4217
|
+
* app treats it purely as a prefill hint and always confirms the amount,
|
|
4218
|
+
* exactly as with a NIBSS dynamic QR.
|
|
4219
|
+
*/
|
|
4220
|
+
declare const OacPresentmentRequestSchema: z.ZodObject<{
|
|
4221
|
+
/** Requested amount in minor units (kobo). */
|
|
4222
|
+
amountMinor: z.ZodOptional<z.ZodNumber>;
|
|
4223
|
+
/** Purpose/intent code (mirrors the NIBSS intent vocabulary). */
|
|
4224
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
4225
|
+
/** Free-text reference / note. */
|
|
4226
|
+
reference: z.ZodOptional<z.ZodString>;
|
|
4227
|
+
}, "strict", z.ZodTypeAny, {
|
|
4228
|
+
amountMinor?: number | undefined;
|
|
4229
|
+
reference?: string | undefined;
|
|
4230
|
+
intent?: string | undefined;
|
|
4231
|
+
}, {
|
|
4232
|
+
amountMinor?: number | undefined;
|
|
4233
|
+
reference?: string | undefined;
|
|
4234
|
+
intent?: string | undefined;
|
|
4235
|
+
}>;
|
|
4236
|
+
type OacPresentmentRequest = z.infer<typeof OacPresentmentRequestSchema>;
|
|
4237
|
+
/**
|
|
4238
|
+
* Encode a signed OAC as a scannable QR payload. The envelope is validated
|
|
4239
|
+
* before encoding so a malformed credential can never be presented.
|
|
4240
|
+
*
|
|
4241
|
+
* An optional advisory {@link OacPresentmentRequest} is appended as a
|
|
4242
|
+
* dot-separated, base64url-encoded suffix:
|
|
4243
|
+
* `FLUROAC1.<base64url(signed)>.<base64url(request)>`
|
|
4244
|
+
* The signed segment is byte-identical with or without the suffix, so the
|
|
4245
|
+
* credential's verifiability is unaffected. An empty request adds no suffix.
|
|
4246
|
+
*/
|
|
4247
|
+
declare function encodeConsumerOacQR(signed: SignedConsumerOAC, request?: OacPresentmentRequest): string;
|
|
4248
|
+
/**
|
|
4249
|
+
* Decode (WITHOUT verifying) a presented OAC QR back into a signed envelope.
|
|
4250
|
+
* Any advisory request suffix is ignored here — use
|
|
4251
|
+
* {@link decodeConsumerOacRequest} to read it. The caller MUST pass the result
|
|
4252
|
+
* to `verifyOacOffline` against pinned keys before trusting any field —
|
|
4253
|
+
* decoding proves nothing about authenticity.
|
|
4254
|
+
*/
|
|
4255
|
+
declare function decodeUnverifiedConsumerOacQR(value: string): SignedConsumerOAC;
|
|
4256
|
+
/**
|
|
4257
|
+
* Read the advisory {@link OacPresentmentRequest} from a presented OAC QR, or
|
|
4258
|
+
* `null` if absent/malformed. This is purely a prefill hint and is NEVER
|
|
4259
|
+
* authoritative — a malformed suffix is treated as "no request" and never
|
|
4260
|
+
* throws, so a bad suffix can never block a verifiable credential.
|
|
4261
|
+
*/
|
|
4262
|
+
declare function decodeConsumerOacRequest(value: string): OacPresentmentRequest | null;
|
|
4263
|
+
|
|
3942
4264
|
/**
|
|
3943
4265
|
* FLURA1 — single-SMS consumer-offline settle token.
|
|
3944
4266
|
*
|
|
@@ -4948,7 +5270,6 @@ declare const ARTIFACT_TYPES: {
|
|
|
4948
5270
|
readonly STATEMENT: "statement";
|
|
4949
5271
|
readonly PASS: "pass";
|
|
4950
5272
|
readonly IDENTITY: "identity";
|
|
4951
|
-
readonly PAY_CARD: "pay_card";
|
|
4952
5273
|
};
|
|
4953
5274
|
type ArtifactType = (typeof ARTIFACT_TYPES)[keyof typeof ARTIFACT_TYPES];
|
|
4954
5275
|
declare const OfflinePaymentAuthorizationArtifactSchema: z.ZodObject<{
|
|
@@ -5436,17 +5757,17 @@ declare const ReversalRecordArtifactSchema: z.ZodObject<{
|
|
|
5436
5757
|
}, "strip", z.ZodTypeAny, {
|
|
5437
5758
|
currency: "NGN";
|
|
5438
5759
|
amountKobo: number;
|
|
5760
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5439
5761
|
reversalId: string;
|
|
5440
5762
|
originalTxnId: string;
|
|
5441
|
-
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5442
5763
|
reversedAtMs: number;
|
|
5443
5764
|
memo?: string | undefined;
|
|
5444
5765
|
}, {
|
|
5445
5766
|
currency: "NGN";
|
|
5446
5767
|
amountKobo: number;
|
|
5768
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5447
5769
|
reversalId: string;
|
|
5448
5770
|
originalTxnId: string;
|
|
5449
|
-
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5450
5771
|
reversedAtMs: number;
|
|
5451
5772
|
memo?: string | undefined;
|
|
5452
5773
|
}>;
|
|
@@ -5592,23 +5913,6 @@ declare const IdentityArtifactSchema: z.ZodObject<{
|
|
|
5592
5913
|
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
5593
5914
|
claimValueHash: string;
|
|
5594
5915
|
}>;
|
|
5595
|
-
declare const PayCardArtifactSchema: z.ZodObject<{
|
|
5596
|
-
userId: z.ZodString;
|
|
5597
|
-
phoneE164: z.ZodString;
|
|
5598
|
-
displayName: z.ZodString;
|
|
5599
|
-
devicePubKeySpkiB64: z.ZodString;
|
|
5600
|
-
}, "strip", z.ZodTypeAny, {
|
|
5601
|
-
phoneE164: string;
|
|
5602
|
-
userId: string;
|
|
5603
|
-
displayName: string;
|
|
5604
|
-
devicePubKeySpkiB64: string;
|
|
5605
|
-
}, {
|
|
5606
|
-
phoneE164: string;
|
|
5607
|
-
userId: string;
|
|
5608
|
-
displayName: string;
|
|
5609
|
-
devicePubKeySpkiB64: string;
|
|
5610
|
-
}>;
|
|
5611
|
-
type PayCardArtifact = z.infer<typeof PayCardArtifactSchema>;
|
|
5612
5916
|
declare const ARTIFACT_BODY_SCHEMAS: {
|
|
5613
5917
|
readonly offline_payment_authorization: z.ZodObject<{
|
|
5614
5918
|
authorization: z.ZodObject<{
|
|
@@ -6093,17 +6397,17 @@ declare const ARTIFACT_BODY_SCHEMAS: {
|
|
|
6093
6397
|
}, "strip", z.ZodTypeAny, {
|
|
6094
6398
|
currency: "NGN";
|
|
6095
6399
|
amountKobo: number;
|
|
6400
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6096
6401
|
reversalId: string;
|
|
6097
6402
|
originalTxnId: string;
|
|
6098
|
-
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6099
6403
|
reversedAtMs: number;
|
|
6100
6404
|
memo?: string | undefined;
|
|
6101
6405
|
}, {
|
|
6102
6406
|
currency: "NGN";
|
|
6103
6407
|
amountKobo: number;
|
|
6408
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6104
6409
|
reversalId: string;
|
|
6105
6410
|
originalTxnId: string;
|
|
6106
|
-
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6107
6411
|
reversedAtMs: number;
|
|
6108
6412
|
memo?: string | undefined;
|
|
6109
6413
|
}>;
|
|
@@ -6249,22 +6553,6 @@ declare const ARTIFACT_BODY_SCHEMAS: {
|
|
|
6249
6553
|
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
6250
6554
|
claimValueHash: string;
|
|
6251
6555
|
}>;
|
|
6252
|
-
readonly pay_card: z.ZodObject<{
|
|
6253
|
-
userId: z.ZodString;
|
|
6254
|
-
phoneE164: z.ZodString;
|
|
6255
|
-
displayName: z.ZodString;
|
|
6256
|
-
devicePubKeySpkiB64: z.ZodString;
|
|
6257
|
-
}, "strip", z.ZodTypeAny, {
|
|
6258
|
-
phoneE164: string;
|
|
6259
|
-
userId: string;
|
|
6260
|
-
displayName: string;
|
|
6261
|
-
devicePubKeySpkiB64: string;
|
|
6262
|
-
}, {
|
|
6263
|
-
phoneE164: string;
|
|
6264
|
-
userId: string;
|
|
6265
|
-
displayName: string;
|
|
6266
|
-
devicePubKeySpkiB64: string;
|
|
6267
|
-
}>;
|
|
6268
6556
|
};
|
|
6269
6557
|
/** Artifact types whose body schema is fully specified and safe to dispatch. */
|
|
6270
6558
|
declare const HARDENED_ARTIFACT_TYPES: Set<ArtifactType>;
|
|
@@ -6383,154 +6671,4 @@ declare function createOfflinePaymentAuthorizationArtifactUri(input: {
|
|
|
6383
6671
|
}>;
|
|
6384
6672
|
};
|
|
6385
6673
|
|
|
6386
|
-
/**
|
|
6387
|
-
* Pay Card — Tier B of the Flur recipient-trust ladder.
|
|
6388
|
-
*
|
|
6389
|
-
* A Pay Card is a holder-signed, expiring identity attestation rendered as a
|
|
6390
|
-
* QR. When a payer scans a Pay Card and verifies its signature against the
|
|
6391
|
-
* holder's registered device-key, they obtain a trusted (userId, phoneE164,
|
|
6392
|
-
* displayName, devicePubKey) tuple they can cache locally and reuse to pay
|
|
6393
|
-
* the holder fully offline thereafter.
|
|
6394
|
-
*
|
|
6395
|
-
* Transport: the standard Flur v1 signed-artifact envelope
|
|
6396
|
-
* `flur://v1/pay_card/<base64url(canonical-json(body))>.<base64url(sig)>`
|
|
6397
|
-
*
|
|
6398
|
-
* Trust model:
|
|
6399
|
-
* - Card is signed by the holder's device key (P-256, ECDSA-SHA256, DER).
|
|
6400
|
-
* - Verifier resolves (issuer=userId, kid) to a SubjectPublicKeyInfo via
|
|
6401
|
-
* Flur's device-key registry — typically online at scan time.
|
|
6402
|
-
* - On successful verify, the scanner upserts the card into its local
|
|
6403
|
-
* verified-contact cache (Tier A) so future pays are offline.
|
|
6404
|
-
*
|
|
6405
|
-
* This module is the canonical implementation. The backend and mobile MUST
|
|
6406
|
-
* use it for build, verify, and freshness checks — no parallel implementations.
|
|
6407
|
-
*
|
|
6408
|
-
* Industry-standard defaults (configurable per call):
|
|
6409
|
-
* - TTL: 90 days from issue.
|
|
6410
|
-
* - Refresh threshold: 30 days remaining triggers a 'refresh_recommended'
|
|
6411
|
-
* freshness state.
|
|
6412
|
-
*
|
|
6413
|
-
* Field policy (enforced by {@link PayCardArtifactSchema}):
|
|
6414
|
-
* - displayName \u2264 64 chars
|
|
6415
|
-
* - phoneE164 must match /^\+[1-9]\d{7,14}$/
|
|
6416
|
-
* - devicePubKeySpkiB64 must be standard base64 (no url-safe variants),
|
|
6417
|
-
* 64..256 chars (covers P-256 SPKI = 91 chars plus forward-compat).
|
|
6418
|
-
*/
|
|
6419
|
-
|
|
6420
|
-
/** Default Pay Card lifetime (ms): 90 days. */
|
|
6421
|
-
declare const PAY_CARD_DEFAULT_TTL_MS: number;
|
|
6422
|
-
/**
|
|
6423
|
-
* When the remaining lifetime drops below this threshold (ms),
|
|
6424
|
-
* {@link inspectPayCardFreshness} returns `'refresh_recommended'`.
|
|
6425
|
-
*
|
|
6426
|
-
* Holders should refresh in the background well before hard-expiry so
|
|
6427
|
-
* a stale-card scan never blocks a payment.
|
|
6428
|
-
*/
|
|
6429
|
-
declare const PAY_CARD_REFRESH_THRESHOLD_MS: number;
|
|
6430
|
-
/** URI prefix for Pay Card artifacts. */
|
|
6431
|
-
declare const PAY_CARD_URI_PREFIX: string;
|
|
6432
|
-
/**
|
|
6433
|
-
* Inputs for {@link createPayCardArtifactUri}. Mirrors the artifact codec
|
|
6434
|
-
* inputs but pins type to `pay_card`, validates the data shape, and applies
|
|
6435
|
-
* the default TTL when `expiresAtSeconds` is omitted.
|
|
6436
|
-
*/
|
|
6437
|
-
interface CreatePayCardArtifactInput {
|
|
6438
|
-
/** Holder Flur userId (also used as the envelope issuer). */
|
|
6439
|
-
issuer: string;
|
|
6440
|
-
/** Holder device key id. */
|
|
6441
|
-
keyId: string;
|
|
6442
|
-
/** Holder device private key (raw 32-byte P-256 scalar). */
|
|
6443
|
-
privateKey: Uint8Array;
|
|
6444
|
-
/** Pay Card business payload. */
|
|
6445
|
-
data: PayCardArtifact;
|
|
6446
|
-
/** URL-safe nonce, 8..64 chars. Required for envelope uniqueness. */
|
|
6447
|
-
nonce: string;
|
|
6448
|
-
/** Override the issued-at (seconds). Defaults to now. */
|
|
6449
|
-
issuedAtSeconds?: number;
|
|
6450
|
-
/**
|
|
6451
|
-
* Override the expiry (seconds). Defaults to `issuedAt + 90 days`.
|
|
6452
|
-
*
|
|
6453
|
-
* SECURITY: a Pay Card is a holder-signed identity attestation, so a
|
|
6454
|
-
* hard expiry is mandatory at the protocol level — there is no opt-out.
|
|
6455
|
-
* Callers may shorten the TTL but cannot remove it; backend verifiers
|
|
6456
|
-
* additionally reject envelopes without `exp` (`PAY_CARD_NO_EXPIRY`).
|
|
6457
|
-
*/
|
|
6458
|
-
expiresAtSeconds?: number;
|
|
6459
|
-
}
|
|
6460
|
-
/**
|
|
6461
|
-
* Build, sign, and encode a Pay Card as a `flur://v1/pay_card/...` URI.
|
|
6462
|
-
*
|
|
6463
|
-
* Defaults the envelope's `exp` to `iat + 90 days` so callers do not need
|
|
6464
|
-
* to compute lifetimes. Refuses to emit a card whose `userId` payload
|
|
6465
|
-
* field disagrees with the envelope `issuer` \u2014 the holder must sign their
|
|
6466
|
-
* own card.
|
|
6467
|
-
*/
|
|
6468
|
-
declare function createPayCardArtifactUri(input: CreatePayCardArtifactInput): {
|
|
6469
|
-
uri: string;
|
|
6470
|
-
signed: SignedArtifact<PayCardArtifact>;
|
|
6471
|
-
};
|
|
6472
|
-
/** True when the URI is shaped as a Pay Card artifact (prefix check only). */
|
|
6473
|
-
declare function isPayCardArtifactUri(uri: string): boolean;
|
|
6474
|
-
interface DecodedPayCard {
|
|
6475
|
-
/** Validated Pay Card body (data + envelope header). */
|
|
6476
|
-
body: ArtifactBody<PayCardArtifact>;
|
|
6477
|
-
/** ASN.1 DER ECDSA P-256 signature, base64 (standard). */
|
|
6478
|
-
sig: string;
|
|
6479
|
-
/** Raw decoded envelope \u2014 useful when re-emitting or relaying. */
|
|
6480
|
-
decoded: DecodedArtifactUri;
|
|
6481
|
-
}
|
|
6482
|
-
/**
|
|
6483
|
-
* Decode a Pay Card URI without verifying its signature. Validates the URI
|
|
6484
|
-
* shape, the envelope header, and the data schema. Use when the caller wants
|
|
6485
|
-
* to inspect the card before deciding whether/how to verify it.
|
|
6486
|
-
*/
|
|
6487
|
-
declare function decodePayCardArtifact(uri: string): DecodedPayCard;
|
|
6488
|
-
/**
|
|
6489
|
-
* Verify a Pay Card URI fully:
|
|
6490
|
-
* 1. URI + envelope + data schema (via {@link decodePayCardArtifact}).
|
|
6491
|
-
* 2. Envelope expiry (unless `options.enforceExpiry === false`).
|
|
6492
|
-
* 3. ECDSA P-256 signature against the supplied holder SPKI public key.
|
|
6493
|
-
*
|
|
6494
|
-
* The caller is responsible for resolving `(issuer, kid)` to the holder's
|
|
6495
|
-
* registered SPKI public key (typically via the backend device-key registry).
|
|
6496
|
-
*/
|
|
6497
|
-
declare function verifyPayCardArtifact(uri: string, publicKeySpkiB64: string, options?: VerifyArtifactOptions): DecodedPayCard;
|
|
6498
|
-
type PayCardFreshness = 'fresh' | 'refresh_recommended' | 'expired' | 'no_expiry';
|
|
6499
|
-
/**
|
|
6500
|
-
* Classify a Pay Card by remaining lifetime. Used by holders to decide when
|
|
6501
|
-
* to re-fetch a freshly-signed card from the backend, and by scanners to
|
|
6502
|
-
* decide whether to prompt the holder to refresh.
|
|
6503
|
-
*
|
|
6504
|
-
* - `'expired'` : envelope.exp \u2264 now
|
|
6505
|
-
* - `'refresh_recommended'` : 0 < remaining \u2264 PAY_CARD_REFRESH_THRESHOLD_MS
|
|
6506
|
-
* - `'fresh'` : remaining > PAY_CARD_REFRESH_THRESHOLD_MS
|
|
6507
|
-
* - `'no_expiry'` : envelope omits `exp` (non-production cards only)
|
|
6508
|
-
*/
|
|
6509
|
-
declare function inspectPayCardFreshness(decoded: DecodedPayCard, nowMs?: number): PayCardFreshness;
|
|
6510
|
-
/**
|
|
6511
|
-
* Compute the canonical body bytes a backend must sign when issuing a
|
|
6512
|
-
* Pay Card on behalf of the holder via a *server-side* signing path.
|
|
6513
|
-
*
|
|
6514
|
-
* This export exists so a backend (which holds neither the holder's private
|
|
6515
|
-
* key nor a parallel envelope implementation) can call into the SDK to
|
|
6516
|
-
* obtain the exact bytes to sign with a hardware-backed device key abstraction.
|
|
6517
|
-
* Mobile clients that sign locally should use {@link createPayCardArtifactUri}
|
|
6518
|
-
* instead.
|
|
6519
|
-
*
|
|
6520
|
-
* Returned bytes are the same input passed to ECDSA P-256(SHA-256). Callers
|
|
6521
|
-
* MUST keep this contract \u2014 changing the signing input is a protocol break.
|
|
6522
|
-
*/
|
|
6523
|
-
declare function buildPayCardSigningInput(input: {
|
|
6524
|
-
issuer: string;
|
|
6525
|
-
keyId: string;
|
|
6526
|
-
data: PayCardArtifact;
|
|
6527
|
-
nonce: string;
|
|
6528
|
-
issuedAtSeconds?: number;
|
|
6529
|
-
/** See {@link CreatePayCardArtifactInput.expiresAtSeconds}. */
|
|
6530
|
-
expiresAtSeconds?: number;
|
|
6531
|
-
}): {
|
|
6532
|
-
body: ArtifactBody<PayCardArtifact>;
|
|
6533
|
-
bodyBytes: Uint8Array;
|
|
6534
|
-
};
|
|
6535
|
-
|
|
6536
|
-
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_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, 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 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 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, 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, 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, decodeUnverifiedConsumerSettlementReceiptQR, derToRawP256Signature, encodeArtifactUri, encodeAuthorizationQR, encodeBase45, encodeConsumerSettlementReceiptQR, encodeNQR, encodeOfflineClaimSmsMessage, encodeOfflineSmsSettleToken, encodePaymentRequestQR, extractOfflineClaimSmsToken, extractOfflineSmsSettleToken, formatAmount, generateDynamicQR, generateStaticQR, init, inspectPayCardFreshness, 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, verifyOfflineSmsSettleToken, verifyPass, verifyPayCardArtifact, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
|
|
6674
|
+
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 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, 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, 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, isPassWithinValidity, 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, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
|