You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/apis/wallets/browserwallet.mdx
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,11 +45,11 @@ Example response:
45
45
46
46
## Connect Wallet
47
47
48
-
This is the entrypoint to start communication with the user's wallet. The wallet should request the user's permission to connect the web page to the user's wallet, and if permission has been granted, the wallet will be returned and exposing the full API for the app to use.
48
+
This is the entry point to start communication with the user's wallet. The wallet should request the user's permission to connect the web page to the user's wallet, and if permission has been granted, the wallet will be returned, exposing the full API for the app to use.
49
49
50
50
Query `BrowserWallet.getAvailableWallets()` to get a list of available wallets, then provide the wallet `name` for which wallet the user would like to connect with.
51
51
52
-
You can also provide an `extensions` object to enable specific CIPs. For Example response, to enable CIP95, you would pass:
52
+
You can also provide an `extensions` object to enable specific CIPs. For example, to enable CIP95, you would pass:
53
53
54
54
```tsx
55
55
awaitBrowserWallet.enable('eternl', [95]);
@@ -126,9 +126,9 @@ Applications can use this API to manage transaction outputs effectively, ensurin
126
126
127
127
## Get Collateral
128
128
129
-
This API retrieves a list of UTXOs (unspent transaction outputs) controlled by the wallet that can be used as collateral inputs for transactions involving Plutus scripts. The returned UTXOs must meet or exceed the specified ADA value target.
129
+
This API retrieves a list of UTXOs (unspent transaction outputs), controlled by the wallet, that can be used as collateral inputs for transactions involving Plutus scripts. The returned UTXOs must meet or exceed the specified ADA value target.
130
130
131
-
If the target cannot be met, an error message will be returned explaining the issue. Wallets may return UTXOs with a greater total ADA value than requested but must never return UTXOs with a smaller total value.
131
+
If the target cannot be met, an error message will be returned explaining the issue. Wallets may return UTXOs with a greater total ADA value than requested, but must never return UTXOs with a smaller total value.
132
132
133
133
This functionality is essential for applications that need to create transactions requiring collateral inputs.
134
134
@@ -293,7 +293,7 @@ Example response:
293
293
294
294
## Sign Data
295
295
296
-
This endpoint utilizes the CIP-8 - Message Signing to sign arbitrary data, to verify the data was signed by the owner of the private key.
296
+
This endpoint uses CIP-8 message signing to sign arbitrary data and verify that the signature comes from the holder of the corresponding private key.
297
297
298
298
`signData` takes two arguments, the first one is the payload to sign and the second one is the address (optional).
299
299
@@ -319,7 +319,7 @@ Example response:
319
319
}
320
320
```
321
321
322
-
Continue reading this guide to learn how to verify the signature.
322
+
Check out [this guide](https://meshjs.dev/guides/prove-wallet-ownership#server-verify-signature) to learn how to verify the signature.
323
323
324
324
325
325
## Sign Transaction
@@ -335,15 +335,13 @@ Requests user to sign the provided transaction (`tx`). The wallet should ask the
Check out Transaction to learn more on how to use this API.
338
+
Check out [Transaction](https://docs.meshjs.dev/transactions) to learn more on how to use this API.
339
339
</Card>
340
340
341
341
342
342
## Submit Transaction
343
343
344
-
Wallets inherently have the ability to submit transactions. This API allows applications to request the wallet to send a transaction. If the wallet accepts the transaction and successfully sends it, it will return the transaction ID, enabling the application to track its status. In case of errors during submission, the wallet will provide error messages or failure details.
345
-
346
-
This functionality is useful for applications that need to interact with the blockchain by submitting signed transactions through the user's wallet.
344
+
This API lets applications ask a wallet to submit signed transactions. On success, the wallet returns a transaction ID for tracking. On failure, it returns error details.
347
345
348
346
<Card>
349
347
#### Submit Transaction [!toc]
@@ -354,13 +352,13 @@ This functionality is useful for applications that need to interact with the blo
354
352
consttxHash=awaitwallet.submitTx(signedTx);
355
353
```
356
354
357
-
Check out Transaction to learn more on how to use this API.
355
+
Check out [Transaction](https://docs.meshjs.dev/transactions) to learn more on how to use this API.
358
356
</Card>
359
357
360
358
361
359
## Get Assests
362
360
363
-
Returns a list of assets in wallet excluding lovelace.
361
+
Returns a list of assets in the wallet, excluding lovelace.
364
362
365
363
<Card>
366
364
#### Get Assets [!toc]
@@ -402,7 +400,7 @@ Applications can use this information to display the wallet's balance or perform
402
400
<Card>
403
401
#### Get Lovelace [!toc]
404
402
405
-
Get amount of ADA in connected wallet
403
+
Get amount of ADA in the connected wallet
406
404
407
405
```tsx
408
406
awaitwallet.getLovelace();
@@ -568,4 +566,4 @@ Get a list of unregistered public stake keys.
0 commit comments