passkey-kit 0.0.28 → 0.0.30

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/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Tyler van der Hoeven
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -10,7 +10,4 @@ To build:
10
10
 
11
11
  ```bash
12
12
  pnpm run build
13
- ```
14
-
15
- To check size inspect the demo/src/passkey-kit/index.js file.
16
- e.g. `ls -l demo/src/passkey-kit/index.js`
13
+ ```
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
+ "description": "A helper library for creating and using passkey accounts on the Stellar blockchain.",
5
+ "author": "Tyler van der Hoeven",
6
+ "license": "MIT",
4
7
  "type": "module",
5
8
  "main": "src/index.ts",
6
9
  "types": "types/index.d.ts",
7
10
  "dependencies": {
8
11
  "@simplewebauthn/browser": "^10.0.0",
9
12
  "@simplewebauthn/types": "^10.0.0",
10
- "@stellar/stellar-sdk": "12.0.0-rc.3",
13
+ "@stellar/stellar-sdk": "12.0.1",
11
14
  "base64url": "^3.0.1",
12
15
  "bigint-conversion": "^2.4.3",
13
16
  "buffer": "^6.0.3",
14
17
  "cbor-x": "^1.5.9",
15
- "passkey-factory-sdk": "0.0.6",
16
- "passkey-kit-sdk": "0.0.6"
18
+ "passkey-kit-sdk": "0.0.7",
19
+ "passkey-factory-sdk": "0.0.7"
17
20
  },
18
21
  "devDependencies": {
19
22
  "typescript": "^5.4.5"
@@ -21,6 +24,25 @@
21
24
  "workspaces": [
22
25
  "packages/*"
23
26
  ],
27
+ "engine": {
28
+ "node": ">=20"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/kalepail/passkey-kit.git"
33
+ },
34
+ "keywords": [
35
+ "smart wallet",
36
+ "passkey",
37
+ "webaauthn",
38
+ "blockchain",
39
+ "stellar",
40
+ "web3"
41
+ ],
42
+ "bugs": {
43
+ "url": "https://github.com/kalepail/passkey-kit/issues"
44
+ },
45
+ "homepage": "https://github.com/kalepail/passkey-kit/blob/main/README.md",
24
46
  "scripts": {
25
47
  "build:demo": "cd demo && pnpm --ignore-workspace install && pnpm run build",
26
48
  "build:pfs": "pnpm --filter ./packages/passkey-factory-sdk run build",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.6",
2
+ "version": "0.0.7",
3
3
  "name": "passkey-factory-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "buffer": "6.0.3",
13
- "@stellar/stellar-sdk": "12.0.0-rc.3"
13
+ "@stellar/stellar-sdk": "12.0.1"
14
14
  },
15
15
  "devDependencies": {
16
16
  "typescript": "5.4.5"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.6",
2
+ "version": "0.0.7",
3
3
  "name": "passkey-kit-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "buffer": "6.0.3",
13
- "@stellar/stellar-sdk": "12.0.0-rc.3"
13
+ "@stellar/stellar-sdk": "12.0.1"
14
14
  },
15
15
  "devDependencies": {
16
16
  "typescript": "5.4.5"
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ import { bufToBigint, bigintToBuf } from 'bigint-conversion'
5
5
  import base64url from 'base64url'
6
6
  import { startRegistration, startAuthentication } from "@simplewebauthn/browser"
7
7
  import { decode } from 'cbor-x/decode'
8
- import type { AuthenticationResponseJSON, RegistrationResponseJSON } from '@simplewebauthn/types';
8
+ import type { RegistrationResponseJSON } from '@simplewebauthn/types';
9
9
  import { Buffer } from 'buffer'
10
10
 
11
11
  /* TODO
@@ -29,6 +29,11 @@ export class PasskeyAccount {
29
29
  public feeBumpJwt: string
30
30
  public factoryContractId: string = networks.testnet.contractId
31
31
 
32
+ /* TODO
33
+ - Consider adding the ability to pass in a keyId and maybe even a contractId in order to preconnect to a wallet
34
+ If just a keyId call connectWallet in order to get the contractId
35
+ If both keyId and contractId are passed in then we can skip the connectWallet call (though we won't get the sudoKeyId in that case)
36
+ */
32
37
  constructor(options: {
33
38
  sequencePublicKey: string,
34
39
  networkPassphrase: Networks,