passkey-kit 0.13.1 → 0.15.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/README.md +29 -20
- package/dist/constants.d.ts +20 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +20 -5
- package/dist/constants.js.map +1 -1
- package/dist/contract-errors.d.ts.map +1 -1
- package/dist/contract-errors.js +3 -0
- package/dist/contract-errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexer/mercury.d.ts +6 -0
- package/dist/indexer/mercury.d.ts.map +1 -1
- package/dist/indexer/mercury.js +10 -2
- package/dist/indexer/mercury.js.map +1 -1
- package/dist/kit/auth-payload.d.ts +17 -0
- package/dist/kit/auth-payload.d.ts.map +1 -1
- package/dist/kit/auth-payload.js +24 -0
- package/dist/kit/auth-payload.js.map +1 -1
- package/dist/kit/deploy-ops.d.ts +9 -7
- package/dist/kit/deploy-ops.d.ts.map +1 -1
- package/dist/kit/deploy-ops.js +11 -8
- package/dist/kit/deploy-ops.js.map +1 -1
- package/dist/kit/tx-ops.d.ts +7 -4
- package/dist/kit/tx-ops.d.ts.map +1 -1
- package/dist/kit/tx-ops.js +27 -6
- package/dist/kit/tx-ops.js.map +1 -1
- package/dist/kit.d.ts +16 -8
- package/dist/kit.d.ts.map +1 -1
- package/dist/kit.js +85 -22
- package/dist/kit.js.map +1 -1
- package/dist/managers/signer-manager.d.ts +13 -2
- package/dist/managers/signer-manager.d.ts.map +1 -1
- package/dist/managers/signer-manager.js +22 -3
- package/dist/managers/signer-manager.js.map +1 -1
- package/dist/managers/submission-manager.d.ts +12 -17
- package/dist/managers/submission-manager.d.ts.map +1 -1
- package/dist/managers/submission-manager.js +77 -19
- package/dist/managers/submission-manager.js.map +1 -1
- package/dist/relayer.d.ts +2 -2
- package/dist/relayer.d.ts.map +1 -1
- package/dist/relayer.js +6 -3
- package/dist/relayer.js.map +1 -1
- package/dist/rpc-data.d.ts +10 -0
- package/dist/rpc-data.d.ts.map +1 -1
- package/dist/rpc-data.js +12 -0
- package/dist/rpc-data.js.map +1 -1
- package/dist/server.d.ts +4 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -5
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +36 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +162 -46
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +6 -4
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +8 -6
- package/dist/validation.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -7
package/dist/utils.js
CHANGED
|
@@ -3,10 +3,26 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
import { StrKey, hash, xdr, Address } from "@stellar/stellar-sdk";
|
|
6
|
+
import { StrKey, hash, xdr, Address, Keypair } from "@stellar/stellar-sdk";
|
|
7
7
|
import base64url from "./base64url.js";
|
|
8
|
-
import { SECP256R1_PUBLIC_KEY_SIZE, SECP256R1_CURVE_ORDER, UNCOMPRESSED_PUBKEY_PREFIX, WEBAUTHN_CHALLENGE_SIZE, } from "./constants.js";
|
|
9
|
-
|
|
8
|
+
import { SECP256R1_PUBLIC_KEY_SIZE, SECP256R1_CURVE_ORDER, SECP256R1_FIELD_PRIME, SECP256R1_B, UNCOMPRESSED_PUBKEY_PREFIX, WEBAUTHN_CHALLENGE_SIZE, DEFAULT_DEPLOYER_SEED, } from "./constants.js";
|
|
9
|
+
/**
|
|
10
|
+
* Public key of the shared, deterministic default deployer, derived once from
|
|
11
|
+
* {@link DEFAULT_DEPLOYER_SEED}.
|
|
12
|
+
*/
|
|
13
|
+
export const DEFAULT_DEPLOYER_PUBLIC_KEY = Keypair.fromRawEd25519Seed(hash(Buffer.from(DEFAULT_DEPLOYER_SEED))).publicKey();
|
|
14
|
+
/**
|
|
15
|
+
* True when `publicKey` is the shared, publicly-derivable default deployer.
|
|
16
|
+
*
|
|
17
|
+
* That account is a **sign-only / address-derivation** identity: the SDK must
|
|
18
|
+
* never use it as a transaction source (its sequence can be bricked by anyone
|
|
19
|
+
* via `bumpSequence`) or fee payer (its balance is sweepable by anyone). It may
|
|
20
|
+
* only sign Soroban auth entries and salt the deploy.
|
|
21
|
+
*/
|
|
22
|
+
export function isDefaultDeployer(publicKey) {
|
|
23
|
+
return publicKey === DEFAULT_DEPLOYER_PUBLIC_KEY;
|
|
24
|
+
}
|
|
25
|
+
import { ValidationError, WebAuthnError, PasskeyKitErrorCode, } from "./errors.js";
|
|
10
26
|
// ============================================================================
|
|
11
27
|
// Deterministic contract-address derivation
|
|
12
28
|
// ============================================================================
|
|
@@ -38,6 +54,79 @@ export function deriveContractAddress(keyId, deployerPublicKey, networkPassphras
|
|
|
38
54
|
// ============================================================================
|
|
39
55
|
// WebAuthn public-key extraction
|
|
40
56
|
// ============================================================================
|
|
57
|
+
/** COSE map prefix for an ES256 (P-256) key: `{1:2, 3:-26, -1:1, -2: bytes(32)…}`. */
|
|
58
|
+
const ES256_COSE_PREFIX = Buffer.from([
|
|
59
|
+
0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20,
|
|
60
|
+
]);
|
|
61
|
+
/** COSE label for the `y` coordinate that must follow `x`: `-3: bytes(32)`. */
|
|
62
|
+
const COSE_Y_LABEL = Buffer.from([0x22, 0x58, 0x20]);
|
|
63
|
+
/**
|
|
64
|
+
* Whether an uncompressed `0x04 || x || y` key is a point on the P-256 curve
|
|
65
|
+
* (`y² ≡ x³ − 3x + b (mod p)`, coordinates in-field). A structurally valid but
|
|
66
|
+
* off-curve key would register fine and deploy a wallet no signature can ever
|
|
67
|
+
* satisfy, so extraction rejects it up front.
|
|
68
|
+
*/
|
|
69
|
+
export function isOnP256Curve(publicKey) {
|
|
70
|
+
const key = Buffer.from(publicKey);
|
|
71
|
+
if (key.length !== SECP256R1_PUBLIC_KEY_SIZE ||
|
|
72
|
+
key[0] !== UNCOMPRESSED_PUBKEY_PREFIX) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
const p = SECP256R1_FIELD_PRIME;
|
|
76
|
+
const x = BigInt("0x" + key.subarray(1, 33).toString("hex"));
|
|
77
|
+
const y = BigInt("0x" + key.subarray(33, 65).toString("hex"));
|
|
78
|
+
if (x >= p || y >= p)
|
|
79
|
+
return false;
|
|
80
|
+
const x3 = (((x * x) % p) * x) % p;
|
|
81
|
+
const rhs = (((x3 - ((3n * x) % p) + SECP256R1_B) % p) + p) % p;
|
|
82
|
+
return (y * y) % p === rhs;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Read `x || y` out of a COSE key at `xStart`, verifying the `y` label bytes
|
|
86
|
+
* and buffer bounds instead of trusting fixed offsets. Returns the
|
|
87
|
+
* uncompressed `0x04 || x || y` point, or `undefined` when the shape doesn't
|
|
88
|
+
* match.
|
|
89
|
+
*/
|
|
90
|
+
function coseCoordinates(buf, xStart) {
|
|
91
|
+
const yLabelStart = xStart + 32;
|
|
92
|
+
const yStart = yLabelStart + COSE_Y_LABEL.length;
|
|
93
|
+
if (buf.length < yStart + 32)
|
|
94
|
+
return undefined;
|
|
95
|
+
if (!buf.subarray(yLabelStart, yStart).equals(COSE_Y_LABEL))
|
|
96
|
+
return undefined;
|
|
97
|
+
return Buffer.concat([
|
|
98
|
+
Buffer.from([UNCOMPRESSED_PUBKEY_PREFIX]),
|
|
99
|
+
buf.subarray(xStart, xStart + 32),
|
|
100
|
+
buf.subarray(yStart, yStart + 32),
|
|
101
|
+
]);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Parse the attested COSE key out of raw `authenticatorData`:
|
|
105
|
+
* `rpIdHash(32) | flags(1) | counter(4) | aaguid(16) | credIdLen(2) | credId | COSE`.
|
|
106
|
+
* Every offset is bounds-checked and the ES256 COSE prefix is verified in
|
|
107
|
+
* place before any coordinate is sliced.
|
|
108
|
+
*/
|
|
109
|
+
function coseKeyFromAuthenticatorData(ad) {
|
|
110
|
+
if (ad.length < 55)
|
|
111
|
+
return undefined;
|
|
112
|
+
const credentialIdLength = (ad[53] << 8) | ad[54];
|
|
113
|
+
const coseStart = 55 + credentialIdLength;
|
|
114
|
+
if (ad.length < coseStart + ES256_COSE_PREFIX.length)
|
|
115
|
+
return undefined;
|
|
116
|
+
if (!ad
|
|
117
|
+
.subarray(coseStart, coseStart + ES256_COSE_PREFIX.length)
|
|
118
|
+
.equals(ES256_COSE_PREFIX)) {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
return coseCoordinates(ad, coseStart + ES256_COSE_PREFIX.length);
|
|
122
|
+
}
|
|
123
|
+
/** Locate the ES256 COSE key inside a CBOR attestation object and extract it. */
|
|
124
|
+
function coseKeyFromAttestationObject(ao) {
|
|
125
|
+
const prefixIndex = ao.indexOf(ES256_COSE_PREFIX);
|
|
126
|
+
if (prefixIndex === -1)
|
|
127
|
+
return undefined;
|
|
128
|
+
return coseCoordinates(ao, prefixIndex + ES256_COSE_PREFIX.length);
|
|
129
|
+
}
|
|
41
130
|
/**
|
|
42
131
|
* Extract the 65-byte uncompressed secp256r1 public key from a WebAuthn
|
|
43
132
|
* registration (attestation) response.
|
|
@@ -47,9 +136,15 @@ export function deriveContractAddress(keyId, deployerPublicKey, networkPassphras
|
|
|
47
136
|
* 2. `response.publicKey` decoded from SPKI via WebCrypto (`crypto.subtle`),
|
|
48
137
|
* which is the correct, non-magic-offset way to normalize the DER-encoded
|
|
49
138
|
* SubjectPublicKeyInfo most authenticators return.
|
|
50
|
-
* 3. Parsing the COSE key out of `authenticatorData
|
|
139
|
+
* 3. Parsing the COSE key out of `authenticatorData`, then
|
|
140
|
+
* `attestationObject` — with the COSE structure verified in place, never
|
|
141
|
+
* trusted fixed offsets.
|
|
142
|
+
*
|
|
143
|
+
* Whatever the source, the result must be a valid point ON the P-256 curve;
|
|
144
|
+
* a mangled key is rejected here rather than deployed as an unusable wallet
|
|
145
|
+
* signer.
|
|
51
146
|
*
|
|
52
|
-
* @throws {WebAuthnError} If
|
|
147
|
+
* @throws {WebAuthnError} If no valid public key can be extracted.
|
|
53
148
|
*/
|
|
54
149
|
export async function extractPublicKeyFromAttestation(response) {
|
|
55
150
|
let publicKey;
|
|
@@ -66,67 +161,88 @@ export async function extractPublicKeyFromAttestation(response) {
|
|
|
66
161
|
publicKey = Buffer.from(new Uint8Array(rawKey));
|
|
67
162
|
}
|
|
68
163
|
catch {
|
|
69
|
-
publicKey =
|
|
164
|
+
publicKey = undefined; // not SPKI — fall through to the COSE paths
|
|
70
165
|
}
|
|
71
166
|
}
|
|
72
|
-
else {
|
|
73
|
-
publicKey = encodedPublicKey.subarray(encodedPublicKey.length - SECP256R1_PUBLIC_KEY_SIZE);
|
|
74
|
-
}
|
|
75
167
|
}
|
|
76
|
-
//
|
|
77
|
-
//
|
|
78
|
-
if (!publicKey ||
|
|
79
|
-
publicKey
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
else if (response.attestationObject) {
|
|
90
|
-
const attestationObject = base64url.toBuffer(response.attestationObject);
|
|
91
|
-
// COSE key structure prefix for an ES256 (P-256) key.
|
|
92
|
-
const publicKeyPrefixSlice = Buffer.from([
|
|
93
|
-
0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20,
|
|
94
|
-
]);
|
|
95
|
-
let startIndex = attestationObject.indexOf(publicKeyPrefixSlice);
|
|
96
|
-
if (startIndex === -1) {
|
|
97
|
-
throw new WebAuthnError("Could not locate the COSE public key in the attestation object", PasskeyKitErrorCode.PUBLIC_KEY_EXTRACTION_FAILED);
|
|
98
|
-
}
|
|
99
|
-
startIndex = startIndex + publicKeyPrefixSlice.length;
|
|
100
|
-
x = attestationObject.subarray(startIndex, 32 + startIndex);
|
|
101
|
-
y = attestationObject.subarray(35 + startIndex, 67 + startIndex);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
throw new WebAuthnError("Could not extract a public key from the attestation response", PasskeyKitErrorCode.PUBLIC_KEY_EXTRACTION_FAILED);
|
|
105
|
-
}
|
|
106
|
-
publicKey = Buffer.from([UNCOMPRESSED_PUBKEY_PREFIX, ...x, ...y]);
|
|
168
|
+
// Fall back to the attested COSE key when `response.publicKey` is absent or
|
|
169
|
+
// didn't yield a valid on-curve point.
|
|
170
|
+
if (!publicKey || !isOnP256Curve(publicKey)) {
|
|
171
|
+
publicKey =
|
|
172
|
+
(response.authenticatorData
|
|
173
|
+
? coseKeyFromAuthenticatorData(base64url.toBuffer(response.authenticatorData))
|
|
174
|
+
: undefined) ??
|
|
175
|
+
(response.attestationObject
|
|
176
|
+
? coseKeyFromAttestationObject(base64url.toBuffer(response.attestationObject))
|
|
177
|
+
: undefined);
|
|
178
|
+
}
|
|
179
|
+
if (!publicKey || !isOnP256Curve(publicKey)) {
|
|
180
|
+
throw new WebAuthnError("Could not extract a valid secp256r1 public key from the attestation response", PasskeyKitErrorCode.PUBLIC_KEY_EXTRACTION_FAILED);
|
|
107
181
|
}
|
|
108
182
|
return new Uint8Array(publicKey);
|
|
109
183
|
}
|
|
110
184
|
// ============================================================================
|
|
111
185
|
// Signature encoding
|
|
112
186
|
// ============================================================================
|
|
187
|
+
function malformedDer(reason) {
|
|
188
|
+
return new ValidationError(`Malformed DER ECDSA signature: ${reason}`, PasskeyKitErrorCode.INVALID_INPUT);
|
|
189
|
+
}
|
|
113
190
|
/**
|
|
114
191
|
* Convert a DER-encoded ECDSA signature to Stellar's compact `r || s` form with
|
|
115
192
|
* a low-S value (S <= n/2), as required by the secp256r1 host function.
|
|
116
193
|
*
|
|
194
|
+
* The DER structure is validated before any offset is dereferenced:
|
|
195
|
+
* sequence/integer tags, short-form lengths that exactly span the buffer, and
|
|
196
|
+
* `r`/`s` values in `[1, n-1]`. A WebAuthn P-256 signature always fits
|
|
197
|
+
* short-form DER (total length < 128 bytes), so long-form lengths are rejected.
|
|
198
|
+
*
|
|
117
199
|
* @param derSignature - The DER-encoded signature
|
|
118
200
|
* @returns 64-byte compact signature (`r || s`)
|
|
201
|
+
* @throws {ValidationError} If the signature is not structurally valid DER or
|
|
202
|
+
* `r`/`s` are out of range for P-256.
|
|
119
203
|
*/
|
|
120
204
|
export function compactSignature(derSignature) {
|
|
121
205
|
// DER: 0x30 [total-len] 0x02 [r-len] [r] 0x02 [s-len] [s]
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
206
|
+
if (derSignature.length < 8)
|
|
207
|
+
throw malformedDer("too short");
|
|
208
|
+
if (derSignature[0] !== 0x30)
|
|
209
|
+
throw malformedDer("missing SEQUENCE tag");
|
|
210
|
+
const totalLength = derSignature[1];
|
|
211
|
+
if (totalLength >= 0x80)
|
|
212
|
+
throw malformedDer("long-form length not supported");
|
|
213
|
+
if (totalLength !== derSignature.length - 2) {
|
|
214
|
+
throw malformedDer("SEQUENCE length does not span the buffer");
|
|
215
|
+
}
|
|
216
|
+
if (derSignature[2] !== 0x02)
|
|
217
|
+
throw malformedDer("missing INTEGER tag for r");
|
|
218
|
+
const rLength = derSignature[3];
|
|
219
|
+
// A P-256 integer is at most 32 bytes plus one 0x00 sign pad.
|
|
220
|
+
if (rLength < 1 || rLength > 33)
|
|
221
|
+
throw malformedDer("r length out of range");
|
|
222
|
+
if (4 + rLength + 2 > derSignature.length) {
|
|
223
|
+
throw malformedDer("r overruns the buffer");
|
|
224
|
+
}
|
|
225
|
+
const r = derSignature.subarray(4, 4 + rLength);
|
|
226
|
+
const sTagOffset = 4 + rLength;
|
|
227
|
+
if (derSignature[sTagOffset] !== 0x02) {
|
|
228
|
+
throw malformedDer("missing INTEGER tag for s");
|
|
229
|
+
}
|
|
230
|
+
const sLength = derSignature[sTagOffset + 1];
|
|
231
|
+
if (sLength < 1 || sLength > 33)
|
|
232
|
+
throw malformedDer("s length out of range");
|
|
233
|
+
if (sTagOffset + 2 + sLength !== derSignature.length) {
|
|
234
|
+
throw malformedDer("s does not end exactly at the buffer end");
|
|
235
|
+
}
|
|
236
|
+
const s = derSignature.subarray(sTagOffset + 2, sTagOffset + 2 + sLength);
|
|
128
237
|
const rBigInt = BigInt("0x" + r.toString("hex"));
|
|
129
238
|
let sBigInt = BigInt("0x" + s.toString("hex"));
|
|
239
|
+
// Scalars must be in [1, n-1] — anything else can never verify on-chain.
|
|
240
|
+
if (rBigInt < 1n || rBigInt >= SECP256R1_CURVE_ORDER) {
|
|
241
|
+
throw malformedDer("r out of curve order range");
|
|
242
|
+
}
|
|
243
|
+
if (sBigInt < 1n || sBigInt >= SECP256R1_CURVE_ORDER) {
|
|
244
|
+
throw malformedDer("s out of curve order range");
|
|
245
|
+
}
|
|
130
246
|
// Enforce low-S.
|
|
131
247
|
const halfN = SECP256R1_CURVE_ORDER / 2n;
|
|
132
248
|
if (sBigInt > halfN) {
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,WAAW,EACX,0BAA0B,EA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AAC,CAAC;IAC9B,OAAO,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/validation.d.ts
CHANGED
|
@@ -23,10 +23,12 @@ export declare function validateAmount(amount: number, fieldName?: string): void
|
|
|
23
23
|
/**
|
|
24
24
|
* Validate a signer expiration.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* The contract types signer expiration as `Option<u64>` UNIX seconds, so the
|
|
27
|
+
* accepted range here is the `u64`-compatible safe-integer range: a
|
|
28
|
+
* non-negative integer up to `Number.MAX_SAFE_INTEGER` (the kit carries the
|
|
29
|
+
* value as a JS number before converting to `BigInt`). `undefined` means "no
|
|
30
|
+
* expiration". Capping at `u32` (the old bound) would reject post-2106
|
|
31
|
+
* timestamps the contract accepts.
|
|
30
32
|
*
|
|
31
33
|
* @throws {ValidationError} If the expiration is out of range.
|
|
32
34
|
*/
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,SAAY,GACpB,IAAI,CAmBN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAW,GAAG,IAAI,CAezE;AAED
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,SAAY,GACpB,IAAI,CAmBN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAW,GAAG,IAAI,CAezE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,SAAe,GACvB,IAAI,CAaN;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,UAAU,EACrB,SAAS,SAAc,GACtB,IAAI,CAeN"}
|
package/dist/validation.js
CHANGED
|
@@ -41,10 +41,12 @@ export function validateAmount(amount, fieldName = "amount") {
|
|
|
41
41
|
/**
|
|
42
42
|
* Validate a signer expiration.
|
|
43
43
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
44
|
+
* The contract types signer expiration as `Option<u64>` UNIX seconds, so the
|
|
45
|
+
* accepted range here is the `u64`-compatible safe-integer range: a
|
|
46
|
+
* non-negative integer up to `Number.MAX_SAFE_INTEGER` (the kit carries the
|
|
47
|
+
* value as a JS number before converting to `BigInt`). `undefined` means "no
|
|
48
|
+
* expiration". Capping at `u32` (the old bound) would reject post-2106
|
|
49
|
+
* timestamps the contract accepts.
|
|
48
50
|
*
|
|
49
51
|
* @throws {ValidationError} If the expiration is out of range.
|
|
50
52
|
*/
|
|
@@ -53,8 +55,8 @@ export function validateExpiration(expiration, fieldName = "expiration") {
|
|
|
53
55
|
return;
|
|
54
56
|
if (!Number.isInteger(expiration) ||
|
|
55
57
|
expiration < 0 ||
|
|
56
|
-
expiration >
|
|
57
|
-
throw new ValidationError(`${fieldName} must be a non-negative integer within
|
|
58
|
+
expiration > Number.MAX_SAFE_INTEGER) {
|
|
59
|
+
throw new ValidationError(`${fieldName} must be a non-negative integer (u64 UNIX seconds, within JS safe-integer range)`, PasskeyKitErrorCode.INVALID_INPUT, { field: fieldName, value: expiration });
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
/**
|
package/dist/validation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRo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EAC7D,mBAAmB,CAAC,kBAAkB,EACtC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAC3C,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passkey-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
|
|
5
5
|
"author": "Tyler van der Hoeven <tyler@stellar.org>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@openzeppelin/relayer-plugin-channels": "^0.20.0",
|
|
33
33
|
"@simplewebauthn/browser": "^13.3.0",
|
|
34
|
-
"@stellar/stellar-sdk": "16.0.
|
|
34
|
+
"@stellar/stellar-sdk": ">=16.0.0",
|
|
35
35
|
"base64url": "^3.0.1",
|
|
36
36
|
"buffer": "^6.0.3",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"sac-sdk": "0.4.3",
|
|
38
|
+
"passkey-kit-sdk": "0.8.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^24.6.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|
|
54
|
-
"url": "git+https://github.com/
|
|
54
|
+
"url": "git+https://github.com/stellar/passkey-kit.git"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"smart wallet",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"crypto"
|
|
68
68
|
],
|
|
69
69
|
"bugs": {
|
|
70
|
-
"url": "https://github.com/
|
|
70
|
+
"url": "https://github.com/stellar/passkey-kit/issues"
|
|
71
71
|
},
|
|
72
|
-
"homepage": "https://github.com/
|
|
72
|
+
"homepage": "https://github.com/stellar/passkey-kit/blob/main/README.md",
|
|
73
73
|
"scripts": {
|
|
74
74
|
"sync-version": "node scripts/sync-version.js",
|
|
75
75
|
"prebuild": "node scripts/sync-version.js",
|