passkey-kit 0.9.2 → 0.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passkey-kit",
3
- "version": "0.9.2",
3
+ "version": "0.9.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",
@@ -13,8 +13,8 @@
13
13
  "base64url": "^3.0.1",
14
14
  "buffer": "^6.0.3",
15
15
  "passkey-factory-sdk": "0.4.1",
16
- "sac-sdk": "0.2.1",
17
- "passkey-kit-sdk": "0.4.1"
16
+ "passkey-kit-sdk": "0.4.1",
17
+ "sac-sdk": "0.2.1"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@simplewebauthn/types": "^10.0.0",
package/src/server.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SorobanRpc, xdr } from "@stellar/stellar-sdk/minimal"
1
+ import { SorobanRpc, Transaction, xdr } from "@stellar/stellar-sdk/minimal"
2
2
  import { PasskeyBase } from "./base"
3
3
  import base64url from "base64url"
4
4
  import type { Tx } from "@stellar/stellar-sdk/contract"
@@ -145,13 +145,13 @@ export class PasskeyServer extends PasskeyBase {
145
145
  - Add a method for getting a paginated or filtered list of all a wallet's events
146
146
  */
147
147
 
148
- public async send(txn: Tx, fee?: number) {
148
+ public async send(txn: Tx | string, fee?: number) {
149
149
  if (!this.launchtubeUrl || !this.launchtubeJwt)
150
150
  throw new Error('Launchtube service not configured')
151
151
 
152
152
  const data = new FormData();
153
153
 
154
- data.set('xdr', txn.toXDR());
154
+ data.set('xdr', typeof txn === 'string' ? txn : txn.toXDR());
155
155
 
156
156
  if (fee)
157
157
  data.set('fee', fee.toString());
package/types/server.d.ts CHANGED
@@ -26,5 +26,5 @@ export declare class PasskeyServer extends PasskeyBase {
26
26
  publicKey?: string;
27
27
  policy?: string;
28
28
  }, index?: number): Promise<string>;
29
- send(txn: Tx, fee?: number): Promise<any>;
29
+ send(txn: Tx | string, fee?: number): Promise<any>;
30
30
  }