@txnlab/use-wallet-passkey 5.2.0-next.5 → 5.2.0
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/README.md +6 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -165,10 +165,12 @@ Tell users to **import the phrase as a Falcon / quantum account**: in Lute, Add
|
|
|
165
165
|
|
|
166
166
|
### Moving to a wallet
|
|
167
167
|
|
|
168
|
-
Give users a way to move to a wallet they control, such as Pera
|
|
168
|
+
Give users a way to move to a wallet they control, such as Pera or Lute. After that, a compromise of your site can't reach their funds. There are two ways:
|
|
169
169
|
|
|
170
170
|
- **Close the account:** send the whole balance to the wallet with `closeRemainderTo`. An account that still holds assets or app opt-ins can't close, so send or opt out of those first, or rekey instead.
|
|
171
|
-
- **Rekey it:** keep the address, and give its signing authority to the wallet's account with `rekeyTo`. The passkey can no longer sign for it, so disconnect the passkey account afterwards.
|
|
171
|
+
- **Rekey it:** keep the address, and give its signing authority to the wallet's account with `rekeyTo`. The passkey can no longer sign for it, so disconnect the passkey account afterwards: until then, signing still runs a passkey prompt, and the network rejects the result. To use the address, the user needs a wallet that supports both Falcon accounts and rekeyed accounts. Rekeying to a regular (ed25519) account gives up post-quantum protection, and its transactions pay the regular fee again.
|
|
172
|
+
|
|
173
|
+
The adapter only signs for the passkey account's own address, so don't rekey other accounts _to_ a passkey account: it can't sign for them.
|
|
172
174
|
|
|
173
175
|
```typescript
|
|
174
176
|
import algosdk from 'algosdk'
|
|
@@ -197,6 +199,8 @@ const rekey = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
|
|
|
197
199
|
suggestedParams
|
|
198
200
|
})
|
|
199
201
|
|
|
202
|
+
// Sign from the user's tap, after building the transaction: on iOS, an await
|
|
203
|
+
// before the passkey prompt loses the tap (or unlock() first; see above)
|
|
200
204
|
const [signed] = await wallet.signTransactions([close]) // or [rekey]
|
|
201
205
|
await manager.algodClient.sendRawTransaction(signed!).do()
|
|
202
206
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@txnlab/use-wallet-passkey",
|
|
3
|
-
"version": "5.2.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"algosdk": "^3.7.0",
|
|
34
|
-
"@txnlab/use-wallet": "^5.2.0
|
|
34
|
+
"@txnlab/use-wallet": "^5.2.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@noble/hashes": "1.8.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"falcon-1024": "0.2.0",
|
|
43
43
|
"tsdown": "0.23.1",
|
|
44
44
|
"typescript": "5.9.3",
|
|
45
|
-
"@txnlab/use-wallet": "5.2.0
|
|
45
|
+
"@txnlab/use-wallet": "5.2.0"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build:worker": "tsdown -c tsdown.worker.config.ts && node scripts/embed-worker.mjs",
|