passkey-kit 0.10.14 → 0.10.15

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.14",
3
+ "version": "0.10.15",
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
@@ -135,9 +135,10 @@ export class PasskeyKit extends PasskeyBase {
135
135
  public async connectWallet(opts?: {
136
136
  rpId?: string,
137
137
  keyId?: string | Uint8Array,
138
- getContractId?: (keyId: string) => Promise<string | undefined>
138
+ getContractId?: (keyId: string) => Promise<string | undefined>,
139
+ walletPublicKey?: string // TEMP for backwards compatibility when we seeded wallets from a factory address
139
140
  }) {
140
- let { keyId, rpId, getContractId } = opts || {}
141
+ let { keyId, rpId, getContractId, walletPublicKey } = opts || {}
141
142
  let keyIdBuffer: Buffer
142
143
 
143
144
  if (!keyId) {
@@ -168,7 +169,7 @@ export class PasskeyKit extends PasskeyBase {
168
169
  networkId: hash(Buffer.from(this.networkPassphrase)),
169
170
  contractIdPreimage: xdr.ContractIdPreimage.contractIdPreimageFromAddress(
170
171
  new xdr.ContractIdPreimageFromAddress({
171
- address: Address.fromString(this.walletPublicKey).toScAddress(),
172
+ address: Address.fromString(walletPublicKey || this.walletPublicKey).toScAddress(),
172
173
  salt: hash(keyIdBuffer),
173
174
  })
174
175
  )
package/types/kit.d.ts CHANGED
@@ -44,6 +44,7 @@ export declare class PasskeyKit extends PasskeyBase {
44
44
  rpId?: string;
45
45
  keyId?: string | Uint8Array;
46
46
  getContractId?: (keyId: string) => Promise<string | undefined>;
47
+ walletPublicKey?: string;
47
48
  }): Promise<{
48
49
  keyId: Buffer<ArrayBufferLike>;
49
50
  keyIdBase64: string;