Skip to content

Commit

Permalink
Deprecate Tezbridge (#2105)
Browse files Browse the repository at this point in the history
* 1630 ballot operation support in contract API (#2050)

* added estimate and contract ballot operation support

* added rpc contract provider for ballot op

* updated implementation and added docs

* added property in OperationContentsAndResultBallot and added unit test

* remove metadata property from ballot

* addressed PR comments

* updated yarn and package-lock

* cleaned up comments and switched out async for promise in op emitter

* removed unnecessary line break

* 660 support customize parser options (#2061)

* feat: exposed setParserProvider configuration through TezosToolkit

re #660

* test: added integration tests using setParserProvider with TezosToolkit

re #660

* docs: updated starting production server commands with taquito-test-dapp readme.md

* test: removed unnecessory console.log

re #660

* chore: update vite to latest version

* docs: fixed some typos in doc to address comments

re #660

* refactor: deprecate tezbridge and related

* contract-security-non-existent-KT-address: use rpc (#2091)

* refactor: deprecate tezbridge and related

Co-authored-by: Davis Sawali <[email protected]>
Co-authored-by: hui-an-yang <[email protected]>
Co-authored-by: Arvid Jakobsson <[email protected]>
Co-authored-by: Roxane Létourneau <[email protected]>
  • Loading branch information
5 people authored Nov 8, 2022
1 parent ec2e3b1 commit 6c23351
Show file tree
Hide file tree
Showing 25 changed files with 1,026 additions and 31,221 deletions.
49 changes: 5 additions & 44 deletions docs/wallet_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ yarn add @taquito/taquito

Make sure you have the latest version (`7.1.0` when this article was written, but the API became available from `6.3.2-beta.0`).

Once the package is downloaded, you can install the wallet of your choice. The wallet API supports different kinds of wallets. _Beacon_, _Temple_ and _TezBridge_ (deprecated v13) wallets are available to use at the moment. You can install one or multiple wallets according to your needs:
Once the package is downloaded, you can install the wallet of your choice. The wallet API supports different kinds of wallets. The _Beacon_ and _Temple_ wallets are available to use at the moment. You can install one or both wallets, depending on your requirements:

```
npm install @taquito/tezbridge-wallet
npm install @taquito/beacon-wallet
npm install @temple-wallet/dapp
```

Remember that some wallets may require an extra step in addition to the package installation. For example, TezBridge (deprecated v13) requires a plugin file, Temple must be used with an extension installed in the browser. We will explain the requirements for the different wallets in detail in the sections below.
Remember that some wallets may require an extra step in addition to the package installation. For example, Temple must be used with an extension installed in the browser. We will explain the requirements for the different wallets in detail in the sections below.

## Connecting the wallet

Expand Down Expand Up @@ -132,7 +129,7 @@ Tezos.setWalletProvider(wallet);

### - Development wallets

During the development of your dapp, you may prefer a less "user-friendly" option that gives you more information and details than a more user-friendly wallet. You may also want to install and set up a wallet quickly that requires less boilerplate than the Beacon SDK. In these cases, you can choose between the Tezbridge wallet(deprecated v13) (for more details in a lightweight format) and the Temple Wallet (for a quick setup using the Temple wallet extension).
During the development of your dapp, you may prefer a less "user-friendly" option that gives you more information and details than a more user-friendly wallet. You may also want to install and set up a wallet quickly that requires less boilerplate than the Beacon SDK. In these cases, use the Temple Wallet (for a quick setup using the Temple wallet extension).

- Temple wallet

Expand Down Expand Up @@ -194,7 +191,7 @@ Tezos.setProvider({ wallet });

#### Try the Temple wallet!

Make sure you have the Temple browser extension installed first.
*Make sure you have the Temple browser extension installed first.*

```js live noInline noConfig
//import { TempleWallet } from '@temple-wallet/dapp';
Expand All @@ -214,45 +211,9 @@ TempleWallet.isAvailable()
.catch((err) => console.log(err));
```

- TezBridge wallet (deprecated v13)

> Note that the TezBridge wallet may not work correctly since the Delphi upgrade might be deprecated in the future.
First, we have to import the TezBridge wallet from the package:

```js
import { TezBridgeWallet } from '@taquito/tezbridge-wallet';
```

Next, we can set up the wallet. In general, you will give your dapp users the choice of the wallet they prefer, so the wallet initialization wouldn't happen when the dapp is mounted but after user's interaction, for example, after pressing a button. It is important to remember that you have to import the TezBridge class in your HTML file before setting up your wallet, or this will throw an error:

```js
<script src="https://www.tezbridge.com/plugin.js"></script>
```

To set up TezBridge as your wallet, you use the `setWalletProvider` method of the `Tezos` singleton instance and pass a new instance of the `TezBridgeWallet` class:

```js
Tezos.setWalletProvider(new TezBridgeWallet());
```

or

```js
Tezos.setProvider({ wallet: new TezBridgeWallet() });
```

Please note that you don't need to interact directly with the `tezbridge` object that the plugin injects in the `window` object. Taquito will take care of it. You can even get the user's address using the TezBridgeWallet instance like so:

```js
const wallet = new TezBridgeWallet();
Tezos.setWalletProvider(wallet);
const userAddress = await wallet.getPKH();
```

## Making transfers

Although it is possible to transfer tokens directly from the wallets, Taquito offers to send tokens programmatically. This method could be a better solution if you want to do calculations before sending the tokens or if the amount of tokens to send is based on a variable value. This could also be preferable to avoid manual inputs that can often be a source of errors. Using Taquito to send tokens only requires to sign a transaction, sit back and relax :)
Although it is possible to transfer tokens directly from the wallets, Taquito can send tokens *programmatically*. This method could be a better solution if you want to do calculations before sending the tokens, or if the amount of tokens to send is based on a variable value. It is also preferable to avoid manual inputs, which are often a source of errors. Using Taquito to send tokens only requires to sign a transaction, sit back and relax :)

### - Transfer between implicit accounts

Expand Down
Loading

0 comments on commit 6c23351

Please sign in to comment.