passkey-kit 0.2.3 → 0.2.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 +3 -3
- package/src/kit.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passkey-kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "A helper library for creating and using passkey accounts on the Stellar blockchain.",
|
|
5
5
|
"author": "Tyler van der Hoeven",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"bigint-conversion": "^2.4.3",
|
|
15
15
|
"buffer": "^6.0.3",
|
|
16
16
|
"cbor-x": "^1.5.9",
|
|
17
|
-
"passkey-
|
|
18
|
-
"passkey-
|
|
17
|
+
"passkey-kit-sdk": "0.0.8",
|
|
18
|
+
"passkey-factory-sdk": "0.0.8"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"typescript": "^5.4.5"
|
package/src/kit.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client as PasskeyClient } from 'passkey-kit-sdk'
|
|
2
2
|
import { Client as FactoryClient, networks } from 'passkey-factory-sdk'
|
|
3
|
-
import { Address, Networks, StrKey, hash, xdr, Transaction, SorobanRpc, Operation, scValToNative, TransactionBuilder
|
|
3
|
+
import { Address, Networks, StrKey, hash, xdr, Transaction, SorobanRpc, Operation, scValToNative, TransactionBuilder } from '@stellar/stellar-sdk'
|
|
4
4
|
import { bufToBigint, bigintToBuf } from 'bigint-conversion'
|
|
5
5
|
import base64url from 'base64url'
|
|
6
6
|
import { startRegistration, startAuthentication } from "@simplewebauthn/browser"
|
|
@@ -169,8 +169,8 @@ export class PasskeyKit extends PasskeyBase {
|
|
|
169
169
|
}
|
|
170
170
|
// if that fails look up from the factory mapper
|
|
171
171
|
catch {
|
|
172
|
-
|
|
173
|
-
contractId = scValToNative(
|
|
172
|
+
const { val } = await this.rpc.getContractData(this.factoryContractId, xdr.ScVal.scvBytes(keyIdBuffer))
|
|
173
|
+
contractId = scValToNative(val.contractData().val())
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
this.wallet = new PasskeyClient({
|