passkey-kit 0.9.3 → 0.9.4

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.9.3",
3
+ "version": "0.9.4",
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
@@ -400,7 +400,10 @@ export class PasskeyKit extends PasskeyBase {
400
400
  return txn
401
401
  }
402
402
 
403
- public addSecp256r1(keyId: Uint8Array, publicKey: Uint8Array, limits: SignerLimits, store: SignerStore) {
403
+ public addSecp256r1(keyId: string | Uint8Array, publicKey: string | Uint8Array, limits: SignerLimits, store: SignerStore) {
404
+ keyId = typeof keyId === 'string' ? base64url.toBuffer(keyId) : keyId
405
+ publicKey = typeof publicKey === 'string' ? base64url.toBuffer(publicKey) : publicKey
406
+
404
407
  return this.wallet!.add({
405
408
  signer: {
406
409
  tag: "Secp256r1",
package/types/kit.d.ts CHANGED
@@ -64,7 +64,7 @@ export declare class PasskeyKit extends PasskeyBase {
64
64
  policy?: string;
65
65
  expiration?: number;
66
66
  }): Promise<AssembledTransaction<T>>;
67
- addSecp256r1(keyId: Uint8Array, publicKey: Uint8Array, limits: SignerLimits, store: SignerStore): Promise<AssembledTransaction<import("@stellar/stellar-sdk/contract").Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>>;
67
+ addSecp256r1(keyId: string | Uint8Array, publicKey: string | Uint8Array, limits: SignerLimits, store: SignerStore): Promise<AssembledTransaction<import("@stellar/stellar-sdk/contract").Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>>;
68
68
  addEd25519(publicKey: string, limits: SignerLimits, store: SignerStore): Promise<AssembledTransaction<import("@stellar/stellar-sdk/contract").Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>>;
69
69
  addPolicy(policy: string, limits: SignerLimits, store: SignerStore): Promise<AssembledTransaction<import("@stellar/stellar-sdk/contract").Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>>;
70
70
  remove(signer: SignerKey): Promise<AssembledTransaction<import("@stellar/stellar-sdk/contract").Result<void, import("@stellar/stellar-sdk/contract").ErrorMessage>>>;