@nokinc-flur/sdk 1.0.6 → 1.1.1
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 +474 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1522 -1
- package/dist/index.d.ts +1522 -1
- package/dist/index.js +442 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -922,6 +922,8 @@ type AccountActivityItem = {
|
|
|
922
922
|
timestamp: string;
|
|
923
923
|
};
|
|
924
924
|
type AccountSummaryResponse = {
|
|
925
|
+
userId: string;
|
|
926
|
+
nuban: string | null;
|
|
925
927
|
balance: number;
|
|
926
928
|
currency: string;
|
|
927
929
|
dailySendLimit: number;
|
|
@@ -4923,4 +4925,1523 @@ type PartnerProfileAdminClient = {
|
|
|
4923
4925
|
};
|
|
4924
4926
|
declare function createPartnerProfileAdminClient(opts: PartnerProfileAdminClientOptions): PartnerProfileAdminClient;
|
|
4925
4927
|
|
|
4926
|
-
|
|
4928
|
+
/**
|
|
4929
|
+
* Flur v1 Signed Artifact envelope.
|
|
4930
|
+
*
|
|
4931
|
+
* URI form:
|
|
4932
|
+
* flur://v1/<artifact-type>/<base64url(canonical-json(body))>.<base64url(sig)>
|
|
4933
|
+
*
|
|
4934
|
+
* Body shape (canonical JSON, sorted keys):
|
|
4935
|
+
* {
|
|
4936
|
+
* v: 1, // envelope version
|
|
4937
|
+
* t: '<artifact-type>', // matches the URI segment (redundant for safety)
|
|
4938
|
+
* iss: '<issuer-id>', // user/merchant/partner id
|
|
4939
|
+
* kid: '<device-key-id>', // identifier of the signing device key
|
|
4940
|
+
* iat: <epoch-seconds>, // issued-at
|
|
4941
|
+
* exp?: <epoch-seconds>, // optional expiry
|
|
4942
|
+
* nonce: '<string>', // unique per artifact (replay guard)
|
|
4943
|
+
* data: <artifact body> // type-specific, validated by registered schema
|
|
4944
|
+
* }
|
|
4945
|
+
*
|
|
4946
|
+
* Signature: Ed25519 over canonicalJSONBytes(body), hex-encoded (64 bytes / 128 hex chars).
|
|
4947
|
+
*
|
|
4948
|
+
* Design notes:
|
|
4949
|
+
* - URI scheme `flur://v1/...` is the single transport for all signed artifacts.
|
|
4950
|
+
* - Scanners route on the path segment; verifiers look up the issuer/kid public key.
|
|
4951
|
+
* - Pure NIBSS NQR payments remain unchanged; this envelope rides separately.
|
|
4952
|
+
*/
|
|
4953
|
+
declare const FLUR_ARTIFACT_URI_SCHEME = "flur";
|
|
4954
|
+
declare const FLUR_ARTIFACT_VERSION = 1;
|
|
4955
|
+
declare const FLUR_ARTIFACT_URI_PREFIX = "flur://v1/";
|
|
4956
|
+
declare const ArtifactHeaderSchema: z.ZodObject<{
|
|
4957
|
+
v: z.ZodLiteral<1>;
|
|
4958
|
+
t: z.ZodString;
|
|
4959
|
+
iss: z.ZodString;
|
|
4960
|
+
kid: z.ZodString;
|
|
4961
|
+
iat: z.ZodNumber;
|
|
4962
|
+
exp: z.ZodOptional<z.ZodNumber>;
|
|
4963
|
+
nonce: z.ZodString;
|
|
4964
|
+
}, "strip", z.ZodTypeAny, {
|
|
4965
|
+
nonce: string;
|
|
4966
|
+
t: string;
|
|
4967
|
+
v: 1;
|
|
4968
|
+
iss: string;
|
|
4969
|
+
kid: string;
|
|
4970
|
+
iat: number;
|
|
4971
|
+
exp?: number | undefined;
|
|
4972
|
+
}, {
|
|
4973
|
+
nonce: string;
|
|
4974
|
+
t: string;
|
|
4975
|
+
v: 1;
|
|
4976
|
+
iss: string;
|
|
4977
|
+
kid: string;
|
|
4978
|
+
iat: number;
|
|
4979
|
+
exp?: number | undefined;
|
|
4980
|
+
}>;
|
|
4981
|
+
type ArtifactHeader = z.infer<typeof ArtifactHeaderSchema>;
|
|
4982
|
+
type ArtifactBody<T = unknown> = ArtifactHeader & {
|
|
4983
|
+
data: T;
|
|
4984
|
+
};
|
|
4985
|
+
type SignedArtifact<T = unknown> = {
|
|
4986
|
+
body: ArtifactBody<T>;
|
|
4987
|
+
sig: string;
|
|
4988
|
+
};
|
|
4989
|
+
declare class FlurArtifactError extends Error {
|
|
4990
|
+
code: 'INVALID_URI' | 'INVALID_TYPE' | 'INVALID_BODY' | 'INVALID_SIGNATURE' | 'EXPIRED' | 'TYPE_MISMATCH';
|
|
4991
|
+
constructor(message: string, code: 'INVALID_URI' | 'INVALID_TYPE' | 'INVALID_BODY' | 'INVALID_SIGNATURE' | 'EXPIRED' | 'TYPE_MISMATCH');
|
|
4992
|
+
}
|
|
4993
|
+
declare function base64UrlEncode(bytes: Uint8Array): string;
|
|
4994
|
+
declare function base64UrlDecode(s: string): Uint8Array;
|
|
4995
|
+
declare function buildArtifactBody<T>(input: {
|
|
4996
|
+
type: string;
|
|
4997
|
+
issuer: string;
|
|
4998
|
+
keyId: string;
|
|
4999
|
+
data: T;
|
|
5000
|
+
issuedAtSeconds?: number;
|
|
5001
|
+
expiresAtSeconds?: number;
|
|
5002
|
+
nonce: string;
|
|
5003
|
+
}): ArtifactBody<T>;
|
|
5004
|
+
declare function signArtifact<T>(body: ArtifactBody<T>, privateKey: Uint8Array): SignedArtifact<T>;
|
|
5005
|
+
declare function encodeArtifactUri<T>(signed: SignedArtifact<T>): string;
|
|
5006
|
+
type DecodedArtifactUri = {
|
|
5007
|
+
type: string;
|
|
5008
|
+
bodyBytes: Uint8Array;
|
|
5009
|
+
body: ArtifactBody;
|
|
5010
|
+
sig: string;
|
|
5011
|
+
};
|
|
5012
|
+
declare function decodeArtifactUri(uri: string): DecodedArtifactUri;
|
|
5013
|
+
type VerifyArtifactOptions = {
|
|
5014
|
+
/** Caller-supplied current time (seconds). Defaults to Date.now()/1000. */
|
|
5015
|
+
nowSeconds?: number;
|
|
5016
|
+
/** When true (default), reject artifacts whose `exp` is in the past. */
|
|
5017
|
+
enforceExpiry?: boolean;
|
|
5018
|
+
};
|
|
5019
|
+
declare function verifyArtifactSignature(decoded: DecodedArtifactUri, publicKey: Uint8Array, options?: VerifyArtifactOptions): boolean;
|
|
5020
|
+
|
|
5021
|
+
/**
|
|
5022
|
+
* Registry of all Flur v1 signed artifact types.
|
|
5023
|
+
*
|
|
5024
|
+
* Each artifact has:
|
|
5025
|
+
* - a string discriminator (used in the URI path segment & header `t`),
|
|
5026
|
+
* - a Zod schema validating the `data` payload only (envelope header is validated separately).
|
|
5027
|
+
*
|
|
5028
|
+
* Two artifacts are fully specified in this slice (OPA + Receipt) as the
|
|
5029
|
+
* canonical implementation pattern. The remaining nine carry stub schemas
|
|
5030
|
+
* (`z.unknown()`) so types compile and the registry is complete; bodies
|
|
5031
|
+
* will be locked in subsequent slices once their backend ledger shapes
|
|
5032
|
+
* are finalised.
|
|
5033
|
+
*/
|
|
5034
|
+
declare const ARTIFACT_TYPES: {
|
|
5035
|
+
readonly OFFLINE_PAYMENT_AUTHORIZATION: "offline_payment_authorization";
|
|
5036
|
+
readonly RECEIPT: "receipt";
|
|
5037
|
+
readonly NQR_PAYMENT_REQUEST: "nqr_payment_request";
|
|
5038
|
+
readonly PAYMENT_INTENT: "payment_intent";
|
|
5039
|
+
readonly OFFLINE_CLAIM: "offline_claim";
|
|
5040
|
+
readonly SETTLEMENT_RECORD: "settlement_record";
|
|
5041
|
+
readonly REVERSAL_RECORD: "reversal_record";
|
|
5042
|
+
readonly LEDGER_JOURNAL_ENTRY: "ledger_journal_entry";
|
|
5043
|
+
readonly STATEMENT: "statement";
|
|
5044
|
+
readonly PASS: "pass";
|
|
5045
|
+
readonly IDENTITY: "identity";
|
|
5046
|
+
};
|
|
5047
|
+
type ArtifactType = (typeof ARTIFACT_TYPES)[keyof typeof ARTIFACT_TYPES];
|
|
5048
|
+
declare const OfflinePaymentAuthorizationArtifactSchema: z.ZodObject<{
|
|
5049
|
+
authorization: z.ZodObject<{
|
|
5050
|
+
request: z.ZodObject<{
|
|
5051
|
+
reference: z.ZodString;
|
|
5052
|
+
amountKobo: z.ZodNumber;
|
|
5053
|
+
merchantOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5054
|
+
userId: z.ZodString;
|
|
5055
|
+
deviceId: z.ZodString;
|
|
5056
|
+
devicePublicKey: z.ZodString;
|
|
5057
|
+
perTxCapKobo: z.ZodNumber;
|
|
5058
|
+
cumulativeCapKobo: z.ZodNumber;
|
|
5059
|
+
validFromMs: z.ZodNumber;
|
|
5060
|
+
validUntilMs: z.ZodNumber;
|
|
5061
|
+
counterSeed: z.ZodNumber;
|
|
5062
|
+
nonce: z.ZodString;
|
|
5063
|
+
issuerSig: z.ZodString;
|
|
5064
|
+
}, "strip", z.ZodTypeAny, {
|
|
5065
|
+
userId: string;
|
|
5066
|
+
deviceId: string;
|
|
5067
|
+
nonce: string;
|
|
5068
|
+
devicePublicKey: string;
|
|
5069
|
+
perTxCapKobo: number;
|
|
5070
|
+
cumulativeCapKobo: number;
|
|
5071
|
+
validFromMs: number;
|
|
5072
|
+
validUntilMs: number;
|
|
5073
|
+
counterSeed: number;
|
|
5074
|
+
issuerSig: string;
|
|
5075
|
+
}, {
|
|
5076
|
+
userId: string;
|
|
5077
|
+
deviceId: string;
|
|
5078
|
+
nonce: string;
|
|
5079
|
+
devicePublicKey: string;
|
|
5080
|
+
perTxCapKobo: number;
|
|
5081
|
+
cumulativeCapKobo: number;
|
|
5082
|
+
validFromMs: number;
|
|
5083
|
+
validUntilMs: number;
|
|
5084
|
+
counterSeed: number;
|
|
5085
|
+
issuerSig: string;
|
|
5086
|
+
}>, {
|
|
5087
|
+
userId: string;
|
|
5088
|
+
deviceId: string;
|
|
5089
|
+
nonce: string;
|
|
5090
|
+
devicePublicKey: string;
|
|
5091
|
+
perTxCapKobo: number;
|
|
5092
|
+
cumulativeCapKobo: number;
|
|
5093
|
+
validFromMs: number;
|
|
5094
|
+
validUntilMs: number;
|
|
5095
|
+
counterSeed: number;
|
|
5096
|
+
issuerSig: string;
|
|
5097
|
+
}, {
|
|
5098
|
+
userId: string;
|
|
5099
|
+
deviceId: string;
|
|
5100
|
+
nonce: string;
|
|
5101
|
+
devicePublicKey: string;
|
|
5102
|
+
perTxCapKobo: number;
|
|
5103
|
+
cumulativeCapKobo: number;
|
|
5104
|
+
validFromMs: number;
|
|
5105
|
+
validUntilMs: number;
|
|
5106
|
+
counterSeed: number;
|
|
5107
|
+
issuerSig: string;
|
|
5108
|
+
}>, {
|
|
5109
|
+
userId: string;
|
|
5110
|
+
deviceId: string;
|
|
5111
|
+
nonce: string;
|
|
5112
|
+
devicePublicKey: string;
|
|
5113
|
+
perTxCapKobo: number;
|
|
5114
|
+
cumulativeCapKobo: number;
|
|
5115
|
+
validFromMs: number;
|
|
5116
|
+
validUntilMs: number;
|
|
5117
|
+
counterSeed: number;
|
|
5118
|
+
issuerSig: string;
|
|
5119
|
+
}, {
|
|
5120
|
+
userId: string;
|
|
5121
|
+
deviceId: string;
|
|
5122
|
+
nonce: string;
|
|
5123
|
+
devicePublicKey: string;
|
|
5124
|
+
perTxCapKobo: number;
|
|
5125
|
+
cumulativeCapKobo: number;
|
|
5126
|
+
validFromMs: number;
|
|
5127
|
+
validUntilMs: number;
|
|
5128
|
+
counterSeed: number;
|
|
5129
|
+
issuerSig: string;
|
|
5130
|
+
}>;
|
|
5131
|
+
expiresAtMs: z.ZodNumber;
|
|
5132
|
+
merchantSig: z.ZodString;
|
|
5133
|
+
}, "strip", z.ZodTypeAny, {
|
|
5134
|
+
reference: string;
|
|
5135
|
+
amountKobo: number;
|
|
5136
|
+
expiresAtMs: number;
|
|
5137
|
+
merchantOAC: {
|
|
5138
|
+
userId: string;
|
|
5139
|
+
deviceId: string;
|
|
5140
|
+
nonce: string;
|
|
5141
|
+
devicePublicKey: string;
|
|
5142
|
+
perTxCapKobo: number;
|
|
5143
|
+
cumulativeCapKobo: number;
|
|
5144
|
+
validFromMs: number;
|
|
5145
|
+
validUntilMs: number;
|
|
5146
|
+
counterSeed: number;
|
|
5147
|
+
issuerSig: string;
|
|
5148
|
+
};
|
|
5149
|
+
merchantSig: string;
|
|
5150
|
+
}, {
|
|
5151
|
+
reference: string;
|
|
5152
|
+
amountKobo: number;
|
|
5153
|
+
expiresAtMs: number;
|
|
5154
|
+
merchantOAC: {
|
|
5155
|
+
userId: string;
|
|
5156
|
+
deviceId: string;
|
|
5157
|
+
nonce: string;
|
|
5158
|
+
devicePublicKey: string;
|
|
5159
|
+
perTxCapKobo: number;
|
|
5160
|
+
cumulativeCapKobo: number;
|
|
5161
|
+
validFromMs: number;
|
|
5162
|
+
validUntilMs: number;
|
|
5163
|
+
counterSeed: number;
|
|
5164
|
+
issuerSig: string;
|
|
5165
|
+
};
|
|
5166
|
+
merchantSig: string;
|
|
5167
|
+
}>;
|
|
5168
|
+
payerOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5169
|
+
userId: z.ZodString;
|
|
5170
|
+
deviceId: z.ZodString;
|
|
5171
|
+
devicePublicKey: z.ZodString;
|
|
5172
|
+
perTxCapKobo: z.ZodNumber;
|
|
5173
|
+
cumulativeCapKobo: z.ZodNumber;
|
|
5174
|
+
validFromMs: z.ZodNumber;
|
|
5175
|
+
validUntilMs: z.ZodNumber;
|
|
5176
|
+
counterSeed: z.ZodNumber;
|
|
5177
|
+
nonce: z.ZodString;
|
|
5178
|
+
issuerSig: z.ZodString;
|
|
5179
|
+
}, "strip", z.ZodTypeAny, {
|
|
5180
|
+
userId: string;
|
|
5181
|
+
deviceId: string;
|
|
5182
|
+
nonce: string;
|
|
5183
|
+
devicePublicKey: string;
|
|
5184
|
+
perTxCapKobo: number;
|
|
5185
|
+
cumulativeCapKobo: number;
|
|
5186
|
+
validFromMs: number;
|
|
5187
|
+
validUntilMs: number;
|
|
5188
|
+
counterSeed: number;
|
|
5189
|
+
issuerSig: string;
|
|
5190
|
+
}, {
|
|
5191
|
+
userId: string;
|
|
5192
|
+
deviceId: string;
|
|
5193
|
+
nonce: string;
|
|
5194
|
+
devicePublicKey: string;
|
|
5195
|
+
perTxCapKobo: number;
|
|
5196
|
+
cumulativeCapKobo: number;
|
|
5197
|
+
validFromMs: number;
|
|
5198
|
+
validUntilMs: number;
|
|
5199
|
+
counterSeed: number;
|
|
5200
|
+
issuerSig: string;
|
|
5201
|
+
}>, {
|
|
5202
|
+
userId: string;
|
|
5203
|
+
deviceId: string;
|
|
5204
|
+
nonce: string;
|
|
5205
|
+
devicePublicKey: string;
|
|
5206
|
+
perTxCapKobo: number;
|
|
5207
|
+
cumulativeCapKobo: number;
|
|
5208
|
+
validFromMs: number;
|
|
5209
|
+
validUntilMs: number;
|
|
5210
|
+
counterSeed: number;
|
|
5211
|
+
issuerSig: string;
|
|
5212
|
+
}, {
|
|
5213
|
+
userId: string;
|
|
5214
|
+
deviceId: string;
|
|
5215
|
+
nonce: string;
|
|
5216
|
+
devicePublicKey: string;
|
|
5217
|
+
perTxCapKobo: number;
|
|
5218
|
+
cumulativeCapKobo: number;
|
|
5219
|
+
validFromMs: number;
|
|
5220
|
+
validUntilMs: number;
|
|
5221
|
+
counterSeed: number;
|
|
5222
|
+
issuerSig: string;
|
|
5223
|
+
}>, {
|
|
5224
|
+
userId: string;
|
|
5225
|
+
deviceId: string;
|
|
5226
|
+
nonce: string;
|
|
5227
|
+
devicePublicKey: string;
|
|
5228
|
+
perTxCapKobo: number;
|
|
5229
|
+
cumulativeCapKobo: number;
|
|
5230
|
+
validFromMs: number;
|
|
5231
|
+
validUntilMs: number;
|
|
5232
|
+
counterSeed: number;
|
|
5233
|
+
issuerSig: string;
|
|
5234
|
+
}, {
|
|
5235
|
+
userId: string;
|
|
5236
|
+
deviceId: string;
|
|
5237
|
+
nonce: string;
|
|
5238
|
+
devicePublicKey: string;
|
|
5239
|
+
perTxCapKobo: number;
|
|
5240
|
+
cumulativeCapKobo: number;
|
|
5241
|
+
validFromMs: number;
|
|
5242
|
+
validUntilMs: number;
|
|
5243
|
+
counterSeed: number;
|
|
5244
|
+
issuerSig: string;
|
|
5245
|
+
}>;
|
|
5246
|
+
payerCounter: z.ZodNumber;
|
|
5247
|
+
payerSig: z.ZodString;
|
|
5248
|
+
}, "strip", z.ZodTypeAny, {
|
|
5249
|
+
request: {
|
|
5250
|
+
reference: string;
|
|
5251
|
+
amountKobo: number;
|
|
5252
|
+
expiresAtMs: number;
|
|
5253
|
+
merchantOAC: {
|
|
5254
|
+
userId: string;
|
|
5255
|
+
deviceId: string;
|
|
5256
|
+
nonce: string;
|
|
5257
|
+
devicePublicKey: string;
|
|
5258
|
+
perTxCapKobo: number;
|
|
5259
|
+
cumulativeCapKobo: number;
|
|
5260
|
+
validFromMs: number;
|
|
5261
|
+
validUntilMs: number;
|
|
5262
|
+
counterSeed: number;
|
|
5263
|
+
issuerSig: string;
|
|
5264
|
+
};
|
|
5265
|
+
merchantSig: string;
|
|
5266
|
+
};
|
|
5267
|
+
payerOAC: {
|
|
5268
|
+
userId: string;
|
|
5269
|
+
deviceId: string;
|
|
5270
|
+
nonce: string;
|
|
5271
|
+
devicePublicKey: string;
|
|
5272
|
+
perTxCapKobo: number;
|
|
5273
|
+
cumulativeCapKobo: number;
|
|
5274
|
+
validFromMs: number;
|
|
5275
|
+
validUntilMs: number;
|
|
5276
|
+
counterSeed: number;
|
|
5277
|
+
issuerSig: string;
|
|
5278
|
+
};
|
|
5279
|
+
payerCounter: number;
|
|
5280
|
+
payerSig: string;
|
|
5281
|
+
}, {
|
|
5282
|
+
request: {
|
|
5283
|
+
reference: string;
|
|
5284
|
+
amountKobo: number;
|
|
5285
|
+
expiresAtMs: number;
|
|
5286
|
+
merchantOAC: {
|
|
5287
|
+
userId: string;
|
|
5288
|
+
deviceId: string;
|
|
5289
|
+
nonce: string;
|
|
5290
|
+
devicePublicKey: string;
|
|
5291
|
+
perTxCapKobo: number;
|
|
5292
|
+
cumulativeCapKobo: number;
|
|
5293
|
+
validFromMs: number;
|
|
5294
|
+
validUntilMs: number;
|
|
5295
|
+
counterSeed: number;
|
|
5296
|
+
issuerSig: string;
|
|
5297
|
+
};
|
|
5298
|
+
merchantSig: string;
|
|
5299
|
+
};
|
|
5300
|
+
payerOAC: {
|
|
5301
|
+
userId: string;
|
|
5302
|
+
deviceId: string;
|
|
5303
|
+
nonce: string;
|
|
5304
|
+
devicePublicKey: string;
|
|
5305
|
+
perTxCapKobo: number;
|
|
5306
|
+
cumulativeCapKobo: number;
|
|
5307
|
+
validFromMs: number;
|
|
5308
|
+
validUntilMs: number;
|
|
5309
|
+
counterSeed: number;
|
|
5310
|
+
issuerSig: string;
|
|
5311
|
+
};
|
|
5312
|
+
payerCounter: number;
|
|
5313
|
+
payerSig: string;
|
|
5314
|
+
}>;
|
|
5315
|
+
}, "strip", z.ZodTypeAny, {
|
|
5316
|
+
authorization: {
|
|
5317
|
+
request: {
|
|
5318
|
+
reference: string;
|
|
5319
|
+
amountKobo: number;
|
|
5320
|
+
expiresAtMs: number;
|
|
5321
|
+
merchantOAC: {
|
|
5322
|
+
userId: string;
|
|
5323
|
+
deviceId: string;
|
|
5324
|
+
nonce: string;
|
|
5325
|
+
devicePublicKey: string;
|
|
5326
|
+
perTxCapKobo: number;
|
|
5327
|
+
cumulativeCapKobo: number;
|
|
5328
|
+
validFromMs: number;
|
|
5329
|
+
validUntilMs: number;
|
|
5330
|
+
counterSeed: number;
|
|
5331
|
+
issuerSig: string;
|
|
5332
|
+
};
|
|
5333
|
+
merchantSig: string;
|
|
5334
|
+
};
|
|
5335
|
+
payerOAC: {
|
|
5336
|
+
userId: string;
|
|
5337
|
+
deviceId: string;
|
|
5338
|
+
nonce: string;
|
|
5339
|
+
devicePublicKey: string;
|
|
5340
|
+
perTxCapKobo: number;
|
|
5341
|
+
cumulativeCapKobo: number;
|
|
5342
|
+
validFromMs: number;
|
|
5343
|
+
validUntilMs: number;
|
|
5344
|
+
counterSeed: number;
|
|
5345
|
+
issuerSig: string;
|
|
5346
|
+
};
|
|
5347
|
+
payerCounter: number;
|
|
5348
|
+
payerSig: string;
|
|
5349
|
+
};
|
|
5350
|
+
}, {
|
|
5351
|
+
authorization: {
|
|
5352
|
+
request: {
|
|
5353
|
+
reference: string;
|
|
5354
|
+
amountKobo: number;
|
|
5355
|
+
expiresAtMs: number;
|
|
5356
|
+
merchantOAC: {
|
|
5357
|
+
userId: string;
|
|
5358
|
+
deviceId: string;
|
|
5359
|
+
nonce: string;
|
|
5360
|
+
devicePublicKey: string;
|
|
5361
|
+
perTxCapKobo: number;
|
|
5362
|
+
cumulativeCapKobo: number;
|
|
5363
|
+
validFromMs: number;
|
|
5364
|
+
validUntilMs: number;
|
|
5365
|
+
counterSeed: number;
|
|
5366
|
+
issuerSig: string;
|
|
5367
|
+
};
|
|
5368
|
+
merchantSig: string;
|
|
5369
|
+
};
|
|
5370
|
+
payerOAC: {
|
|
5371
|
+
userId: string;
|
|
5372
|
+
deviceId: string;
|
|
5373
|
+
nonce: string;
|
|
5374
|
+
devicePublicKey: string;
|
|
5375
|
+
perTxCapKobo: number;
|
|
5376
|
+
cumulativeCapKobo: number;
|
|
5377
|
+
validFromMs: number;
|
|
5378
|
+
validUntilMs: number;
|
|
5379
|
+
counterSeed: number;
|
|
5380
|
+
issuerSig: string;
|
|
5381
|
+
};
|
|
5382
|
+
payerCounter: number;
|
|
5383
|
+
payerSig: string;
|
|
5384
|
+
};
|
|
5385
|
+
}>;
|
|
5386
|
+
type OfflinePaymentAuthorizationArtifact = z.infer<typeof OfflinePaymentAuthorizationArtifactSchema>;
|
|
5387
|
+
declare const ReceiptArtifactSchema: z.ZodObject<{
|
|
5388
|
+
receiptId: z.ZodString;
|
|
5389
|
+
paymentReference: z.ZodString;
|
|
5390
|
+
payerUserId: z.ZodOptional<z.ZodString>;
|
|
5391
|
+
payeeUserId: z.ZodString;
|
|
5392
|
+
amountKobo: z.ZodNumber;
|
|
5393
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5394
|
+
channel: z.ZodEnum<["online", "offline_reconciled", "pay_link", "nqr"]>;
|
|
5395
|
+
settledAtMs: z.ZodNumber;
|
|
5396
|
+
ledgerTxnId: z.ZodOptional<z.ZodString>;
|
|
5397
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
5398
|
+
hashChainPrev: z.ZodOptional<z.ZodString>;
|
|
5399
|
+
}, "strip", z.ZodTypeAny, {
|
|
5400
|
+
currency: "NGN";
|
|
5401
|
+
amountKobo: number;
|
|
5402
|
+
payeeUserId: string;
|
|
5403
|
+
receiptId: string;
|
|
5404
|
+
channel: "online" | "offline_reconciled" | "pay_link" | "nqr";
|
|
5405
|
+
paymentReference: string;
|
|
5406
|
+
settledAtMs: number;
|
|
5407
|
+
payerUserId?: string | undefined;
|
|
5408
|
+
ledgerTxnId?: string | undefined;
|
|
5409
|
+
memo?: string | undefined;
|
|
5410
|
+
hashChainPrev?: string | undefined;
|
|
5411
|
+
}, {
|
|
5412
|
+
currency: "NGN";
|
|
5413
|
+
amountKobo: number;
|
|
5414
|
+
payeeUserId: string;
|
|
5415
|
+
receiptId: string;
|
|
5416
|
+
channel: "online" | "offline_reconciled" | "pay_link" | "nqr";
|
|
5417
|
+
paymentReference: string;
|
|
5418
|
+
settledAtMs: number;
|
|
5419
|
+
payerUserId?: string | undefined;
|
|
5420
|
+
ledgerTxnId?: string | undefined;
|
|
5421
|
+
memo?: string | undefined;
|
|
5422
|
+
hashChainPrev?: string | undefined;
|
|
5423
|
+
}>;
|
|
5424
|
+
type ReceiptArtifact = z.infer<typeof ReceiptArtifactSchema>;
|
|
5425
|
+
declare const NqrPaymentRequestArtifactSchema: z.ZodObject<{
|
|
5426
|
+
requestId: z.ZodString;
|
|
5427
|
+
payeeUserId: z.ZodString;
|
|
5428
|
+
amountKobo: z.ZodOptional<z.ZodNumber>;
|
|
5429
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5430
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
5431
|
+
expiresAtMs: z.ZodOptional<z.ZodNumber>;
|
|
5432
|
+
}, "strip", z.ZodTypeAny, {
|
|
5433
|
+
requestId: string;
|
|
5434
|
+
currency: "NGN";
|
|
5435
|
+
payeeUserId: string;
|
|
5436
|
+
amountKobo?: number | undefined;
|
|
5437
|
+
expiresAtMs?: number | undefined;
|
|
5438
|
+
memo?: string | undefined;
|
|
5439
|
+
}, {
|
|
5440
|
+
requestId: string;
|
|
5441
|
+
currency: "NGN";
|
|
5442
|
+
payeeUserId: string;
|
|
5443
|
+
amountKobo?: number | undefined;
|
|
5444
|
+
expiresAtMs?: number | undefined;
|
|
5445
|
+
memo?: string | undefined;
|
|
5446
|
+
}>;
|
|
5447
|
+
declare const PaymentIntentArtifactSchema: z.ZodObject<{
|
|
5448
|
+
intentId: z.ZodString;
|
|
5449
|
+
payerUserId: z.ZodString;
|
|
5450
|
+
payeeUserId: z.ZodString;
|
|
5451
|
+
amountKobo: z.ZodNumber;
|
|
5452
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5453
|
+
idempotencyKey: z.ZodString;
|
|
5454
|
+
createdAtMs: z.ZodNumber;
|
|
5455
|
+
}, "strip", z.ZodTypeAny, {
|
|
5456
|
+
currency: "NGN";
|
|
5457
|
+
createdAtMs: number;
|
|
5458
|
+
intentId: string;
|
|
5459
|
+
amountKobo: number;
|
|
5460
|
+
idempotencyKey: string;
|
|
5461
|
+
payerUserId: string;
|
|
5462
|
+
payeeUserId: string;
|
|
5463
|
+
}, {
|
|
5464
|
+
currency: "NGN";
|
|
5465
|
+
createdAtMs: number;
|
|
5466
|
+
intentId: string;
|
|
5467
|
+
amountKobo: number;
|
|
5468
|
+
idempotencyKey: string;
|
|
5469
|
+
payerUserId: string;
|
|
5470
|
+
payeeUserId: string;
|
|
5471
|
+
}>;
|
|
5472
|
+
declare const OfflineClaimArtifactSchema: z.ZodObject<{
|
|
5473
|
+
claimId: z.ZodString;
|
|
5474
|
+
authorizationId: z.ZodString;
|
|
5475
|
+
payeeUserId: z.ZodString;
|
|
5476
|
+
claimedAmountKobo: z.ZodNumber;
|
|
5477
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5478
|
+
claimedAtMs: z.ZodNumber;
|
|
5479
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
5480
|
+
}, "strip", z.ZodTypeAny, {
|
|
5481
|
+
currency: "NGN";
|
|
5482
|
+
payeeUserId: string;
|
|
5483
|
+
claimId: string;
|
|
5484
|
+
authorizationId: string;
|
|
5485
|
+
claimedAmountKobo: number;
|
|
5486
|
+
claimedAtMs: number;
|
|
5487
|
+
paymentReference?: string | undefined;
|
|
5488
|
+
}, {
|
|
5489
|
+
currency: "NGN";
|
|
5490
|
+
payeeUserId: string;
|
|
5491
|
+
claimId: string;
|
|
5492
|
+
authorizationId: string;
|
|
5493
|
+
claimedAmountKobo: number;
|
|
5494
|
+
claimedAtMs: number;
|
|
5495
|
+
paymentReference?: string | undefined;
|
|
5496
|
+
}>;
|
|
5497
|
+
declare const SettlementRecordArtifactSchema: z.ZodObject<{
|
|
5498
|
+
settlementId: z.ZodString;
|
|
5499
|
+
ledgerTxnId: z.ZodString;
|
|
5500
|
+
sourceRefType: z.ZodEnum<["offline_authorization", "offline_claim", "transfer", "pay_link"]>;
|
|
5501
|
+
sourceRefId: z.ZodString;
|
|
5502
|
+
amountKobo: z.ZodNumber;
|
|
5503
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5504
|
+
settledAtMs: z.ZodNumber;
|
|
5505
|
+
}, "strip", z.ZodTypeAny, {
|
|
5506
|
+
currency: "NGN";
|
|
5507
|
+
amountKobo: number;
|
|
5508
|
+
settlementId: string;
|
|
5509
|
+
settledAtMs: number;
|
|
5510
|
+
ledgerTxnId: string;
|
|
5511
|
+
sourceRefType: "offline_claim" | "pay_link" | "offline_authorization" | "transfer";
|
|
5512
|
+
sourceRefId: string;
|
|
5513
|
+
}, {
|
|
5514
|
+
currency: "NGN";
|
|
5515
|
+
amountKobo: number;
|
|
5516
|
+
settlementId: string;
|
|
5517
|
+
settledAtMs: number;
|
|
5518
|
+
ledgerTxnId: string;
|
|
5519
|
+
sourceRefType: "offline_claim" | "pay_link" | "offline_authorization" | "transfer";
|
|
5520
|
+
sourceRefId: string;
|
|
5521
|
+
}>;
|
|
5522
|
+
declare const ReversalRecordArtifactSchema: z.ZodObject<{
|
|
5523
|
+
reversalId: z.ZodString;
|
|
5524
|
+
originalTxnId: z.ZodString;
|
|
5525
|
+
amountKobo: z.ZodNumber;
|
|
5526
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5527
|
+
reason: z.ZodEnum<["user_dispute", "fraud", "duplicate", "admin_correction", "other"]>;
|
|
5528
|
+
reversedAtMs: z.ZodNumber;
|
|
5529
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
5530
|
+
}, "strip", z.ZodTypeAny, {
|
|
5531
|
+
currency: "NGN";
|
|
5532
|
+
amountKobo: number;
|
|
5533
|
+
reversalId: string;
|
|
5534
|
+
originalTxnId: string;
|
|
5535
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5536
|
+
reversedAtMs: number;
|
|
5537
|
+
memo?: string | undefined;
|
|
5538
|
+
}, {
|
|
5539
|
+
currency: "NGN";
|
|
5540
|
+
amountKobo: number;
|
|
5541
|
+
reversalId: string;
|
|
5542
|
+
originalTxnId: string;
|
|
5543
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
5544
|
+
reversedAtMs: number;
|
|
5545
|
+
memo?: string | undefined;
|
|
5546
|
+
}>;
|
|
5547
|
+
declare const LedgerJournalEntryArtifactSchema: z.ZodObject<{
|
|
5548
|
+
entryId: z.ZodString;
|
|
5549
|
+
journalId: z.ZodString;
|
|
5550
|
+
debitAccountId: z.ZodString;
|
|
5551
|
+
creditAccountId: z.ZodString;
|
|
5552
|
+
amountKobo: z.ZodNumber;
|
|
5553
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5554
|
+
postedAtMs: z.ZodNumber;
|
|
5555
|
+
refType: z.ZodOptional<z.ZodString>;
|
|
5556
|
+
refId: z.ZodOptional<z.ZodString>;
|
|
5557
|
+
}, "strip", z.ZodTypeAny, {
|
|
5558
|
+
currency: "NGN";
|
|
5559
|
+
amountKobo: number;
|
|
5560
|
+
entryId: string;
|
|
5561
|
+
journalId: string;
|
|
5562
|
+
debitAccountId: string;
|
|
5563
|
+
creditAccountId: string;
|
|
5564
|
+
postedAtMs: number;
|
|
5565
|
+
refType?: string | undefined;
|
|
5566
|
+
refId?: string | undefined;
|
|
5567
|
+
}, {
|
|
5568
|
+
currency: "NGN";
|
|
5569
|
+
amountKobo: number;
|
|
5570
|
+
entryId: string;
|
|
5571
|
+
journalId: string;
|
|
5572
|
+
debitAccountId: string;
|
|
5573
|
+
creditAccountId: string;
|
|
5574
|
+
postedAtMs: number;
|
|
5575
|
+
refType?: string | undefined;
|
|
5576
|
+
refId?: string | undefined;
|
|
5577
|
+
}>;
|
|
5578
|
+
declare const StatementArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
5579
|
+
statementId: z.ZodString;
|
|
5580
|
+
userId: z.ZodString;
|
|
5581
|
+
periodStartMs: z.ZodNumber;
|
|
5582
|
+
periodEndMs: z.ZodNumber;
|
|
5583
|
+
openingBalanceKobo: z.ZodNumber;
|
|
5584
|
+
closingBalanceKobo: z.ZodNumber;
|
|
5585
|
+
transactionCount: z.ZodNumber;
|
|
5586
|
+
currency: z.ZodLiteral<"NGN">;
|
|
5587
|
+
hashChainPrev: z.ZodOptional<z.ZodString>;
|
|
5588
|
+
}, "strip", z.ZodTypeAny, {
|
|
5589
|
+
userId: string;
|
|
5590
|
+
currency: "NGN";
|
|
5591
|
+
statementId: string;
|
|
5592
|
+
periodStartMs: number;
|
|
5593
|
+
periodEndMs: number;
|
|
5594
|
+
openingBalanceKobo: number;
|
|
5595
|
+
closingBalanceKobo: number;
|
|
5596
|
+
transactionCount: number;
|
|
5597
|
+
hashChainPrev?: string | undefined;
|
|
5598
|
+
}, {
|
|
5599
|
+
userId: string;
|
|
5600
|
+
currency: "NGN";
|
|
5601
|
+
statementId: string;
|
|
5602
|
+
periodStartMs: number;
|
|
5603
|
+
periodEndMs: number;
|
|
5604
|
+
openingBalanceKobo: number;
|
|
5605
|
+
closingBalanceKobo: number;
|
|
5606
|
+
transactionCount: number;
|
|
5607
|
+
hashChainPrev?: string | undefined;
|
|
5608
|
+
}>, {
|
|
5609
|
+
userId: string;
|
|
5610
|
+
currency: "NGN";
|
|
5611
|
+
statementId: string;
|
|
5612
|
+
periodStartMs: number;
|
|
5613
|
+
periodEndMs: number;
|
|
5614
|
+
openingBalanceKobo: number;
|
|
5615
|
+
closingBalanceKobo: number;
|
|
5616
|
+
transactionCount: number;
|
|
5617
|
+
hashChainPrev?: string | undefined;
|
|
5618
|
+
}, {
|
|
5619
|
+
userId: string;
|
|
5620
|
+
currency: "NGN";
|
|
5621
|
+
statementId: string;
|
|
5622
|
+
periodStartMs: number;
|
|
5623
|
+
periodEndMs: number;
|
|
5624
|
+
openingBalanceKobo: number;
|
|
5625
|
+
closingBalanceKobo: number;
|
|
5626
|
+
transactionCount: number;
|
|
5627
|
+
hashChainPrev?: string | undefined;
|
|
5628
|
+
}>;
|
|
5629
|
+
declare const PassArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
5630
|
+
passId: z.ZodString;
|
|
5631
|
+
holderId: z.ZodString;
|
|
5632
|
+
category: z.ZodEnum<["membership", "ticket", "loyalty", "access", "voucher"]>;
|
|
5633
|
+
title: z.ZodString;
|
|
5634
|
+
validFromMs: z.ZodNumber;
|
|
5635
|
+
validUntilMs: z.ZodOptional<z.ZodNumber>;
|
|
5636
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
5637
|
+
}, "strip", z.ZodTypeAny, {
|
|
5638
|
+
validFromMs: number;
|
|
5639
|
+
passId: string;
|
|
5640
|
+
holderId: string;
|
|
5641
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
5642
|
+
title: string;
|
|
5643
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
5644
|
+
validUntilMs?: number | undefined;
|
|
5645
|
+
}, {
|
|
5646
|
+
validFromMs: number;
|
|
5647
|
+
passId: string;
|
|
5648
|
+
holderId: string;
|
|
5649
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
5650
|
+
title: string;
|
|
5651
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
5652
|
+
validUntilMs?: number | undefined;
|
|
5653
|
+
}>, {
|
|
5654
|
+
validFromMs: number;
|
|
5655
|
+
passId: string;
|
|
5656
|
+
holderId: string;
|
|
5657
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
5658
|
+
title: string;
|
|
5659
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
5660
|
+
validUntilMs?: number | undefined;
|
|
5661
|
+
}, {
|
|
5662
|
+
validFromMs: number;
|
|
5663
|
+
passId: string;
|
|
5664
|
+
holderId: string;
|
|
5665
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
5666
|
+
title: string;
|
|
5667
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
5668
|
+
validUntilMs?: number | undefined;
|
|
5669
|
+
}>;
|
|
5670
|
+
declare const IdentityArtifactSchema: z.ZodObject<{
|
|
5671
|
+
attestationId: z.ZodString;
|
|
5672
|
+
subjectId: z.ZodString;
|
|
5673
|
+
claimType: z.ZodEnum<["phone_verified", "email_verified", "bvn_verified", "kyc_tier", "age_band"]>;
|
|
5674
|
+
claimValueHash: z.ZodString;
|
|
5675
|
+
attestedAtMs: z.ZodNumber;
|
|
5676
|
+
}, "strip", z.ZodTypeAny, {
|
|
5677
|
+
attestationId: string;
|
|
5678
|
+
subjectId: string;
|
|
5679
|
+
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
5680
|
+
claimValueHash: string;
|
|
5681
|
+
attestedAtMs: number;
|
|
5682
|
+
}, {
|
|
5683
|
+
attestationId: string;
|
|
5684
|
+
subjectId: string;
|
|
5685
|
+
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
5686
|
+
claimValueHash: string;
|
|
5687
|
+
attestedAtMs: number;
|
|
5688
|
+
}>;
|
|
5689
|
+
declare const ARTIFACT_BODY_SCHEMAS: {
|
|
5690
|
+
readonly offline_payment_authorization: z.ZodObject<{
|
|
5691
|
+
authorization: z.ZodObject<{
|
|
5692
|
+
request: z.ZodObject<{
|
|
5693
|
+
reference: z.ZodString;
|
|
5694
|
+
amountKobo: z.ZodNumber;
|
|
5695
|
+
merchantOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5696
|
+
userId: z.ZodString;
|
|
5697
|
+
deviceId: z.ZodString;
|
|
5698
|
+
devicePublicKey: z.ZodString;
|
|
5699
|
+
perTxCapKobo: z.ZodNumber;
|
|
5700
|
+
cumulativeCapKobo: z.ZodNumber;
|
|
5701
|
+
validFromMs: z.ZodNumber;
|
|
5702
|
+
validUntilMs: z.ZodNumber;
|
|
5703
|
+
counterSeed: z.ZodNumber;
|
|
5704
|
+
nonce: z.ZodString;
|
|
5705
|
+
issuerSig: z.ZodString;
|
|
5706
|
+
}, "strip", z.ZodTypeAny, {
|
|
5707
|
+
userId: string;
|
|
5708
|
+
deviceId: string;
|
|
5709
|
+
nonce: string;
|
|
5710
|
+
devicePublicKey: string;
|
|
5711
|
+
perTxCapKobo: number;
|
|
5712
|
+
cumulativeCapKobo: number;
|
|
5713
|
+
validFromMs: number;
|
|
5714
|
+
validUntilMs: number;
|
|
5715
|
+
counterSeed: number;
|
|
5716
|
+
issuerSig: string;
|
|
5717
|
+
}, {
|
|
5718
|
+
userId: string;
|
|
5719
|
+
deviceId: string;
|
|
5720
|
+
nonce: string;
|
|
5721
|
+
devicePublicKey: string;
|
|
5722
|
+
perTxCapKobo: number;
|
|
5723
|
+
cumulativeCapKobo: number;
|
|
5724
|
+
validFromMs: number;
|
|
5725
|
+
validUntilMs: number;
|
|
5726
|
+
counterSeed: number;
|
|
5727
|
+
issuerSig: string;
|
|
5728
|
+
}>, {
|
|
5729
|
+
userId: string;
|
|
5730
|
+
deviceId: string;
|
|
5731
|
+
nonce: string;
|
|
5732
|
+
devicePublicKey: string;
|
|
5733
|
+
perTxCapKobo: number;
|
|
5734
|
+
cumulativeCapKobo: number;
|
|
5735
|
+
validFromMs: number;
|
|
5736
|
+
validUntilMs: number;
|
|
5737
|
+
counterSeed: number;
|
|
5738
|
+
issuerSig: string;
|
|
5739
|
+
}, {
|
|
5740
|
+
userId: string;
|
|
5741
|
+
deviceId: string;
|
|
5742
|
+
nonce: string;
|
|
5743
|
+
devicePublicKey: string;
|
|
5744
|
+
perTxCapKobo: number;
|
|
5745
|
+
cumulativeCapKobo: number;
|
|
5746
|
+
validFromMs: number;
|
|
5747
|
+
validUntilMs: number;
|
|
5748
|
+
counterSeed: number;
|
|
5749
|
+
issuerSig: string;
|
|
5750
|
+
}>, {
|
|
5751
|
+
userId: string;
|
|
5752
|
+
deviceId: string;
|
|
5753
|
+
nonce: string;
|
|
5754
|
+
devicePublicKey: string;
|
|
5755
|
+
perTxCapKobo: number;
|
|
5756
|
+
cumulativeCapKobo: number;
|
|
5757
|
+
validFromMs: number;
|
|
5758
|
+
validUntilMs: number;
|
|
5759
|
+
counterSeed: number;
|
|
5760
|
+
issuerSig: string;
|
|
5761
|
+
}, {
|
|
5762
|
+
userId: string;
|
|
5763
|
+
deviceId: string;
|
|
5764
|
+
nonce: string;
|
|
5765
|
+
devicePublicKey: string;
|
|
5766
|
+
perTxCapKobo: number;
|
|
5767
|
+
cumulativeCapKobo: number;
|
|
5768
|
+
validFromMs: number;
|
|
5769
|
+
validUntilMs: number;
|
|
5770
|
+
counterSeed: number;
|
|
5771
|
+
issuerSig: string;
|
|
5772
|
+
}>;
|
|
5773
|
+
expiresAtMs: z.ZodNumber;
|
|
5774
|
+
merchantSig: z.ZodString;
|
|
5775
|
+
}, "strip", z.ZodTypeAny, {
|
|
5776
|
+
reference: string;
|
|
5777
|
+
amountKobo: number;
|
|
5778
|
+
expiresAtMs: number;
|
|
5779
|
+
merchantOAC: {
|
|
5780
|
+
userId: string;
|
|
5781
|
+
deviceId: string;
|
|
5782
|
+
nonce: string;
|
|
5783
|
+
devicePublicKey: string;
|
|
5784
|
+
perTxCapKobo: number;
|
|
5785
|
+
cumulativeCapKobo: number;
|
|
5786
|
+
validFromMs: number;
|
|
5787
|
+
validUntilMs: number;
|
|
5788
|
+
counterSeed: number;
|
|
5789
|
+
issuerSig: string;
|
|
5790
|
+
};
|
|
5791
|
+
merchantSig: string;
|
|
5792
|
+
}, {
|
|
5793
|
+
reference: string;
|
|
5794
|
+
amountKobo: number;
|
|
5795
|
+
expiresAtMs: number;
|
|
5796
|
+
merchantOAC: {
|
|
5797
|
+
userId: string;
|
|
5798
|
+
deviceId: string;
|
|
5799
|
+
nonce: string;
|
|
5800
|
+
devicePublicKey: string;
|
|
5801
|
+
perTxCapKobo: number;
|
|
5802
|
+
cumulativeCapKobo: number;
|
|
5803
|
+
validFromMs: number;
|
|
5804
|
+
validUntilMs: number;
|
|
5805
|
+
counterSeed: number;
|
|
5806
|
+
issuerSig: string;
|
|
5807
|
+
};
|
|
5808
|
+
merchantSig: string;
|
|
5809
|
+
}>;
|
|
5810
|
+
payerOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5811
|
+
userId: z.ZodString;
|
|
5812
|
+
deviceId: z.ZodString;
|
|
5813
|
+
devicePublicKey: z.ZodString;
|
|
5814
|
+
perTxCapKobo: z.ZodNumber;
|
|
5815
|
+
cumulativeCapKobo: z.ZodNumber;
|
|
5816
|
+
validFromMs: z.ZodNumber;
|
|
5817
|
+
validUntilMs: z.ZodNumber;
|
|
5818
|
+
counterSeed: z.ZodNumber;
|
|
5819
|
+
nonce: z.ZodString;
|
|
5820
|
+
issuerSig: z.ZodString;
|
|
5821
|
+
}, "strip", z.ZodTypeAny, {
|
|
5822
|
+
userId: string;
|
|
5823
|
+
deviceId: string;
|
|
5824
|
+
nonce: string;
|
|
5825
|
+
devicePublicKey: string;
|
|
5826
|
+
perTxCapKobo: number;
|
|
5827
|
+
cumulativeCapKobo: number;
|
|
5828
|
+
validFromMs: number;
|
|
5829
|
+
validUntilMs: number;
|
|
5830
|
+
counterSeed: number;
|
|
5831
|
+
issuerSig: string;
|
|
5832
|
+
}, {
|
|
5833
|
+
userId: string;
|
|
5834
|
+
deviceId: string;
|
|
5835
|
+
nonce: string;
|
|
5836
|
+
devicePublicKey: string;
|
|
5837
|
+
perTxCapKobo: number;
|
|
5838
|
+
cumulativeCapKobo: number;
|
|
5839
|
+
validFromMs: number;
|
|
5840
|
+
validUntilMs: number;
|
|
5841
|
+
counterSeed: number;
|
|
5842
|
+
issuerSig: string;
|
|
5843
|
+
}>, {
|
|
5844
|
+
userId: string;
|
|
5845
|
+
deviceId: string;
|
|
5846
|
+
nonce: string;
|
|
5847
|
+
devicePublicKey: string;
|
|
5848
|
+
perTxCapKobo: number;
|
|
5849
|
+
cumulativeCapKobo: number;
|
|
5850
|
+
validFromMs: number;
|
|
5851
|
+
validUntilMs: number;
|
|
5852
|
+
counterSeed: number;
|
|
5853
|
+
issuerSig: string;
|
|
5854
|
+
}, {
|
|
5855
|
+
userId: string;
|
|
5856
|
+
deviceId: string;
|
|
5857
|
+
nonce: string;
|
|
5858
|
+
devicePublicKey: string;
|
|
5859
|
+
perTxCapKobo: number;
|
|
5860
|
+
cumulativeCapKobo: number;
|
|
5861
|
+
validFromMs: number;
|
|
5862
|
+
validUntilMs: number;
|
|
5863
|
+
counterSeed: number;
|
|
5864
|
+
issuerSig: string;
|
|
5865
|
+
}>, {
|
|
5866
|
+
userId: string;
|
|
5867
|
+
deviceId: string;
|
|
5868
|
+
nonce: string;
|
|
5869
|
+
devicePublicKey: string;
|
|
5870
|
+
perTxCapKobo: number;
|
|
5871
|
+
cumulativeCapKobo: number;
|
|
5872
|
+
validFromMs: number;
|
|
5873
|
+
validUntilMs: number;
|
|
5874
|
+
counterSeed: number;
|
|
5875
|
+
issuerSig: string;
|
|
5876
|
+
}, {
|
|
5877
|
+
userId: string;
|
|
5878
|
+
deviceId: string;
|
|
5879
|
+
nonce: string;
|
|
5880
|
+
devicePublicKey: string;
|
|
5881
|
+
perTxCapKobo: number;
|
|
5882
|
+
cumulativeCapKobo: number;
|
|
5883
|
+
validFromMs: number;
|
|
5884
|
+
validUntilMs: number;
|
|
5885
|
+
counterSeed: number;
|
|
5886
|
+
issuerSig: string;
|
|
5887
|
+
}>;
|
|
5888
|
+
payerCounter: z.ZodNumber;
|
|
5889
|
+
payerSig: z.ZodString;
|
|
5890
|
+
}, "strip", z.ZodTypeAny, {
|
|
5891
|
+
request: {
|
|
5892
|
+
reference: string;
|
|
5893
|
+
amountKobo: number;
|
|
5894
|
+
expiresAtMs: number;
|
|
5895
|
+
merchantOAC: {
|
|
5896
|
+
userId: string;
|
|
5897
|
+
deviceId: string;
|
|
5898
|
+
nonce: string;
|
|
5899
|
+
devicePublicKey: string;
|
|
5900
|
+
perTxCapKobo: number;
|
|
5901
|
+
cumulativeCapKobo: number;
|
|
5902
|
+
validFromMs: number;
|
|
5903
|
+
validUntilMs: number;
|
|
5904
|
+
counterSeed: number;
|
|
5905
|
+
issuerSig: string;
|
|
5906
|
+
};
|
|
5907
|
+
merchantSig: string;
|
|
5908
|
+
};
|
|
5909
|
+
payerOAC: {
|
|
5910
|
+
userId: string;
|
|
5911
|
+
deviceId: string;
|
|
5912
|
+
nonce: string;
|
|
5913
|
+
devicePublicKey: string;
|
|
5914
|
+
perTxCapKobo: number;
|
|
5915
|
+
cumulativeCapKobo: number;
|
|
5916
|
+
validFromMs: number;
|
|
5917
|
+
validUntilMs: number;
|
|
5918
|
+
counterSeed: number;
|
|
5919
|
+
issuerSig: string;
|
|
5920
|
+
};
|
|
5921
|
+
payerCounter: number;
|
|
5922
|
+
payerSig: string;
|
|
5923
|
+
}, {
|
|
5924
|
+
request: {
|
|
5925
|
+
reference: string;
|
|
5926
|
+
amountKobo: number;
|
|
5927
|
+
expiresAtMs: number;
|
|
5928
|
+
merchantOAC: {
|
|
5929
|
+
userId: string;
|
|
5930
|
+
deviceId: string;
|
|
5931
|
+
nonce: string;
|
|
5932
|
+
devicePublicKey: string;
|
|
5933
|
+
perTxCapKobo: number;
|
|
5934
|
+
cumulativeCapKobo: number;
|
|
5935
|
+
validFromMs: number;
|
|
5936
|
+
validUntilMs: number;
|
|
5937
|
+
counterSeed: number;
|
|
5938
|
+
issuerSig: string;
|
|
5939
|
+
};
|
|
5940
|
+
merchantSig: string;
|
|
5941
|
+
};
|
|
5942
|
+
payerOAC: {
|
|
5943
|
+
userId: string;
|
|
5944
|
+
deviceId: string;
|
|
5945
|
+
nonce: string;
|
|
5946
|
+
devicePublicKey: string;
|
|
5947
|
+
perTxCapKobo: number;
|
|
5948
|
+
cumulativeCapKobo: number;
|
|
5949
|
+
validFromMs: number;
|
|
5950
|
+
validUntilMs: number;
|
|
5951
|
+
counterSeed: number;
|
|
5952
|
+
issuerSig: string;
|
|
5953
|
+
};
|
|
5954
|
+
payerCounter: number;
|
|
5955
|
+
payerSig: string;
|
|
5956
|
+
}>;
|
|
5957
|
+
}, "strip", z.ZodTypeAny, {
|
|
5958
|
+
authorization: {
|
|
5959
|
+
request: {
|
|
5960
|
+
reference: string;
|
|
5961
|
+
amountKobo: number;
|
|
5962
|
+
expiresAtMs: number;
|
|
5963
|
+
merchantOAC: {
|
|
5964
|
+
userId: string;
|
|
5965
|
+
deviceId: string;
|
|
5966
|
+
nonce: string;
|
|
5967
|
+
devicePublicKey: string;
|
|
5968
|
+
perTxCapKobo: number;
|
|
5969
|
+
cumulativeCapKobo: number;
|
|
5970
|
+
validFromMs: number;
|
|
5971
|
+
validUntilMs: number;
|
|
5972
|
+
counterSeed: number;
|
|
5973
|
+
issuerSig: string;
|
|
5974
|
+
};
|
|
5975
|
+
merchantSig: string;
|
|
5976
|
+
};
|
|
5977
|
+
payerOAC: {
|
|
5978
|
+
userId: string;
|
|
5979
|
+
deviceId: string;
|
|
5980
|
+
nonce: string;
|
|
5981
|
+
devicePublicKey: string;
|
|
5982
|
+
perTxCapKobo: number;
|
|
5983
|
+
cumulativeCapKobo: number;
|
|
5984
|
+
validFromMs: number;
|
|
5985
|
+
validUntilMs: number;
|
|
5986
|
+
counterSeed: number;
|
|
5987
|
+
issuerSig: string;
|
|
5988
|
+
};
|
|
5989
|
+
payerCounter: number;
|
|
5990
|
+
payerSig: string;
|
|
5991
|
+
};
|
|
5992
|
+
}, {
|
|
5993
|
+
authorization: {
|
|
5994
|
+
request: {
|
|
5995
|
+
reference: string;
|
|
5996
|
+
amountKobo: number;
|
|
5997
|
+
expiresAtMs: number;
|
|
5998
|
+
merchantOAC: {
|
|
5999
|
+
userId: string;
|
|
6000
|
+
deviceId: string;
|
|
6001
|
+
nonce: string;
|
|
6002
|
+
devicePublicKey: string;
|
|
6003
|
+
perTxCapKobo: number;
|
|
6004
|
+
cumulativeCapKobo: number;
|
|
6005
|
+
validFromMs: number;
|
|
6006
|
+
validUntilMs: number;
|
|
6007
|
+
counterSeed: number;
|
|
6008
|
+
issuerSig: string;
|
|
6009
|
+
};
|
|
6010
|
+
merchantSig: string;
|
|
6011
|
+
};
|
|
6012
|
+
payerOAC: {
|
|
6013
|
+
userId: string;
|
|
6014
|
+
deviceId: string;
|
|
6015
|
+
nonce: string;
|
|
6016
|
+
devicePublicKey: string;
|
|
6017
|
+
perTxCapKobo: number;
|
|
6018
|
+
cumulativeCapKobo: number;
|
|
6019
|
+
validFromMs: number;
|
|
6020
|
+
validUntilMs: number;
|
|
6021
|
+
counterSeed: number;
|
|
6022
|
+
issuerSig: string;
|
|
6023
|
+
};
|
|
6024
|
+
payerCounter: number;
|
|
6025
|
+
payerSig: string;
|
|
6026
|
+
};
|
|
6027
|
+
}>;
|
|
6028
|
+
readonly receipt: z.ZodObject<{
|
|
6029
|
+
receiptId: z.ZodString;
|
|
6030
|
+
paymentReference: z.ZodString;
|
|
6031
|
+
payerUserId: z.ZodOptional<z.ZodString>;
|
|
6032
|
+
payeeUserId: z.ZodString;
|
|
6033
|
+
amountKobo: z.ZodNumber;
|
|
6034
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6035
|
+
channel: z.ZodEnum<["online", "offline_reconciled", "pay_link", "nqr"]>;
|
|
6036
|
+
settledAtMs: z.ZodNumber;
|
|
6037
|
+
ledgerTxnId: z.ZodOptional<z.ZodString>;
|
|
6038
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
6039
|
+
hashChainPrev: z.ZodOptional<z.ZodString>;
|
|
6040
|
+
}, "strip", z.ZodTypeAny, {
|
|
6041
|
+
currency: "NGN";
|
|
6042
|
+
amountKobo: number;
|
|
6043
|
+
payeeUserId: string;
|
|
6044
|
+
receiptId: string;
|
|
6045
|
+
channel: "online" | "offline_reconciled" | "pay_link" | "nqr";
|
|
6046
|
+
paymentReference: string;
|
|
6047
|
+
settledAtMs: number;
|
|
6048
|
+
payerUserId?: string | undefined;
|
|
6049
|
+
ledgerTxnId?: string | undefined;
|
|
6050
|
+
memo?: string | undefined;
|
|
6051
|
+
hashChainPrev?: string | undefined;
|
|
6052
|
+
}, {
|
|
6053
|
+
currency: "NGN";
|
|
6054
|
+
amountKobo: number;
|
|
6055
|
+
payeeUserId: string;
|
|
6056
|
+
receiptId: string;
|
|
6057
|
+
channel: "online" | "offline_reconciled" | "pay_link" | "nqr";
|
|
6058
|
+
paymentReference: string;
|
|
6059
|
+
settledAtMs: number;
|
|
6060
|
+
payerUserId?: string | undefined;
|
|
6061
|
+
ledgerTxnId?: string | undefined;
|
|
6062
|
+
memo?: string | undefined;
|
|
6063
|
+
hashChainPrev?: string | undefined;
|
|
6064
|
+
}>;
|
|
6065
|
+
readonly nqr_payment_request: z.ZodObject<{
|
|
6066
|
+
requestId: z.ZodString;
|
|
6067
|
+
payeeUserId: z.ZodString;
|
|
6068
|
+
amountKobo: z.ZodOptional<z.ZodNumber>;
|
|
6069
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6070
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
6071
|
+
expiresAtMs: z.ZodOptional<z.ZodNumber>;
|
|
6072
|
+
}, "strip", z.ZodTypeAny, {
|
|
6073
|
+
requestId: string;
|
|
6074
|
+
currency: "NGN";
|
|
6075
|
+
payeeUserId: string;
|
|
6076
|
+
amountKobo?: number | undefined;
|
|
6077
|
+
expiresAtMs?: number | undefined;
|
|
6078
|
+
memo?: string | undefined;
|
|
6079
|
+
}, {
|
|
6080
|
+
requestId: string;
|
|
6081
|
+
currency: "NGN";
|
|
6082
|
+
payeeUserId: string;
|
|
6083
|
+
amountKobo?: number | undefined;
|
|
6084
|
+
expiresAtMs?: number | undefined;
|
|
6085
|
+
memo?: string | undefined;
|
|
6086
|
+
}>;
|
|
6087
|
+
readonly payment_intent: z.ZodObject<{
|
|
6088
|
+
intentId: z.ZodString;
|
|
6089
|
+
payerUserId: z.ZodString;
|
|
6090
|
+
payeeUserId: z.ZodString;
|
|
6091
|
+
amountKobo: z.ZodNumber;
|
|
6092
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6093
|
+
idempotencyKey: z.ZodString;
|
|
6094
|
+
createdAtMs: z.ZodNumber;
|
|
6095
|
+
}, "strip", z.ZodTypeAny, {
|
|
6096
|
+
currency: "NGN";
|
|
6097
|
+
createdAtMs: number;
|
|
6098
|
+
intentId: string;
|
|
6099
|
+
amountKobo: number;
|
|
6100
|
+
idempotencyKey: string;
|
|
6101
|
+
payerUserId: string;
|
|
6102
|
+
payeeUserId: string;
|
|
6103
|
+
}, {
|
|
6104
|
+
currency: "NGN";
|
|
6105
|
+
createdAtMs: number;
|
|
6106
|
+
intentId: string;
|
|
6107
|
+
amountKobo: number;
|
|
6108
|
+
idempotencyKey: string;
|
|
6109
|
+
payerUserId: string;
|
|
6110
|
+
payeeUserId: string;
|
|
6111
|
+
}>;
|
|
6112
|
+
readonly offline_claim: z.ZodObject<{
|
|
6113
|
+
claimId: z.ZodString;
|
|
6114
|
+
authorizationId: z.ZodString;
|
|
6115
|
+
payeeUserId: z.ZodString;
|
|
6116
|
+
claimedAmountKobo: z.ZodNumber;
|
|
6117
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6118
|
+
claimedAtMs: z.ZodNumber;
|
|
6119
|
+
paymentReference: z.ZodOptional<z.ZodString>;
|
|
6120
|
+
}, "strip", z.ZodTypeAny, {
|
|
6121
|
+
currency: "NGN";
|
|
6122
|
+
payeeUserId: string;
|
|
6123
|
+
claimId: string;
|
|
6124
|
+
authorizationId: string;
|
|
6125
|
+
claimedAmountKobo: number;
|
|
6126
|
+
claimedAtMs: number;
|
|
6127
|
+
paymentReference?: string | undefined;
|
|
6128
|
+
}, {
|
|
6129
|
+
currency: "NGN";
|
|
6130
|
+
payeeUserId: string;
|
|
6131
|
+
claimId: string;
|
|
6132
|
+
authorizationId: string;
|
|
6133
|
+
claimedAmountKobo: number;
|
|
6134
|
+
claimedAtMs: number;
|
|
6135
|
+
paymentReference?: string | undefined;
|
|
6136
|
+
}>;
|
|
6137
|
+
readonly settlement_record: z.ZodObject<{
|
|
6138
|
+
settlementId: z.ZodString;
|
|
6139
|
+
ledgerTxnId: z.ZodString;
|
|
6140
|
+
sourceRefType: z.ZodEnum<["offline_authorization", "offline_claim", "transfer", "pay_link"]>;
|
|
6141
|
+
sourceRefId: z.ZodString;
|
|
6142
|
+
amountKobo: z.ZodNumber;
|
|
6143
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6144
|
+
settledAtMs: z.ZodNumber;
|
|
6145
|
+
}, "strip", z.ZodTypeAny, {
|
|
6146
|
+
currency: "NGN";
|
|
6147
|
+
amountKobo: number;
|
|
6148
|
+
settlementId: string;
|
|
6149
|
+
settledAtMs: number;
|
|
6150
|
+
ledgerTxnId: string;
|
|
6151
|
+
sourceRefType: "offline_claim" | "pay_link" | "offline_authorization" | "transfer";
|
|
6152
|
+
sourceRefId: string;
|
|
6153
|
+
}, {
|
|
6154
|
+
currency: "NGN";
|
|
6155
|
+
amountKobo: number;
|
|
6156
|
+
settlementId: string;
|
|
6157
|
+
settledAtMs: number;
|
|
6158
|
+
ledgerTxnId: string;
|
|
6159
|
+
sourceRefType: "offline_claim" | "pay_link" | "offline_authorization" | "transfer";
|
|
6160
|
+
sourceRefId: string;
|
|
6161
|
+
}>;
|
|
6162
|
+
readonly reversal_record: z.ZodObject<{
|
|
6163
|
+
reversalId: z.ZodString;
|
|
6164
|
+
originalTxnId: z.ZodString;
|
|
6165
|
+
amountKobo: z.ZodNumber;
|
|
6166
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6167
|
+
reason: z.ZodEnum<["user_dispute", "fraud", "duplicate", "admin_correction", "other"]>;
|
|
6168
|
+
reversedAtMs: z.ZodNumber;
|
|
6169
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
6170
|
+
}, "strip", z.ZodTypeAny, {
|
|
6171
|
+
currency: "NGN";
|
|
6172
|
+
amountKobo: number;
|
|
6173
|
+
reversalId: string;
|
|
6174
|
+
originalTxnId: string;
|
|
6175
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6176
|
+
reversedAtMs: number;
|
|
6177
|
+
memo?: string | undefined;
|
|
6178
|
+
}, {
|
|
6179
|
+
currency: "NGN";
|
|
6180
|
+
amountKobo: number;
|
|
6181
|
+
reversalId: string;
|
|
6182
|
+
originalTxnId: string;
|
|
6183
|
+
reason: "user_dispute" | "fraud" | "duplicate" | "admin_correction" | "other";
|
|
6184
|
+
reversedAtMs: number;
|
|
6185
|
+
memo?: string | undefined;
|
|
6186
|
+
}>;
|
|
6187
|
+
readonly ledger_journal_entry: z.ZodObject<{
|
|
6188
|
+
entryId: z.ZodString;
|
|
6189
|
+
journalId: z.ZodString;
|
|
6190
|
+
debitAccountId: z.ZodString;
|
|
6191
|
+
creditAccountId: z.ZodString;
|
|
6192
|
+
amountKobo: z.ZodNumber;
|
|
6193
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6194
|
+
postedAtMs: z.ZodNumber;
|
|
6195
|
+
refType: z.ZodOptional<z.ZodString>;
|
|
6196
|
+
refId: z.ZodOptional<z.ZodString>;
|
|
6197
|
+
}, "strip", z.ZodTypeAny, {
|
|
6198
|
+
currency: "NGN";
|
|
6199
|
+
amountKobo: number;
|
|
6200
|
+
entryId: string;
|
|
6201
|
+
journalId: string;
|
|
6202
|
+
debitAccountId: string;
|
|
6203
|
+
creditAccountId: string;
|
|
6204
|
+
postedAtMs: number;
|
|
6205
|
+
refType?: string | undefined;
|
|
6206
|
+
refId?: string | undefined;
|
|
6207
|
+
}, {
|
|
6208
|
+
currency: "NGN";
|
|
6209
|
+
amountKobo: number;
|
|
6210
|
+
entryId: string;
|
|
6211
|
+
journalId: string;
|
|
6212
|
+
debitAccountId: string;
|
|
6213
|
+
creditAccountId: string;
|
|
6214
|
+
postedAtMs: number;
|
|
6215
|
+
refType?: string | undefined;
|
|
6216
|
+
refId?: string | undefined;
|
|
6217
|
+
}>;
|
|
6218
|
+
readonly statement: z.ZodEffects<z.ZodObject<{
|
|
6219
|
+
statementId: z.ZodString;
|
|
6220
|
+
userId: z.ZodString;
|
|
6221
|
+
periodStartMs: z.ZodNumber;
|
|
6222
|
+
periodEndMs: z.ZodNumber;
|
|
6223
|
+
openingBalanceKobo: z.ZodNumber;
|
|
6224
|
+
closingBalanceKobo: z.ZodNumber;
|
|
6225
|
+
transactionCount: z.ZodNumber;
|
|
6226
|
+
currency: z.ZodLiteral<"NGN">;
|
|
6227
|
+
hashChainPrev: z.ZodOptional<z.ZodString>;
|
|
6228
|
+
}, "strip", z.ZodTypeAny, {
|
|
6229
|
+
userId: string;
|
|
6230
|
+
currency: "NGN";
|
|
6231
|
+
statementId: string;
|
|
6232
|
+
periodStartMs: number;
|
|
6233
|
+
periodEndMs: number;
|
|
6234
|
+
openingBalanceKobo: number;
|
|
6235
|
+
closingBalanceKobo: number;
|
|
6236
|
+
transactionCount: number;
|
|
6237
|
+
hashChainPrev?: string | undefined;
|
|
6238
|
+
}, {
|
|
6239
|
+
userId: string;
|
|
6240
|
+
currency: "NGN";
|
|
6241
|
+
statementId: string;
|
|
6242
|
+
periodStartMs: number;
|
|
6243
|
+
periodEndMs: number;
|
|
6244
|
+
openingBalanceKobo: number;
|
|
6245
|
+
closingBalanceKobo: number;
|
|
6246
|
+
transactionCount: number;
|
|
6247
|
+
hashChainPrev?: string | undefined;
|
|
6248
|
+
}>, {
|
|
6249
|
+
userId: string;
|
|
6250
|
+
currency: "NGN";
|
|
6251
|
+
statementId: string;
|
|
6252
|
+
periodStartMs: number;
|
|
6253
|
+
periodEndMs: number;
|
|
6254
|
+
openingBalanceKobo: number;
|
|
6255
|
+
closingBalanceKobo: number;
|
|
6256
|
+
transactionCount: number;
|
|
6257
|
+
hashChainPrev?: string | undefined;
|
|
6258
|
+
}, {
|
|
6259
|
+
userId: string;
|
|
6260
|
+
currency: "NGN";
|
|
6261
|
+
statementId: string;
|
|
6262
|
+
periodStartMs: number;
|
|
6263
|
+
periodEndMs: number;
|
|
6264
|
+
openingBalanceKobo: number;
|
|
6265
|
+
closingBalanceKobo: number;
|
|
6266
|
+
transactionCount: number;
|
|
6267
|
+
hashChainPrev?: string | undefined;
|
|
6268
|
+
}>;
|
|
6269
|
+
readonly pass: z.ZodEffects<z.ZodObject<{
|
|
6270
|
+
passId: z.ZodString;
|
|
6271
|
+
holderId: z.ZodString;
|
|
6272
|
+
category: z.ZodEnum<["membership", "ticket", "loyalty", "access", "voucher"]>;
|
|
6273
|
+
title: z.ZodString;
|
|
6274
|
+
validFromMs: z.ZodNumber;
|
|
6275
|
+
validUntilMs: z.ZodOptional<z.ZodNumber>;
|
|
6276
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
6277
|
+
}, "strip", z.ZodTypeAny, {
|
|
6278
|
+
validFromMs: number;
|
|
6279
|
+
passId: string;
|
|
6280
|
+
holderId: string;
|
|
6281
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
6282
|
+
title: string;
|
|
6283
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
6284
|
+
validUntilMs?: number | undefined;
|
|
6285
|
+
}, {
|
|
6286
|
+
validFromMs: number;
|
|
6287
|
+
passId: string;
|
|
6288
|
+
holderId: string;
|
|
6289
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
6290
|
+
title: string;
|
|
6291
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
6292
|
+
validUntilMs?: number | undefined;
|
|
6293
|
+
}>, {
|
|
6294
|
+
validFromMs: number;
|
|
6295
|
+
passId: string;
|
|
6296
|
+
holderId: string;
|
|
6297
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
6298
|
+
title: string;
|
|
6299
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
6300
|
+
validUntilMs?: number | undefined;
|
|
6301
|
+
}, {
|
|
6302
|
+
validFromMs: number;
|
|
6303
|
+
passId: string;
|
|
6304
|
+
holderId: string;
|
|
6305
|
+
category: "voucher" | "loyalty" | "membership" | "ticket" | "access";
|
|
6306
|
+
title: string;
|
|
6307
|
+
metadata?: Record<string, string | number | boolean> | undefined;
|
|
6308
|
+
validUntilMs?: number | undefined;
|
|
6309
|
+
}>;
|
|
6310
|
+
readonly identity: z.ZodObject<{
|
|
6311
|
+
attestationId: z.ZodString;
|
|
6312
|
+
subjectId: z.ZodString;
|
|
6313
|
+
claimType: z.ZodEnum<["phone_verified", "email_verified", "bvn_verified", "kyc_tier", "age_band"]>;
|
|
6314
|
+
claimValueHash: z.ZodString;
|
|
6315
|
+
attestedAtMs: z.ZodNumber;
|
|
6316
|
+
}, "strip", z.ZodTypeAny, {
|
|
6317
|
+
attestationId: string;
|
|
6318
|
+
subjectId: string;
|
|
6319
|
+
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
6320
|
+
claimValueHash: string;
|
|
6321
|
+
attestedAtMs: number;
|
|
6322
|
+
}, {
|
|
6323
|
+
attestationId: string;
|
|
6324
|
+
subjectId: string;
|
|
6325
|
+
claimType: "phone_verified" | "email_verified" | "bvn_verified" | "kyc_tier" | "age_band";
|
|
6326
|
+
claimValueHash: string;
|
|
6327
|
+
attestedAtMs: number;
|
|
6328
|
+
}>;
|
|
6329
|
+
};
|
|
6330
|
+
/** Artifact types whose body schema is fully specified and safe to dispatch. */
|
|
6331
|
+
declare const HARDENED_ARTIFACT_TYPES: Set<ArtifactType>;
|
|
6332
|
+
declare function isKnownArtifactType(t: string): t is ArtifactType;
|
|
6333
|
+
declare function isHardenedArtifactType(t: string): t is ArtifactType;
|
|
6334
|
+
|
|
6335
|
+
/**
|
|
6336
|
+
* Build, sign and encode a typed artifact into a flur://v1/... URI.
|
|
6337
|
+
*
|
|
6338
|
+
* - Validates the body against the registered Zod schema for `type`.
|
|
6339
|
+
* - Refuses unknown artifact types.
|
|
6340
|
+
* - Refuses stub types (those without a hardened schema) to avoid shipping
|
|
6341
|
+
* unverifiable payloads.
|
|
6342
|
+
*/
|
|
6343
|
+
declare function createArtifactUri<T>(input: {
|
|
6344
|
+
type: ArtifactType;
|
|
6345
|
+
issuer: string;
|
|
6346
|
+
keyId: string;
|
|
6347
|
+
privateKey: Uint8Array;
|
|
6348
|
+
data: T;
|
|
6349
|
+
nonce: string;
|
|
6350
|
+
issuedAtSeconds?: number;
|
|
6351
|
+
expiresAtSeconds?: number;
|
|
6352
|
+
}): {
|
|
6353
|
+
uri: string;
|
|
6354
|
+
signed: SignedArtifact<T>;
|
|
6355
|
+
};
|
|
6356
|
+
type VerifiedArtifact<T = unknown> = {
|
|
6357
|
+
type: ArtifactType;
|
|
6358
|
+
body: ArtifactBody<T>;
|
|
6359
|
+
sig: string;
|
|
6360
|
+
decoded: DecodedArtifactUri;
|
|
6361
|
+
};
|
|
6362
|
+
/**
|
|
6363
|
+
* Decode and verify a flur://v1/... URI.
|
|
6364
|
+
*
|
|
6365
|
+
* - Parses the URI and envelope header.
|
|
6366
|
+
* - Validates the body against the registered Zod schema.
|
|
6367
|
+
* - Verifies the Ed25519 signature against the supplied public key.
|
|
6368
|
+
* - Enforces expiry unless `options.enforceExpiry === false`.
|
|
6369
|
+
*
|
|
6370
|
+
* The caller is responsible for resolving the public key from (issuer, kid)
|
|
6371
|
+
* against the backend device-key registry, and for enforcing nonce uniqueness
|
|
6372
|
+
* via the artifact_nonces store.
|
|
6373
|
+
*/
|
|
6374
|
+
declare function verifyArtifactUri<T = unknown>(uri: string, publicKey: Uint8Array, options?: VerifyArtifactOptions): VerifiedArtifact<T>;
|
|
6375
|
+
declare function createReceiptArtifactUri(input: {
|
|
6376
|
+
issuer: string;
|
|
6377
|
+
keyId: string;
|
|
6378
|
+
privateKey: Uint8Array;
|
|
6379
|
+
data: ReceiptArtifact;
|
|
6380
|
+
nonce: string;
|
|
6381
|
+
issuedAtSeconds?: number;
|
|
6382
|
+
expiresAtSeconds?: number;
|
|
6383
|
+
}): {
|
|
6384
|
+
uri: string;
|
|
6385
|
+
signed: SignedArtifact<{
|
|
6386
|
+
currency: "NGN";
|
|
6387
|
+
amountKobo: number;
|
|
6388
|
+
payeeUserId: string;
|
|
6389
|
+
receiptId: string;
|
|
6390
|
+
channel: "online" | "offline_reconciled" | "pay_link" | "nqr";
|
|
6391
|
+
paymentReference: string;
|
|
6392
|
+
settledAtMs: number;
|
|
6393
|
+
payerUserId?: string | undefined;
|
|
6394
|
+
ledgerTxnId?: string | undefined;
|
|
6395
|
+
memo?: string | undefined;
|
|
6396
|
+
hashChainPrev?: string | undefined;
|
|
6397
|
+
}>;
|
|
6398
|
+
};
|
|
6399
|
+
declare function createOfflinePaymentAuthorizationArtifactUri(input: {
|
|
6400
|
+
issuer: string;
|
|
6401
|
+
keyId: string;
|
|
6402
|
+
privateKey: Uint8Array;
|
|
6403
|
+
data: OfflinePaymentAuthorizationArtifact;
|
|
6404
|
+
nonce: string;
|
|
6405
|
+
issuedAtSeconds?: number;
|
|
6406
|
+
expiresAtSeconds?: number;
|
|
6407
|
+
}): {
|
|
6408
|
+
uri: string;
|
|
6409
|
+
signed: SignedArtifact<{
|
|
6410
|
+
authorization: {
|
|
6411
|
+
request: {
|
|
6412
|
+
reference: string;
|
|
6413
|
+
amountKobo: number;
|
|
6414
|
+
expiresAtMs: number;
|
|
6415
|
+
merchantOAC: {
|
|
6416
|
+
userId: string;
|
|
6417
|
+
deviceId: string;
|
|
6418
|
+
nonce: string;
|
|
6419
|
+
devicePublicKey: string;
|
|
6420
|
+
perTxCapKobo: number;
|
|
6421
|
+
cumulativeCapKobo: number;
|
|
6422
|
+
validFromMs: number;
|
|
6423
|
+
validUntilMs: number;
|
|
6424
|
+
counterSeed: number;
|
|
6425
|
+
issuerSig: string;
|
|
6426
|
+
};
|
|
6427
|
+
merchantSig: string;
|
|
6428
|
+
};
|
|
6429
|
+
payerOAC: {
|
|
6430
|
+
userId: string;
|
|
6431
|
+
deviceId: string;
|
|
6432
|
+
nonce: string;
|
|
6433
|
+
devicePublicKey: string;
|
|
6434
|
+
perTxCapKobo: number;
|
|
6435
|
+
cumulativeCapKobo: number;
|
|
6436
|
+
validFromMs: number;
|
|
6437
|
+
validUntilMs: number;
|
|
6438
|
+
counterSeed: number;
|
|
6439
|
+
issuerSig: string;
|
|
6440
|
+
};
|
|
6441
|
+
payerCounter: number;
|
|
6442
|
+
payerSig: string;
|
|
6443
|
+
};
|
|
6444
|
+
}>;
|
|
6445
|
+
};
|
|
6446
|
+
|
|
6447
|
+
export { 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 AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, COLLECTION_INTENT_STATUSES, COLLECTION_PAYMENT_STATUSES, CUSTODIAL_MODES, type CashNamespace, 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 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 DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, type DisableOfflineInput, DisableOfflineInputSchema, type DisableOfflineResult, DisableOfflineResultSchema, type Ed25519KeyPair, type EnableOfflineInput, EnableOfflineInputSchema, type EnableOfflineResult, EnableOfflineResultSchema, 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 IssueOACInput, IssueOACInputSchema, 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, OfflineClaimArtifactSchema, type OfflineHoldRecord, OfflineHoldRecordSchema, type OfflinePaymentAuthorization, type OfflinePaymentAuthorizationArtifact, OfflinePaymentAuthorizationArtifactSchema, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineStateResult, OfflineStateResultSchema, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, 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 RegisterDeviceKeyInput, RegisterDeviceKeyInputSchema, 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, StatementArtifactSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, type UpsertMerchantProfileInput, UpsertMerchantProfileInputSchema, type UpsertPartnerProfileInput, UpsertPartnerProfileInputSchema, type VerifiedArtifact, type VerifyArtifactOptions, WITHDRAWAL_STATES, type Withdrawal, WithdrawalSchema, type WithdrawalState, base64UrlDecode, base64UrlEncode, bodySha256Hex, buildArtifactBody, buildAuthorization, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeEncounterId, constantTimeEqual, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createArtifactUri, createCollectionsClient, createConsumerCollectionsClient, createConsumerWithdrawalsClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflinePaymentAuthorizationArtifactUri, createOfflineSettlementsClient, createPartnerCollectionsClient, createPartnerFundingClient, createPartnerProfileAdminClient, createPassesClient, createReceiptArtifactUri, createReceiptsClient, decodeArtifactUri, decodeAuthorizationQR, decodeBase45, decodePaymentRequestQR, encodeArtifactUri, encodeAuthorizationQR, encodeBase45, encodeNQR, encodePaymentRequestQR, formatAmount, generateDynamicQR, generateKeyPair, generateStaticQR, init, isHardenedArtifactType, isKnownArtifactType, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, publicKeyFromPrivate, readTLV, routingHint, sign, signArtifact, signAuthorization, signCanonical, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verify, verifyArtifactSignature, verifyArtifactUri, verifyAuthorization, verifyCanonical, verifyOAC, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
|