passkey-kit 0.0.22 → 0.0.24

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.0.22",
3
+ "version": "0.0.24",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "types/index.d.ts",
@@ -12,9 +12,8 @@
12
12
  "bigint-conversion": "^2.4.3",
13
13
  "buffer": "^6.0.3",
14
14
  "cbor-x": "^1.5.9",
15
- "passkey-kit": "^0.0.20",
16
- "passkey-kit-sdk": "0.0.5",
17
- "passkey-factory-sdk": "0.0.5"
15
+ "passkey-factory-sdk": "0.0.6",
16
+ "passkey-kit-sdk": "0.0.6"
18
17
  },
19
18
  "devDependencies": {
20
19
  "typescript": "^5.4.5"
@@ -23,7 +22,7 @@
23
22
  "packages/*"
24
23
  ],
25
24
  "scripts": {
26
- "build:demo": "cd demo && pnpm i && pnpm run build",
25
+ "build:demo": "cd demo && pnpm --ignore-workspace install && pnpm run build",
27
26
  "build:pfs": "pnpm --filter ./packages/passkey-factory-sdk run build",
28
27
  "build:pks": "pnpm --filter ./packages/passkey-kit-sdk run build",
29
28
  "build": "pnpm run build:pfs && pnpm run build:pks && tsc"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.5",
2
+ "version": "0.0.6",
3
3
  "name": "passkey-factory-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -1,5 +1,4 @@
1
1
  import { Buffer } from "buffer";
2
- import { Address } from '@stellar/stellar-sdk';
3
2
  import {
4
3
  AssembledTransaction,
5
4
  Client as ContractClient,
@@ -7,29 +6,12 @@ import {
7
6
  Result,
8
7
  Spec as ContractSpec,
9
8
  } from '@stellar/stellar-sdk/contract';
10
- import type {
11
- u32,
12
- i32,
13
- u64,
14
- i64,
15
- u128,
16
- i128,
17
- u256,
18
- i256,
19
- Option,
20
- Typepoint,
21
- Duration,
22
- } from '@stellar/stellar-sdk/contract';
23
- export * from '@stellar/stellar-sdk'
24
- export * as contract from '@stellar/stellar-sdk/contract'
25
- export * as rpc from '@stellar/stellar-sdk/rpc'
26
9
 
27
10
  if (typeof window !== 'undefined') {
28
11
  //@ts-ignore Buffer exists
29
12
  window.Buffer = window.Buffer || Buffer;
30
13
  }
31
14
 
32
-
33
15
  export const networks = {
34
16
  testnet: {
35
17
  networkPassphrase: "Test SDF Network ; September 2015",
@@ -38,11 +20,11 @@ export const networks = {
38
20
  } as const
39
21
 
40
22
  export const Errors = {
41
- 1: {message:""},
42
- 2: {message:""},
43
- 3: {message:""},
44
- 4: {message:""},
45
- 5: {message:""}
23
+ 1: { message: "" },
24
+ 2: { message: "" },
25
+ 3: { message: "" },
26
+ 4: { message: "" },
27
+ 5: { message: "" }
46
28
  }
47
29
 
48
30
  export interface Client {
@@ -69,7 +51,7 @@ export interface Client {
69
51
  /**
70
52
  * Construct and simulate a init transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
71
53
  */
72
- init: ({wasm_hash}: {wasm_hash: Buffer}, options?: {
54
+ init: ({ wasm_hash }: { wasm_hash: Buffer }, options?: {
73
55
  /**
74
56
  * The fee to pay for the transaction. Default: BASE_FEE
75
57
  */
@@ -89,7 +71,7 @@ export interface Client {
89
71
  /**
90
72
  * Construct and simulate a deploy transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
91
73
  */
92
- deploy: ({id, pk}: {id: Buffer, pk: Buffer}, options?: {
74
+ deploy: ({ id, pk }: { id: Buffer, pk: Buffer }, options?: {
93
75
  /**
94
76
  * The fee to pay for the transaction. Default: BASE_FEE
95
77
  */
@@ -109,7 +91,7 @@ export interface Client {
109
91
  /**
110
92
  * Construct and simulate a add_sig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
111
93
  */
112
- add_sig: ({id, contract}: {id: Buffer, contract: string}, options?: {
94
+ add_sig: ({ id, contract }: { id: Buffer, contract: string }, options?: {
113
95
  /**
114
96
  * The fee to pay for the transaction. Default: BASE_FEE
115
97
  */
@@ -129,7 +111,7 @@ export interface Client {
129
111
  /**
130
112
  * Construct and simulate a rm_sig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
131
113
  */
132
- rm_sig: ({id, contract}: {id: Buffer, contract: string}, options?: {
114
+ rm_sig: ({ id, contract }: { id: Buffer, contract: string }, options?: {
133
115
  /**
134
116
  * The fee to pay for the transaction. Default: BASE_FEE
135
117
  */
@@ -150,20 +132,20 @@ export interface Client {
150
132
  export class Client extends ContractClient {
151
133
  constructor(public readonly options: ContractClientOptions) {
152
134
  super(
153
- new ContractSpec([ "AAAABAAAAAAAAAAAAAAABUVycm9yAAAAAAAABQAAAAAAAAAJTm90SW5pdGVkAAAAAAAAAQAAAAAAAAAITm90Rm91bmQAAAACAAAAAAAAAAxOb3RQZXJtaXR0ZWQAAAADAAAAAAAAAA1BbHJlYWR5SW5pdGVkAAAAAAAABAAAAAAAAAANQWxyZWFkeU1hcHBlZAAAAAAAAAU=",
135
+ new ContractSpec(["AAAABAAAAAAAAAAAAAAABUVycm9yAAAAAAAABQAAAAAAAAAJTm90SW5pdGVkAAAAAAAAAQAAAAAAAAAITm90Rm91bmQAAAACAAAAAAAAAAxOb3RQZXJtaXR0ZWQAAAADAAAAAAAAAA1BbHJlYWR5SW5pdGVkAAAAAAAABAAAAAAAAAANQWxyZWFkeU1hcHBlZAAAAAAAAAU=",
154
136
  "AAAAAAAAAAAAAAAKZXh0ZW5kX3R0bAAAAAAAAAAAAAA=",
155
137
  "AAAAAAAAAAAAAAAEaW5pdAAAAAEAAAAAAAAACXdhc21faGFzaAAAAAAAA+4AAAAgAAAAAQAAA+kAAAPtAAAAAAAAAAM=",
156
138
  "AAAAAAAAAAAAAAAGZGVwbG95AAAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAACcGsAAAAAA+4AAABBAAAAAQAAA+kAAAATAAAAAw==",
157
139
  "AAAAAAAAAAAAAAAHYWRkX3NpZwAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAAIY29udHJhY3QAAAATAAAAAQAAA+kAAAPtAAAAAAAAAAM=",
158
- "AAAAAAAAAAAAAAAGcm1fc2lnAAAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAAIY29udHJhY3QAAAATAAAAAQAAA+kAAAPtAAAAAAAAAAM=" ]),
140
+ "AAAAAAAAAAAAAAAGcm1fc2lnAAAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAAIY29udHJhY3QAAAATAAAAAQAAA+kAAAPtAAAAAAAAAAM="]),
159
141
  options
160
142
  )
161
143
  }
162
144
  public readonly fromJSON = {
163
145
  extend_ttl: this.txFromJSON<null>,
164
- init: this.txFromJSON<Result<void>>,
165
- deploy: this.txFromJSON<Result<string>>,
166
- add_sig: this.txFromJSON<Result<void>>,
167
- rm_sig: this.txFromJSON<Result<void>>
146
+ init: this.txFromJSON<Result<void>>,
147
+ deploy: this.txFromJSON<Result<string>>,
148
+ add_sig: this.txFromJSON<Result<void>>,
149
+ rm_sig: this.txFromJSON<Result<void>>
168
150
  }
169
151
  }
@@ -1,8 +1,5 @@
1
1
  import { Buffer } from "buffer";
2
2
  import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, Result } from '@stellar/stellar-sdk/contract';
3
- export * from '@stellar/stellar-sdk';
4
- export * as contract from '@stellar/stellar-sdk/contract';
5
- export * as rpc from '@stellar/stellar-sdk/rpc';
6
3
  export declare const networks: {
7
4
  readonly testnet: {
8
5
  readonly networkPassphrase: "Test SDF Network ; September 2015";
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.5",
2
+ "version": "0.0.6",
3
3
  "name": "passkey-kit-sdk",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
@@ -1,5 +1,4 @@
1
1
  import { Buffer } from "buffer";
2
- import { Address } from '@stellar/stellar-sdk';
3
2
  import {
4
3
  AssembledTransaction,
5
4
  Client as ContractClient,
@@ -7,22 +6,6 @@ import {
7
6
  Result,
8
7
  Spec as ContractSpec,
9
8
  } from '@stellar/stellar-sdk/contract';
10
- import type {
11
- u32,
12
- i32,
13
- u64,
14
- i64,
15
- u128,
16
- i128,
17
- u256,
18
- i256,
19
- Option,
20
- Typepoint,
21
- Duration,
22
- } from '@stellar/stellar-sdk/contract';
23
- export * from '@stellar/stellar-sdk'
24
- export * as contract from '@stellar/stellar-sdk/contract'
25
- export * as rpc from '@stellar/stellar-sdk/rpc'
26
9
 
27
10
  if (typeof window !== 'undefined') {
28
11
  //@ts-ignore Buffer exists
@@ -38,16 +21,16 @@ export const networks = {
38
21
  } as const
39
22
 
40
23
  export const Errors = {
41
- 1: {message:""},
42
- 2: {message:""},
43
- 3: {message:""},
44
- 4: {message:""},
45
- 5: {message:""},
46
- 6: {message:""},
47
- 7: {message:""},
48
- 8: {message:""},
49
- 9: {message:""},
50
- 10: {message:""}
24
+ 1: { message: "" },
25
+ 2: { message: "" },
26
+ 3: { message: "" },
27
+ 4: { message: "" },
28
+ 5: { message: "" },
29
+ 6: { message: "" },
30
+ 7: { message: "" },
31
+ 8: { message: "" },
32
+ 9: { message: "" },
33
+ 10: { message: "" }
51
34
  }
52
35
 
53
36
  export interface Signature {
@@ -57,7 +40,6 @@ export interface Signature {
57
40
  signature: Buffer;
58
41
  }
59
42
 
60
-
61
43
  export interface Client {
62
44
  /**
63
45
  * Construct and simulate a extend_ttl transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
@@ -82,7 +64,7 @@ export interface Client {
82
64
  /**
83
65
  * Construct and simulate a init transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
84
66
  */
85
- init: ({id, pk, factory}: {id: Buffer, pk: Buffer, factory: string}, options?: {
67
+ init: ({ id, pk, factory }: { id: Buffer, pk: Buffer, factory: string }, options?: {
86
68
  /**
87
69
  * The fee to pay for the transaction. Default: BASE_FEE
88
70
  */
@@ -102,7 +84,7 @@ export interface Client {
102
84
  /**
103
85
  * Construct and simulate a resudo transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
104
86
  */
105
- resudo: ({id}: {id: Buffer}, options?: {
87
+ resudo: ({ id }: { id: Buffer }, options?: {
106
88
  /**
107
89
  * The fee to pay for the transaction. Default: BASE_FEE
108
90
  */
@@ -122,7 +104,7 @@ export interface Client {
122
104
  /**
123
105
  * Construct and simulate a rm_sig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
124
106
  */
125
- rm_sig: ({id}: {id: Buffer}, options?: {
107
+ rm_sig: ({ id }: { id: Buffer }, options?: {
126
108
  /**
127
109
  * The fee to pay for the transaction. Default: BASE_FEE
128
110
  */
@@ -142,7 +124,7 @@ export interface Client {
142
124
  /**
143
125
  * Construct and simulate a add_sig transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
144
126
  */
145
- add_sig: ({id, pk}: {id: Buffer, pk: Buffer}, options?: {
127
+ add_sig: ({ id, pk }: { id: Buffer, pk: Buffer }, options?: {
146
128
  /**
147
129
  * The fee to pay for the transaction. Default: BASE_FEE
148
130
  */
@@ -162,22 +144,22 @@ export interface Client {
162
144
  export class Client extends ContractClient {
163
145
  constructor(public readonly options: ContractClientOptions) {
164
146
  super(
165
- new ContractSpec([ "AAAABAAAAAAAAAAAAAAABUVycm9yAAAAAAAACgAAAAAAAAAJTm90SW5pdGVkAAAAAAAAAQAAAAAAA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AAAAAJpZAAAAAAADgAAAAEAAAPpAAAD7QAAAAAAAAAD",
169
151
  "AAAAAAAAAAAAAAAGcm1fc2lnAAAAAAABAAAAAAAAAAJpZAAAAAAADgAAAAEAAAPpAAAD7QAAAAAAAAAD",
170
152
  "AAAAAAAAAAAAAAAHYWRkX3NpZwAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAACcGsAAAAAA+4AAABBAAAAAQAAA+kAAAPtAAAAAAAAAAM=",
171
153
  "AAAAAQAAAAAAAAAAAAAACVNpZ25hdHVyZQAAAAAAAAQAAAAAAAAAEmF1dGhlbnRpY2F0b3JfZGF0YQAAAAAADgAAAAAAAAAQY2xpZW50X2RhdGFfanNvbgAAAA4AAAAAAAAAAmlkAAAAAAAOAAAAAAAAAAlzaWduYXR1cmUAAAAAAAPuAAAAQA==",
172
- "AAAAAAAAAAAAAAAMX19jaGVja19hdXRoAAAAAwAAAAAAAAARc2lnbmF0dXJlX3BheWxvYWQAAAAAAAPuAAAAIAAAAAAAAAAJc2lnbmF0dXJlAAAAAAAH0AAAAAlTaWduYXR1cmUAAAAAAAAAAAAADWF1dGhfY29udGV4dHMAAAAAAAPqAAAH0AAAAAdDb250ZXh0AAAAAAEAAAPpAAAD7QAAAAAAAAAD" ]),
154
+ "AAAAAAAAAAAAAAAMX19jaGVja19hdXRoAAAAAwAAAAAAAAARc2lnbmF0dXJlX3BheWxvYWQAAAAAAAPuAAAAIAAAAAAAAAAJc2lnbmF0dXJlAAAAAAAH0AAAAAlTaWduYXR1cmUAAAAAAAAAAAAADWF1dGhfY29udGV4dHMAAAAAAAPqAAAH0AAAAAdDb250ZXh0AAAAAAEAAAPpAAAD7QAAAAAAAAAD"]),
173
155
  options
174
156
  )
175
157
  }
176
158
  public readonly fromJSON = {
177
159
  extend_ttl: this.txFromJSON<null>,
178
- init: this.txFromJSON<Result<void>>,
179
- resudo: this.txFromJSON<Result<void>>,
180
- rm_sig: this.txFromJSON<Result<void>>,
181
- add_sig: this.txFromJSON<Result<void>>,
160
+ init: this.txFromJSON<Result<void>>,
161
+ resudo: this.txFromJSON<Result<void>>,
162
+ rm_sig: this.txFromJSON<Result<void>>,
163
+ add_sig: this.txFromJSON<Result<void>>,
182
164
  }
183
165
  }
@@ -1,8 +1,5 @@
1
1
  import { Buffer } from "buffer";
2
2
  import { AssembledTransaction, Client as ContractClient, ClientOptions as ContractClientOptions, Result } from '@stellar/stellar-sdk/contract';
3
- export * from '@stellar/stellar-sdk';
4
- export * as contract from '@stellar/stellar-sdk/contract';
5
- export * as rpc from '@stellar/stellar-sdk/rpc';
6
3
  export declare const networks: {
7
4
  readonly testnet: {
8
5
  readonly networkPassphrase: "Test SDF Network ; September 2015";