passkey-kit 0.11.2 → 0.11.3

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.
@@ -0,0 +1,9 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch"
5
+ ],
6
+ "deny": [],
7
+ "ask": []
8
+ }
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
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",
package/src/kit.ts CHANGED
@@ -8,6 +8,9 @@ import { PasskeyBase } from './base'
8
8
  import { AssembledTransaction, basicNodeSigner, type AssembledTransactionOptions, type Tx } from '@stellar/stellar-sdk/minimal/contract'
9
9
  import type { Server } from '@stellar/stellar-sdk/minimal/rpc'
10
10
 
11
+ // TODO we should allow setting the rpId in the constructor so we don't have to keep setting it for every call
12
+ // e.g. if you want to sign with a smol.xyz key on next.smol.xyz key you have to set rpId over and over again
13
+
11
14
  export class PasskeyKit extends PasskeyBase {
12
15
  declare rpc: Server
13
16
  declare rpcUrl: string
@@ -52,8 +55,15 @@ export class PasskeyKit extends PasskeyBase {
52
55
  this.WebAuthn = WebAuthn || { startRegistration, startAuthentication }
53
56
  }
54
57
 
55
- public async createWallet(app: string, user: string) {
56
- const { rawResponse, keyId, keyIdBase64, publicKey } = await this.createKey(app, user)
58
+ public async createWallet(
59
+ app: string,
60
+ user: string,
61
+ settings?: {
62
+ rpId?: string
63
+ authenticatorSelection?: AuthenticatorSelectionCriteria
64
+ }
65
+ ) {
66
+ const { rawResponse, keyId, keyIdBase64, publicKey } = await this.createKey(app, user, settings)
57
67
 
58
68
  const at = await PasskeyClient.deploy(
59
69
  {
package/types/kit.d.ts CHANGED
@@ -27,7 +27,10 @@ export declare class PasskeyKit extends PasskeyBase {
27
27
  startAuthentication: typeof startAuthentication;
28
28
  };
29
29
  });
30
- createWallet(app: string, user: string): Promise<{
30
+ createWallet(app: string, user: string, settings?: {
31
+ rpId?: string;
32
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
33
+ }): Promise<{
31
34
  rawResponse: import("@simplewebauthn/browser").RegistrationResponseJSON;
32
35
  keyId: Buffer<ArrayBufferLike>;
33
36
  keyIdBase64: string;