passkey-kit 0.10.21 → 0.10.22
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passkey-kit",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.22",
|
|
4
4
|
"description": "A helper library for creating and using smart wallet accounts on the Stellar blockchain.",
|
|
5
5
|
"author": "Tyler van der Hoeven",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
"types": "types/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@simplewebauthn/browser": "^13.1.0",
|
|
12
|
-
"@stellar/stellar-sdk": "^13.
|
|
12
|
+
"@stellar/stellar-sdk": "^13.3.0",
|
|
13
13
|
"base64url": "^3.0.1",
|
|
14
14
|
"buffer": "^6.0.3",
|
|
15
|
-
"passkey-kit-sdk": "0.6.
|
|
16
|
-
"sac-sdk": "0.3.
|
|
15
|
+
"passkey-kit-sdk": "0.6.8",
|
|
16
|
+
"sac-sdk": "0.3.8"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@simplewebauthn/types": "^12.0.0",
|
|
20
|
-
"@types/node": "^22.
|
|
21
|
-
"typescript": "^5.8.
|
|
20
|
+
"@types/node": "^22.15.2",
|
|
21
|
+
"typescript": "^5.8.3"
|
|
22
22
|
},
|
|
23
23
|
"workspaces": [
|
|
24
24
|
"packages/*"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.
|
|
2
|
+
"version": "0.6.8",
|
|
3
3
|
"name": "passkey-kit-sdk",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"build": "tsc"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@stellar/stellar-sdk": "^13.
|
|
12
|
+
"@stellar/stellar-sdk": "^13.3.0",
|
|
13
13
|
"buffer": "^6.0.3"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"typescript": "^5.8.
|
|
16
|
+
"typescript": "^5.8.3"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.8",
|
|
3
3
|
"name": "sac-sdk",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "src/index.ts",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"build": "tsc"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@stellar/stellar-sdk": "^13.
|
|
12
|
+
"@stellar/stellar-sdk": "^13.3.0",
|
|
13
13
|
"buffer": "^6.0.3"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"typescript": "^5.8.
|
|
16
|
+
"typescript": "^5.8.3"
|
|
17
17
|
}
|
|
18
18
|
}
|
package/src/kit.ts
CHANGED
|
@@ -9,8 +9,6 @@ import { PasskeyBase } from './base'
|
|
|
9
9
|
import { AssembledTransaction, basicNodeSigner, DEFAULT_TIMEOUT, type AssembledTransactionOptions, type Tx } from '@stellar/stellar-sdk/minimal/contract'
|
|
10
10
|
import type { Server } from '@stellar/stellar-sdk/minimal/rpc'
|
|
11
11
|
|
|
12
|
-
// TODO default to 30 second timeouts
|
|
13
|
-
|
|
14
12
|
export class PasskeyKit extends PasskeyBase {
|
|
15
13
|
declare rpc: Server
|
|
16
14
|
declare rpcUrl: string
|
|
@@ -51,7 +49,7 @@ export class PasskeyKit extends PasskeyBase {
|
|
|
51
49
|
this.walletKeypair = Keypair.fromRawEd25519Seed(hash(Buffer.from('kalepail')));
|
|
52
50
|
this.walletPublicKey = this.walletKeypair.publicKey()
|
|
53
51
|
this.walletWasmHash = walletWasmHash
|
|
54
|
-
this.timeoutInSeconds = options.timeoutInSeconds ||
|
|
52
|
+
this.timeoutInSeconds = options.timeoutInSeconds || 30 // Launchtube requires <= 30 second timeout so let's default to that
|
|
55
53
|
this.WebAuthn = WebAuthn || { startRegistration, startAuthentication }
|
|
56
54
|
}
|
|
57
55
|
|
|
@@ -242,7 +240,7 @@ export class PasskeyKit extends PasskeyBase {
|
|
|
242
240
|
|
|
243
241
|
if (!expiration) {
|
|
244
242
|
const { sequence } = await this.rpc.getLatestLedger()
|
|
245
|
-
expiration = sequence +
|
|
243
|
+
expiration = sequence + this.timeoutInSeconds / 5; // assumes 5 second ledger time
|
|
246
244
|
}
|
|
247
245
|
}
|
|
248
246
|
|