From 4871f03155be8dfce81ff24cb45fe0e3049c7646 Mon Sep 17 00:00:00 2001 From: Davis Sawali Date: Fri, 31 May 2024 14:09:36 -0700 Subject: [PATCH] chore(releng) bump version to 20.0.0 --- apps/taquito-test-dapp/package.json | 10 +- docs/version.md | 101 +++ example/package.json | 22 +- integration-tests/package.json | 30 +- lerna.json | 2 +- package-lock.json | 204 +++--- packages/taquito-beacon-wallet/package.json | 6 +- packages/taquito-beacon-wallet/src/version.ts | 4 +- .../taquito-contracts-library/package.json | 10 +- .../taquito-contracts-library/src/version.ts | 4 +- packages/taquito-core/package.json | 2 +- packages/taquito-core/src/version.ts | 4 +- packages/taquito-http-utils/package.json | 4 +- packages/taquito-http-utils/src/version.ts | 4 +- packages/taquito-ledger-signer/package.json | 8 +- packages/taquito-ledger-signer/src/version.ts | 4 +- packages/taquito-local-forging/package.json | 8 +- packages/taquito-local-forging/src/version.ts | 4 +- .../pack-test-tool/package.json | 4 +- packages/taquito-michel-codec/package.json | 4 +- packages/taquito-michel-codec/src/version.ts | 4 +- .../taquito-michelson-encoder/package.json | 8 +- .../taquito-michelson-encoder/src/version.ts | 4 +- packages/taquito-remote-signer/package.json | 10 +- packages/taquito-remote-signer/src/version.ts | 4 +- packages/taquito-rpc/package.json | 8 +- packages/taquito-rpc/src/version.ts | 4 +- packages/taquito-sapling/package.json | 10 +- packages/taquito-sapling/src/version.ts | 4 +- packages/taquito-signer/package.json | 8 +- packages/taquito-signer/src/version.ts | 4 +- packages/taquito-timelock/package.json | 8 +- packages/taquito-timelock/src/version.ts | 4 +- packages/taquito-tzip12/package.json | 10 +- packages/taquito-tzip12/src/version.ts | 4 +- packages/taquito-tzip16/package.json | 14 +- packages/taquito-tzip16/src/version.ts | 4 +- packages/taquito-utils/package.json | 4 +- packages/taquito-utils/src/version.ts | 4 +- packages/taquito/README.md | 2 +- packages/taquito/assets-manifest.json | 2 +- packages/taquito/package.json | 16 +- packages/taquito/src/version.ts | 4 +- website/package-lock.json | 106 +-- website/package.json | 2 +- .../version-17.4.0/mobile_bundle.md | 26 - .../rpc_nodes_integration_test.md | 81 --- .../version-17.4.0/smart_rollups.md | 67 -- .../version-17.4.0/tx_rollups.md | 108 --- .../ballot.md | 0 .../batch-api.md | 13 +- .../beaconwallet-singleton.md | 0 .../cancel_http_requests.md | 53 +- .../chatbot.md | 0 .../complex_parameters.md | 6 +- .../confirmation_event_stream.md | 0 .../consensus_key.md | 2 +- .../contract-test-collection.md | 32 +- .../contract_call_parameters.md | 4 + .../contracts-library.md | 0 .../dapp_prelaunch.md | 2 +- .../dapp_template.md | 0 .../drain_account.md | 12 +- .../estimate.md | 4 + .../events.md | 14 +- .../fa2_parameters.md | 0 .../failing_noop.md | 0 .../failwith_errors.md | 0 .../forger.md | 0 .../global_constant.md | 0 .../images/Tzip16ExecuteView.png | Bin .../images/diagramTzip16Metadata.png | Bin .../images/github.png | Bin .../images/gitlab.png | Bin .../increase_paid_storage.md | 4 +- .../inmemory_signer.md | 28 +- .../lambda_view.md | 2 +- .../ledger_integration_test.md | 0 .../ledger_signer.md | 18 +- .../liquidity_baking.md | 0 .../making_transfers.md | 0 .../manager_lambda.md | 0 .../maps_bigmaps.md | 0 .../metadata-tzip16.md | 8 +- .../michelson_encoder.md | 0 .../michelsonmap.md | 0 .../multisig_doc.md | 0 .../on_chain_views.md | 0 .../operation_flow.md | 2 +- .../ophash_before_injecting.md | 0 .../originate.md | 34 +- .../version-20.0.0/package_bundle.md | 36 + .../prepare.md | 0 .../proposal_and_ballot.md | 0 .../quick_start.md | 4 +- .../rpc-cache.md | 0 .../rpc_nodes.md | 10 +- .../rpc_nodes_integration_test.md | 127 ++++ .../rpc_package.md | 19 +- .../sapling.md | 0 .../sapling_in_memory_spending_key.md | 0 .../sapling_in_memory_viewing_key.md | 6 +- .../set_delegate.md | 0 .../signing.md | 12 +- .../version-20.0.0/smart_rollups.md | 98 +++ .../smartcontracts.md | 69 +- .../versioned_docs/version-20.0.0/staking.md | 168 +++++ .../storage_annotations.md | 18 +- .../taquito_utils.md | 0 .../testing_strategies.md | 74 +- .../tezbridge_signer.md | 0 .../tezos_domains.md | 14 +- .../tickets.md | 0 .../versioned_docs/version-20.0.0/timelock.md | 223 ++++++ .../transaction_limits.md | 0 .../versioned_docs/version-20.0.0/tutorial.md | 647 ++++++++++++++++++ .../tutorial_links.md | 0 .../tzip12.md | 20 +- .../tzip16-sequence-diagram.md | 0 .../validators.md | 0 .../version.md | 246 ++++++- .../wallet_API.md | 16 +- .../wallets.md | 0 .../web3js_taquito.md | 2 +- ...bars.json => version-20.0.0-sidebars.json} | 7 +- website/versions.json | 4 +- 126 files changed, 2204 insertions(+), 827 deletions(-) delete mode 100644 website/versioned_docs/version-17.4.0/mobile_bundle.md delete mode 100644 website/versioned_docs/version-17.4.0/rpc_nodes_integration_test.md delete mode 100644 website/versioned_docs/version-17.4.0/smart_rollups.md delete mode 100644 website/versioned_docs/version-17.4.0/tx_rollups.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/ballot.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/batch-api.md (94%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/beaconwallet-singleton.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/cancel_http_requests.md (74%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/chatbot.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/complex_parameters.md (98%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/confirmation_event_stream.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/consensus_key.md (88%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/contract-test-collection.md (97%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/contract_call_parameters.md (96%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/contracts-library.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/dapp_prelaunch.md (93%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/dapp_template.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/drain_account.md (94%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/estimate.md (95%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/events.md (92%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/fa2_parameters.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/failing_noop.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/failwith_errors.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/forger.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/global_constant.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/images/Tzip16ExecuteView.png (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/images/diagramTzip16Metadata.png (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/images/github.png (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/images/gitlab.png (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/increase_paid_storage.md (97%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/inmemory_signer.md (93%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/lambda_view.md (98%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/ledger_integration_test.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/ledger_signer.md (96%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/liquidity_baking.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/making_transfers.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/manager_lambda.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/maps_bigmaps.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/metadata-tzip16.md (95%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/michelson_encoder.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/michelsonmap.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/multisig_doc.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/on_chain_views.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/operation_flow.md (98%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/ophash_before_injecting.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/originate.md (89%) create mode 100644 website/versioned_docs/version-20.0.0/package_bundle.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/prepare.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/proposal_and_ballot.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/quick_start.md (98%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/rpc-cache.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/rpc_nodes.md (79%) create mode 100644 website/versioned_docs/version-20.0.0/rpc_nodes_integration_test.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/rpc_package.md (85%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/sapling.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/sapling_in_memory_spending_key.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/sapling_in_memory_viewing_key.md (99%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/set_delegate.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/signing.md (95%) create mode 100644 website/versioned_docs/version-20.0.0/smart_rollups.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/smartcontracts.md (91%) create mode 100644 website/versioned_docs/version-20.0.0/staking.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/storage_annotations.md (92%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/taquito_utils.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/testing_strategies.md (97%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tezbridge_signer.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tezos_domains.md (89%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tickets.md (100%) create mode 100644 website/versioned_docs/version-20.0.0/timelock.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/transaction_limits.md (100%) create mode 100644 website/versioned_docs/version-20.0.0/tutorial.md rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tutorial_links.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tzip12.md (92%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/tzip16-sequence-diagram.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/validators.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/version.md (93%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/wallet_API.md (98%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/wallets.md (100%) rename website/versioned_docs/{version-17.4.0 => version-20.0.0}/web3js_taquito.md (98%) rename website/versioned_sidebars/{version-17.4.0-sidebars.json => version-20.0.0-sidebars.json} (97%) diff --git a/apps/taquito-test-dapp/package.json b/apps/taquito-test-dapp/package.json index 98d4773270..73f89b191b 100644 --- a/apps/taquito-test-dapp/package.json +++ b/apps/taquito-test-dapp/package.json @@ -1,7 +1,7 @@ { "name": "taquito-test-dapp-vite", "private": true, - "version": "20.0.0-RC.1", + "version": "20.0.0", "type": "module", "scripts": { "dev": "vite", @@ -26,10 +26,10 @@ "dependencies": { "@airgap/beacon-sdk": "^4.2.2", "@airgap/beacon-types": "^4.2.2", - "@taquito/beacon-wallet": "^20.0.0-RC.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/beacon-wallet": "^20.0.0", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "buffer": "^6.0.3", "svelte-select": "^5.7.0", "vite-compatible-readable-stream": "^3.6.1" diff --git a/docs/version.md b/docs/version.md index 4232111be5..705e323944 100644 --- a/docs/version.md +++ b/docs/version.md @@ -2,6 +2,107 @@ title: Versions author: Jev Bjorsell --- + +# Taquito v20.0.0 +## Summary + +### Paris(B) Protocol Support +Paris(B) Protocol has new Adaptive Issuance features, including staking pseudo-operations and rpc endpoints. + +⚠️ Warning ⚠️ +Adaptive Issuance, Staking, and Adaptive slashing will be in effect roughly two weeks (5 cycles) after the proposal is activated on Mainnet. The new AI features will not be usable until then. + +### ⚠️ Breaking Changes ⚠️ + +### Beacon Migration +As of Beacon version 4.2.0, Beacon has migrated from using `dAppClient.getActiveAccount()` to using an event subscription method `BeaconEvent.ACTIVE_ACCOUNT_SET` for handling active account changes. + +**IF YOU ARE STILL USING THE `eventHandlers` PROPERTY WHEN INITIALIZING A DAPP CLIENT, PLEASE UPDATE YOUR CODE.** + +``` +const wallet = new BeaconWallet(options); +await wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => { + // your logic to update your state + console.log(data.address); + console.log(data.network.type); +}); +await wallet.requestPermissions(); +``` +### Michelson-encoder +We fixed a bug in `@taquito/Michelson-encoder` when there are nested `pair` and `or` without having `annots` consistently; the indexing key will have unexpected behaviour as below. This is an API behaviour-breaking change; if your dApp depends on the old behaviour or changing is too much effort, you can configure your `TezosToolkit` with `Tezos.setFieldNumberingStrategy('Legacy')` to keep the previous behaviour. But please note that this option might be removed in a future release. + +Previous behaviour - inner object's field numbers depend on the object's location in its parent, and start with '2' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '2': 'thirdValue', + '3': 'fourthValue' + } +} +``` +New behaviour - inner object's field number will start with '0' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '0': 'thirdValue', + '1': 'fourthValue' + } +} +``` + +### New Features +- `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API. This includes support for `prepareProvider`, `estimationProvider`, and `rpcContractProvider` #2886 +- `@taquito/taquito` - Added staking related pseudo operations (stake, unstake, finalize_unstake) to the Wallet API #2921 +- `@taquito/rpc` - Added various RPC endpoints related to Adaptive Issuance (Staking) #2676 #2678 +- `@taquito/rpc` - Updated return types for several RPC endpoints related to the Paris protocol update #2887 +- `@taquito/rpc` - Removed `getEndorsingRights` RPC endpoint along with its related type definition and tests #2884 +- `@taquito/rpc` - Updated RPC types for `AttestationWithDal` and `EndorsementWithDal` #2880 +- `@taquito/rpc` - Updated RPC response types to support DAL types #2882 +- `@taquito/rpc` - Updated RPC response type for the new manager op `dal_publish_commitment` #2881 +- `@taquito/rpc` - Added a new RPC endpoint called `getAllDelegates` #2976 +- `@taquito/local-forging` - Added local forging support for `AttestationWithDal` operation #2880 +- `@taquito/local-forging` - Added local forging support for the new manager operation `dal_publish_commitment` #2881 +- `@taquito/michel-codec` - Updated Michelson type definitions and validators to include the new Paris protocol ticket literals [PR#2940](https://github.com/ecadlabs/taquito/pull/2940) + +### Internals +- Updated protocol constants integration test for Paris protocol #2869 +- Configured keygen and integration test configs for Paris protocol #2888 +- Added forger integration test for protocol migrations #2850 +- Updated `@taquito/beacon-wallet` to use event subscription instead of `getActiveAccount()` #2958 +- Updated some website dependencies [PR#2961](https://github.com/ecadlabs/taquito/pull/2961) +- Updated Beacon wallet dependency to the latest version `v4.2.2` (includes Paris protocol definitions) [PR#2956](https://github.com/ecadlabs/taquito/pull/2956) +- Fixed nested `pair` and `or` indexing bug #2927 +- Added a test-dapp case to transfer ghostnet tez to etherlink address #2944 +- Updated the Paris protocol hash to reflect the latest Octez fix [PR](https://github.com/ecadlabs/taquito/pull/2974) + +### Documentation +- Updated documentation for new Adaptive Issuance related features [PR#2928](https://github.com/ecadlabs/taquito/pull/2928) +- Added Tezos Foundation public testnet nodes to rpc_nodes on website #2933 + + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API + +```javascript +const op = await Tezos.contract.stake({ + amount: 100 +}); +await op.confirmation(); +``` + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Wallet API + +```javascript +const op = await Tezos.wallet.stake({ + amount: 100, + mutez: false +}).send(); +await op.confirmation(); +``` + # Taquito v19.2.0 **Breaking Changes**: (if applicable) diff --git a/example/package.json b/example/package.json index 28bd5ffed0..79aa1e7a2b 100644 --- a/example/package.json +++ b/example/package.json @@ -1,7 +1,7 @@ { "name": "@taquito/example", "private": true, - "version": "20.0.0-RC.1", + "version": "20.0.0", "scripts": { "example": "node -r ts-node/register --preserve-symlinks example-node.ts", "example:activation": "node -r ts-node/register --preserve-symlinks example-activate.ts", @@ -42,16 +42,16 @@ }, "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.28.5", - "@taquito/ledger-signer": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/sapling": "^20.0.0-RC.1", - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/ledger-signer": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/sapling": "^20.0.0", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip16": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/integration-tests/package.json b/integration-tests/package.json index 050f28d4e8..5d14fe123f 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -13,26 +13,26 @@ "originate-known-contracts": "node -r ts-node/register originate-known-contracts.ts", "originate-known-contracts-and-run-test": "node -r ts-node/register originate-known-contracts.ts && jest" }, - "version": "20.0.0-RC.1", + "version": "20.0.0", "dependencies": { "@ledgerhq/devices": "8.2.2", "@ledgerhq/hw-transport": "6.30.5", "@ledgerhq/hw-transport-node-hid": "6.28.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.29.5", - "@taquito/contracts-library": "^20.0.0-RC.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/remote-signer": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/sapling": "^20.0.0-RC.1", - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip12": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/contracts-library": "^20.0.0", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/remote-signer": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/sapling": "^20.0.0", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip12": "^20.0.0", + "@taquito/tzip16": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" diff --git a/lerna.json b/lerna.json index 9104f62003..78d77aac15 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "useNx": true, - "version": "20.0.0-RC.1" + "version": "20.0.0" } diff --git a/package-lock.json b/package-lock.json index 1093872f0d..f7a12093f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,14 +56,14 @@ }, "apps/taquito-test-dapp": { "name": "taquito-test-dapp-vite", - "version": "20.0.0-RC.1", + "version": "20.0.0", "dependencies": { "@airgap/beacon-sdk": "^4.2.2", "@airgap/beacon-types": "^4.2.2", - "@taquito/beacon-wallet": "^20.0.0-RC.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/beacon-wallet": "^20.0.0", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "buffer": "^6.0.3", "svelte-select": "^5.7.0", "vite-compatible-readable-stream": "^3.6.1" @@ -85,19 +85,19 @@ }, "example": { "name": "@taquito/example", - "version": "20.0.0-RC.1", + "version": "20.0.0", "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.28.5", - "@taquito/ledger-signer": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/sapling": "^20.0.0-RC.1", - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/ledger-signer": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/sapling": "^20.0.0", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip16": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -106,26 +106,26 @@ } }, "integration-tests": { - "version": "20.0.0-RC.1", + "version": "20.0.0", "dependencies": { "@ledgerhq/devices": "8.2.2", "@ledgerhq/hw-transport": "6.30.5", "@ledgerhq/hw-transport-node-hid": "6.28.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.29.5", - "@taquito/contracts-library": "^20.0.0-RC.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/remote-signer": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/sapling": "^20.0.0-RC.1", - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip12": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/contracts-library": "^20.0.0", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/remote-signer": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/sapling": "^20.0.0", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip12": "^20.0.0", + "@taquito/tzip16": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" @@ -23400,17 +23400,17 @@ }, "packages/taquito": { "name": "@taquito/taquito", - "version": "20.0.0-RC.1", + "version": "20.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -23458,12 +23458,12 @@ }, "packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -23503,13 +23503,13 @@ }, "packages/taquito-contracts-library": { "name": "@taquito/contracts-library", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -23546,7 +23546,7 @@ }, "packages/taquito-core": { "name": "@taquito/core", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -23562,10 +23562,10 @@ }, "packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -23622,14 +23622,14 @@ }, "packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.30.5", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -23666,15 +23666,15 @@ }, "packages/taquito-local-forging": { "name": "@taquito/local-forging", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.0.0-RC.1", + "@taquito/rpc": "^20.0.0", "@types/bluebird": "^3.5.40", "@types/estree": "^1.0.2", "@types/jest": "^29.5.5", @@ -23712,10 +23712,10 @@ }, "packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "MIT", "dependencies": { - "@taquito/core": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -23744,21 +23744,21 @@ } }, "packages/taquito-michel-codec/pack-test-tool": { - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.0.0-RC.1", + "@taquito/rpc": "^20.0.0", "yargs": "^17.7.2" } }, "packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -23795,15 +23795,15 @@ }, "packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -23840,12 +23840,12 @@ }, "packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -23881,17 +23881,17 @@ }, "packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "20.0.0-RC.1", + "version": "20.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -23951,7 +23951,7 @@ }, "packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -23960,9 +23960,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", @@ -24005,7 +24005,7 @@ }, "packages/taquito-timelock": { "name": "@taquito/timelock", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -24013,9 +24013,9 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "@types/node": "^20.11.20", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -24059,13 +24059,13 @@ }, "packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip16": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -24101,15 +24101,15 @@ }, "packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -24148,12 +24148,12 @@ }, "packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.0.0-RC.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/packages/taquito-beacon-wallet/package.json b/packages/taquito-beacon-wallet/package.json index cb3c61b4d4..26c446f970 100644 --- a/packages/taquito-beacon-wallet/package.json +++ b/packages/taquito-beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/beacon-wallet", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Beacon wallet provider", "keywords": [ "tezos", @@ -68,8 +68,8 @@ }, "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-beacon-wallet/src/version.ts b/packages/taquito-beacon-wallet/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-beacon-wallet/src/version.ts +++ b/packages/taquito-beacon-wallet/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-contracts-library/package.json b/packages/taquito-contracts-library/package.json index ab2f5fa5da..2ebee22ce2 100644 --- a/packages/taquito-contracts-library/package.json +++ b/packages/taquito-contracts-library/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/contracts-library", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Can be used as an extension on the TezosToolkit to provide contracts data", "keywords": [ "tezos" @@ -67,10 +67,10 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-contracts-library/src/version.ts b/packages/taquito-contracts-library/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-contracts-library/src/version.ts +++ b/packages/taquito-contracts-library/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-core/package.json b/packages/taquito-core/package.json index fd96571ff6..6ac195cba8 100644 --- a/packages/taquito-core/package.json +++ b/packages/taquito-core/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/core", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Classes, interfaces, and types shared across Taquito packages", "keywords": [ "tezos", diff --git a/packages/taquito-core/src/version.ts b/packages/taquito-core/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-core/src/version.ts +++ b/packages/taquito-core/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-http-utils/package.json b/packages/taquito-http-utils/package.json index e62fd61416..6a21c573d2 100644 --- a/packages/taquito-http-utils/package.json +++ b/packages/taquito-http-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/http-utils", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "", "keywords": [ "tezos" @@ -58,7 +58,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { diff --git a/packages/taquito-http-utils/src/version.ts b/packages/taquito-http-utils/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-http-utils/src/version.ts +++ b/packages/taquito-http-utils/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-ledger-signer/package.json b/packages/taquito-ledger-signer/package.json index 60d71ea8e7..173096a802 100644 --- a/packages/taquito-ledger-signer/package.json +++ b/packages/taquito-ledger-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/ledger-signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Ledger signer provider", "keywords": [ "tezos", @@ -59,9 +59,9 @@ "dependencies": { "@ledgerhq/hw-transport": "^6.30.5", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "buffer": "^6.0.3" }, "devDependencies": { diff --git a/packages/taquito-ledger-signer/src/version.ts b/packages/taquito-ledger-signer/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-ledger-signer/src/version.ts +++ b/packages/taquito-ledger-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-local-forging/package.json b/packages/taquito-local-forging/package.json index 8f73e0f81b..7fcc064867 100644 --- a/packages/taquito-local-forging/package.json +++ b/packages/taquito-local-forging/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/local-forging", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Provide local forging functionality to be with taquito", "keywords": [ "tezos", @@ -67,12 +67,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.0.0-RC.1", + "@taquito/rpc": "^20.0.0", "@types/bluebird": "^3.5.40", "@types/estree": "^1.0.2", "@types/jest": "^29.5.5", diff --git a/packages/taquito-local-forging/src/version.ts b/packages/taquito-local-forging/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-local-forging/src/version.ts +++ b/packages/taquito-local-forging/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-michel-codec/pack-test-tool/package.json b/packages/taquito-michel-codec/pack-test-tool/package.json index 6ee27b0299..951cdce051 100644 --- a/packages/taquito-michel-codec/pack-test-tool/package.json +++ b/packages/taquito-michel-codec/pack-test-tool/package.json @@ -1,6 +1,6 @@ { "name": "pack-test-tool", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Generate pack test data via Tezos RPC", "main": "pack-test-tool.js", "private": true, @@ -8,7 +8,7 @@ "author": "Eugene Zagidullin ", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.0.0-RC.1", + "@taquito/rpc": "^20.0.0", "yargs": "^17.7.2" } } diff --git a/packages/taquito-michel-codec/package.json b/packages/taquito-michel-codec/package.json index 35df627371..30ed2cb3e2 100644 --- a/packages/taquito-michel-codec/package.json +++ b/packages/taquito-michel-codec/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michel-codec", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Michelson parser/validator/formatter", "keywords": [ "tezos", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-michel-codec/src/version.ts b/packages/taquito-michel-codec/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-michel-codec/src/version.ts +++ b/packages/taquito-michel-codec/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-michelson-encoder/package.json b/packages/taquito-michelson-encoder/package.json index a5f5bca1a3..ce3caf4e58 100644 --- a/packages/taquito-michelson-encoder/package.json +++ b/packages/taquito-michelson-encoder/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michelson-encoder", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -67,9 +67,9 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, diff --git a/packages/taquito-michelson-encoder/src/version.ts b/packages/taquito-michelson-encoder/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-michelson-encoder/src/version.ts +++ b/packages/taquito-michelson-encoder/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-remote-signer/package.json b/packages/taquito-remote-signer/package.json index 1781b441d8..78f5ac2b6a 100644 --- a/packages/taquito-remote-signer/package.json +++ b/packages/taquito-remote-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/remote-signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Remote signer provider", "keywords": [ "tezos", @@ -62,10 +62,10 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { diff --git a/packages/taquito-remote-signer/src/version.ts b/packages/taquito-remote-signer/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-remote-signer/src/version.ts +++ b/packages/taquito-remote-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-rpc/package.json b/packages/taquito-rpc/package.json index 840b5d468e..89b09323b6 100644 --- a/packages/taquito-rpc/package.json +++ b/packages/taquito-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/rpc", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node", "keywords": [ "tezos", @@ -66,9 +66,9 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-rpc/src/version.ts b/packages/taquito-rpc/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-rpc/src/version.ts +++ b/packages/taquito-rpc/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-sapling/package.json b/packages/taquito-sapling/package.json index 0b43c2484d..8c3396c46e 100644 --- a/packages/taquito-sapling/package.json +++ b/packages/taquito-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/sapling", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Allows reading and preparing sapling transactions", "keywords": [ "tezos", @@ -68,10 +68,10 @@ "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", diff --git a/packages/taquito-sapling/src/version.ts b/packages/taquito-sapling/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-sapling/src/version.ts +++ b/packages/taquito-sapling/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-signer/package.json b/packages/taquito-signer/package.json index 09c6585d37..b7100290fb 100644 --- a/packages/taquito-signer/package.json +++ b/packages/taquito-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/signer", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Provide signing functionality to be with taquito", "keywords": [ "tezos", @@ -72,9 +72,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", diff --git a/packages/taquito-signer/src/version.ts b/packages/taquito-signer/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-signer/src/version.ts +++ b/packages/taquito-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-timelock/package.json b/packages/taquito-timelock/package.json index 52548c2d3d..a6aff4a03f 100644 --- a/packages/taquito-timelock/package.json +++ b/packages/taquito-timelock/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/timelock", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "TypeScript implementation of the Timelock feature in Tezos", "main": "./dist/taquito-timelock.umd.js", "module": "./dist/taquito-timelock.es6.js", @@ -68,9 +68,9 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/signer": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "@types/node": "^20.11.20", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-timelock/src/version.ts b/packages/taquito-timelock/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-timelock/src/version.ts +++ b/packages/taquito-timelock/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-tzip12/package.json b/packages/taquito-tzip12/package.json index cdf84bebe8..dd1b8113cc 100644 --- a/packages/taquito-tzip12/package.json +++ b/packages/taquito-tzip12/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip12", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Tzip12", "keywords": [ "tezos", @@ -62,10 +62,10 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/tzip16": "^20.0.0-RC.1" + "@taquito/core": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip16": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-tzip12/src/version.ts b/packages/taquito-tzip12/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-tzip12/src/version.ts +++ b/packages/taquito-tzip12/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-tzip16/package.json b/packages/taquito-tzip16/package.json index a9cf29a1c6..1a3d6ff499 100644 --- a/packages/taquito-tzip16/package.json +++ b/packages/taquito-tzip16/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip16", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "Tzip16", "keywords": [ "tezos", @@ -61,12 +61,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/taquito": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, diff --git a/packages/taquito-tzip16/src/version.ts b/packages/taquito-tzip16/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-tzip16/src/version.ts +++ b/packages/taquito-tzip16/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito-utils/package.json b/packages/taquito-utils/package.json index f32ca0ebfd..b7d1a1c7ed 100644 --- a/packages/taquito-utils/package.json +++ b/packages/taquito-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/utils", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -64,7 +64,7 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/packages/taquito-utils/src/version.ts b/packages/taquito-utils/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito-utils/src/version.ts +++ b/packages/taquito-utils/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/packages/taquito/README.md b/packages/taquito/README.md index 242a671f5d..685495b789 100644 --- a/packages/taquito/README.md +++ b/packages/taquito/README.md @@ -7,7 +7,7 @@ The `@taquito/taquito` package contains higher-level functionality that builds u ## CDN Bundle ```html - ``` diff --git a/packages/taquito/assets-manifest.json b/packages/taquito/assets-manifest.json index a6c076818f..c14e8617fd 100644 --- a/packages/taquito/assets-manifest.json +++ b/packages/taquito/assets-manifest.json @@ -5,6 +5,6 @@ }, "main.js": { "src": "dist/taquito.min.js", - "integrity": "sha256-RXAdB5NuNZVe0A7crGzhdNa4acerI8whMcF3ayGDfds= sha384-aioIg8nHrB6aVksQHJY15jdUWLuACsdo1fcZcXx7/KOi+v9NzTX3qSXK4dlpbeaj sha512-gzYGn4YPW/JKLmMaV6faxjLnHoGl+1IKFg7DV/bHOodmT6wKJLLChsnqUU/5QQLmoVHIT1mGy3uXAtcboWPACQ==" + "integrity": "sha256-HbLfbrIf0epXsYQ4ZwchLdqoIsx3BVMtyt5i2eg9uno= sha384-KHMviAW/BJwwVODKQKukhbsXBVB21PYOtauM6DCBVJFi9kMwkM1czAYWmyk6jbVY sha512-zW/rNKV53zhtlhvpEvGI8Zq27hz0YVm3X6RrsjBPAhqR/PbL1wVwx4MBeZ4VlDyksmJ5M0sa0wE36RA71UAR0A==" } } \ No newline at end of file diff --git a/packages/taquito/package.json b/packages/taquito/package.json index 197ae9e8cd..cc3d3521c1 100644 --- a/packages/taquito/package.json +++ b/packages/taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/taquito", - "version": "20.0.0-RC.1", + "version": "20.0.0", "description": "High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.", "keywords": [ "tezos", @@ -77,13 +77,13 @@ ] }, "dependencies": { - "@taquito/core": "^20.0.0-RC.1", - "@taquito/http-utils": "^20.0.0-RC.1", - "@taquito/local-forging": "^20.0.0-RC.1", - "@taquito/michel-codec": "^20.0.0-RC.1", - "@taquito/michelson-encoder": "^20.0.0-RC.1", - "@taquito/rpc": "^20.0.0-RC.1", - "@taquito/utils": "^20.0.0-RC.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, diff --git a/packages/taquito/src/version.ts b/packages/taquito/src/version.ts index 040885fc47..2ce40e218f 100644 --- a/packages/taquito/src/version.ts +++ b/packages/taquito/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: '3374a558006fdf94f6a51f86c64c2bfd970d619d', - version: '20.0.0-RC.1', + commitHash: '45fea4a361f29598063e448574800220c4687001', + version: '20.0.0', }; diff --git a/website/package-lock.json b/website/package-lock.json index 54db73f532..e4709b9443 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,12 +1,12 @@ { "name": "@taquito/website", - "version": "19.2.0", + "version": "20.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@taquito/website", - "version": "19.2.0", + "version": "20.0.0", "dependencies": { "@docusaurus/core": "2.4.3", "@docusaurus/plugin-google-gtag": "2.4.3", @@ -69,17 +69,17 @@ }, "../packages/taquito": { "name": "@taquito/taquito", - "version": "19.2.1", + "version": "20.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", - "@taquito/http-utils": "^19.2.1", - "@taquito/local-forging": "^19.2.1", - "@taquito/michel-codec": "^19.2.1", - "@taquito/michelson-encoder": "^19.2.1", - "@taquito/rpc": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/local-forging": "^20.0.0", + "@taquito/michel-codec": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -127,12 +127,12 @@ }, "../packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^19.2.1", - "@taquito/taquito": "^19.2.1" + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -172,7 +172,7 @@ }, "../packages/taquito-core": { "name": "@taquito/core", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -188,10 +188,10 @@ }, "../packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", + "@taquito/core": "^20.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -229,14 +229,14 @@ }, "../packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.30.5", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^19.2.1", - "@taquito/taquito": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -273,10 +273,10 @@ }, "../packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "19.2.1", + "version": "20.0.0", "license": "MIT", "dependencies": { - "@taquito/core": "^19.2.1" + "@taquito/core": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -306,12 +306,12 @@ }, "../packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", - "@taquito/rpc": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -348,15 +348,15 @@ }, "../packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^19.2.1", - "@taquito/http-utils": "^19.2.1", - "@taquito/taquito": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -393,12 +393,12 @@ }, "../packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", - "@taquito/http-utils": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -434,7 +434,7 @@ }, "../packages/taquito-signer": { "name": "@taquito/signer", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -443,9 +443,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^19.2.1", - "@taquito/taquito": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", @@ -488,13 +488,13 @@ }, "../packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", - "@taquito/michelson-encoder": "^19.2.1", - "@taquito/taquito": "^19.2.1", - "@taquito/tzip16": "^19.2.1" + "@taquito/core": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/tzip16": "^20.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -530,15 +530,15 @@ }, "../packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^19.2.1", - "@taquito/http-utils": "^19.2.1", - "@taquito/michelson-encoder": "^19.2.1", - "@taquito/rpc": "^19.2.1", - "@taquito/taquito": "^19.2.1", - "@taquito/utils": "^19.2.1", + "@taquito/core": "^20.0.0", + "@taquito/http-utils": "^20.0.0", + "@taquito/michelson-encoder": "^20.0.0", + "@taquito/rpc": "^20.0.0", + "@taquito/taquito": "^20.0.0", + "@taquito/utils": "^20.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -577,12 +577,12 @@ }, "../packages/taquito-utils": { "name": "@taquito/utils", - "version": "19.2.1", + "version": "20.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^19.2.1", + "@taquito/core": "^20.0.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/website/package.json b/website/package.json index 8355ba2e03..19ea491bf0 100644 --- a/website/package.json +++ b/website/package.json @@ -87,5 +87,5 @@ "last 1 safari version" ] }, - "version": "20.0.0-RC.0" + "version": "20.0.0" } diff --git a/website/versioned_docs/version-17.4.0/mobile_bundle.md b/website/versioned_docs/version-17.4.0/mobile_bundle.md deleted file mode 100644 index b36c363472..0000000000 --- a/website/versioned_docs/version-17.4.0/mobile_bundle.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Taquito in Native Mobile Environments -id: mobile_bundle -author: Davis Sawali ---- -# Using Taquito in Mobile environments -Taquito works best in Node runtime applications, but some of our users working in native mobile development might not have access to such features. To accommodate for that, we decided to add a separate pure JS bundle that you can import into your native mobile applications. - -Currently the only available bundle is for the `@taquito/local-forging` package. - -The bundle wraps functions in the `@taquito/local-forging` package into a single variable called `taquito_local_forging` - -## Instructions on using the bundle -To use the JS bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases). - -After that, simply copy the `.js` file and the `.map.js` file into your project. - -Example of how to use the `LocalForger` class in a simple HTML script tag: -``` - - -``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-17.4.0/rpc_nodes_integration_test.md deleted file mode 100644 index d9bf64803d..0000000000 --- a/website/versioned_docs/version-17.4.0/rpc_nodes_integration_test.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: RPC tests -author: Roxane Letourneau ---- - -## Steps to run the tests - -1. The RPC nodes' integration tests are disabled by default. -Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json. - - **nairobinet**: `npm run test:nairobinet rpc-nodes.spec.ts` - -**When all endpoints are accessible for a node, you will obtain:** - -``` -Test calling all methods from RPC node: https://a-node - ✓ Get the head block hash (1376 ms) - ✓ List the ancestors of the head block (1010 ms) - ✓ Access the balance of an address (1024 ms) - ✓ Access the data of a contract (1022 ms) - ✓ Access the code and data of a contract (1096 ms) - ✓ Access the complete status of a contract (1057 ms) - ✓ Access the manager key of a contract (1023 ms) - ✓ Access the delegate of a contract (1023 ms) - ✓ Access the value associated with a key in a big map (3927 ms) - ✓ Fetches information about a delegate from RPC (1590 ms) - ✓ Get all constants from RPC (938 ms) - ✓ Get all the information about a block (1021 ms) - ✓ Get the whole block header (1125 ms) - ✓ Get all the metadata associated to the block (918 ms) - ✓ Retrieves the list of delegates allowed to bake a block (912 ms) - ✓ Retrieves the list of delegates allowed to endorse a block (971 ms) - ✓ Get ballots casted so far during a voting period (1059 ms) - ✓ Get sum of ballots casted so far during a voting period (904 ms) - ✓ Get current period kind (907 ms) - ✓ Get current proposal under evaluation (986 ms) - ✓ Get current expected quorum (920 ms) - ✓ List of delegates with their voting weight, in number of rolls (923 ms) - ✓ List of proposals with number of supporters (1023 ms) - ✓ Forge an operation returning the unsigned bytes (1026 ms) - ✓ Inject an operation in node and broadcast it (1127 ms) - ✓ Simulate the validation of an operation (1022 ms) - ✓ Get the list of entrypoints of the contract (1023 ms) - ✓ Get chain ID (896 ms) - ✓ Run an operation without signature checks (948 ms) -``` - -**Otherwise, you will see which endpoints do not work for a specific node:** - -``` -Test calling all methods from RPC node: https://another-node - ✓ Get the head block hash (888 ms) - ✓ List the ancestors of the head block (782 ms) - ✓ Access the balance of an address (779 ms) - ✓ Access the data of a contract (636 ms) - ✓ Access the code and data of a contract (801 ms) - ✓ Access the complete status of a contract (638 ms) - ✓ Access the manager key of a contract (771 ms) - ✓ Access the delegate of a contract (682 ms) - ✓ Access the value associated with a key in a big map (4200 ms) - ✓ Fetches information about a delegate from RPC (739 ms) - ✓ Get all constants from RPC (633 ms) - ✓ Get all the information about a block (673 ms) - ✓ Get the whole block header (648 ms) - ✓ Get all the metadata associated to the block (646 ms) - ✓ Retrieves the list of delegates allowed to bake a block (814 ms) - ✓ Retrieves the list of delegates allowed to endorse a block (649 ms) - ✕ Get ballots casted so far during a voting period (634 ms) - ✕ Get sum of ballots casted so far during a voting period (707 ms) - ✕ Get current period kind (766 ms) - ✕ Get current proposal under evaluation (654 ms) - ✕ Get current expected quorum (639 ms) - ✕ List of delegates with their voting weight, in number of rolls (630 ms) - ✕ List of proposals with number of supporters (699 ms) - ✓ Forge an operation returning the unsigned bytes (641 ms) - ✓ Inject an operation in node and broadcast it (655 ms) - ✓ Simulate the validation of an operation (653 ms) - ✓ Get the list of entrypoints of the contract (625 ms) - ✓ Get chain ID (636 ms) - ✓ Run an operation without signature checks (626 ms) -``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/smart_rollups.md b/website/versioned_docs/version-17.4.0/smart_rollups.md deleted file mode 100644 index efb75fd3dd..0000000000 --- a/website/versioned_docs/version-17.4.0/smart_rollups.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Smart Rollups -author: Davis Sawali ---- - -# Smart Optimistic Rollups - -Rollups are a permissionless scaling implementation for the Tezos blockchain. The idea is that anyone can originate and operate one or more rollups, increasing the overall throughput of the Tezos blockchain. - -In Taquito, we have implemented some of the operations included in Mumbai protocol update in regards to smart rollups. In this document, we will go through the operations we support. We also won't go too detailed on how rollups work behind the scenes, if you'd like to understand the feature a bit deeper, you can refer to [this document](https://tezos.gitlab.io/mumbai/smart_rollups.html). - -## `smart_rollup_originate` - -The `Smart Rollup Originate` operation allows a user to originate a smart rollup. Users must pass a `kernel`, `pvmKind`, and `parameterType`. - -### Examples - -```typescript -const op = await Tezos.contract.smartRollupOriginate({ - pvmKind: 'wasm_2_0_0', - kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', - parametersType: { prim: 'bytes' }, - -}); -await op.confirmation(); -``` - -##### please note -- `pvmKind` at this time the only PVM supported is `wasm_2_0_0` -- `kernel` is passed as a hexadecimal string examples can be found at [this tezos docs endpoint](https://tezos.gitlab.io/mumbai/smart_rollups.html?highlight=smart%20rollup%20originate#id1) -- `parametersType` is a MichelsonV1Expression to define the type. -- **Please note** `originationProof` is needed origination in `batch` which can be obtained with the `rpc.getOriginationProof({kernel, kind: PVMKind})` - -For more information in regards to Smart Rollup Origination please refer to the this [link](https://tezos.gitlab.io/mumbai/smart_rollups.html?highlight=smart%20rollup%20originate#id1) - - -## `smart_rollup_add_messages` -The add messages operation allows users to send external messages into a rollup inbox. We will go into a bit more detail down below on what that means. - -### Usage -The main use case of sending messages, is usually to denote contract calls. These messages usually takes the form of this object: -``` -MESSAGE='[{\ - "destination" : "${CONTRACT}", \ - "parameters" : "\"Hello world\"", \ - "entrypoint" : "default" - }]' -``` - -If you read closely, the message includes a `destination`, a `parameter`, and an `entrypoint` property. All components needed to **call an entrypoint** of a contract. - -These messages can then be claimed back into L1 as a legitimate contract call using the `smart_rollup_execute_outbox_message` operation which we will go over in another section of this doc. - -for more information, refer to [this document](https://tezos.gitlab.io/mumbai/smart_rollups.html#sending-an-external-inbox-message) - -### Example -```typescript -const op = await Tezos.contract.smartRollupAddMessages({ - message: [ - '0000000031010000000b48656c6c6f20776f726c6401bdb6f61e4f12c952f807ae7d3341af5367887dac000000000764656661756c74' - ] -}); - -await op.confirmation(); -``` - -- `message` property receives an array of encoded outbox messages. For more information on how to encode or what message gets encoded, refer to [this document](https://tezos.gitlab.io/mumbai/smart_rollups.html#sending-an-external-inbox-message) diff --git a/website/versioned_docs/version-17.4.0/tx_rollups.md b/website/versioned_docs/version-17.4.0/tx_rollups.md deleted file mode 100644 index e80f611ab7..0000000000 --- a/website/versioned_docs/version-17.4.0/tx_rollups.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Transaction Optimistic Rollups -id: tx_rollups -author: Davis Sawali ---- - -A Transaction Optimistic Rollup (TORU) is an experimental temporary scaling solution to help Tezos developers and users get acquainted with the idea of working with rollups. - -This is a trimmed, more concise documentation of how to do TORU operations in Taquito. If you aren't yet familiar with rollup node interactions, please refer to this [documentation](https://tezos.gitlab.io/alpha/transaction_rollups.html?highlight=transaction%20rollups#transaction-rollups) by Nomadic Labs. - -TORU currently supports the transferring of funds in the form of [tickets](https://taquito.io/docs/tickets). Fund (or ticket) transfers can be done from: -- Layer-1 to layer 2 (deposit) -- Layer-2 to layer 2 (transfer) -- Layer-2 to layer-1 (withdrawal) - -Taquito currently supports **layer-1** operations that facilitate deposits and withdrawals to and from the rollup node. - -## Deposits -To be able to interact or transfer funds on layer-2, you will first need to deposit an amount to an existing layer-2 (tz4) address. - -Depositing tickets from layer-1 to layer-2 can be done via a smart contract that facilitates the transfer to a tz4 address in a specified rollup node. - -An example of such contract can be found [here](https://tezos.gitlab.io/alpha/transaction_rollups.html?highlight=transaction%20rollups#depositing-assets-on-a-rollup) - -Assuming the contract has been originated, interacting with the contract in Taquito would look something like this: -```javascript -const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); - -const deposit = Tezos.contract.at(SMART_CONTRACT_ADDRESS); - -const op = await deposit.methods.default( - 'foobar', - '15', - 'tz4Jxn8MpRndqWUzkuZbQKmE3aNWJzYsSEso', - 'txr1c9XcfmiLSWeqDPamPytns2ZXvwgYA7EpA' -); - -const confirmation = await op.confirmation(); - -console.log(op.hash); -console.log(op.operationResults); -``` -The `default` entrypoint takes in 4 arguments: -- `foobar` is the ticket string -- `15` is the quantity of a ticket string -- `tz4Jxn8MpRndqWUzkuZbQKmE3aNWJzYsSEso` is the layer-2 address that will be the deposit recipient -- `txr1c9XcfmiLSWeqDPamPytns2ZXvwgYA7EpA` is the rollup node id - -If the deposit is successful, you will be returned an operation hash that can be accessed via `op.hash` - -You also might want to look at `op.operationResults` to retrieve the `ticket_hash`. A ticket hash should look something like this: `exprtz9FgfdzufUADVsvP8Gj8d8PZr9RsBEjZ5GQKM8Kp5cKWww7di` - -## Transfer -The exchange of assets in the form of tickets can be done from a layer-2 (`tz4`) address to another layer-2 address. Not to be confused with the `transfer_ticket` operation, this layer-2 operation will not be supported in Taquito. This may change in the future with SCORU (Smart Contract Optimistic Rollups). - -For instructions on how to conduct a transfer in layer-2 using the rollup client, refer to this [documentation](https://tezos.gitlab.io/alpha/transaction_rollups.html?highlight=transaction%20rollups#exchanging-assets-inside-a-rollup) by Nomadic Labs. - -## Withdrawal -A withdrawal of assets from layer-2 back to layer-1 can be done in several steps. - -The first step is to perform a `withdraw` in layer-2 to a layer-1 address in the rollup client. -``` -tezos-tx-rollup-client-alpha withdraw ${qty} of ${ticket_hash} from ${l2_src} to ${l1_dst} -``` - -- `${qty}` is the quantity of a ticket string that you would like to withdraw -- `${ticket_hash}` is the ticket hash that was returned by a deposit -- `${l2_src}` is the BLS pair of keys generated with `tezos-client bls gen key`; or in other words, the tz4 address that holds the tickets -- `${l1_dst}` is the layer-1 address you would like to withdraw the tickets to - -After a successful withdrawal, your assets will exist back in layer-1 in the form of tickets after the [finality period](#Glossary) ends. - -:::warning -Please note that this first step is a layer-2 operation which Taquito does not currently support. -::: - - - -The second step is to use a Tezos operation that will transfer these tickets to a smart contract. You can use your own contracts to process the tickets as you'd like (e.g. allow access to XTZ existing in the tickets, etc). - -This second step is called a `Transfer Ticket` operation, which Taquito supports. - -``` -const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); - -const op = await Tezos.contract.transferTicket({ - ticketContents: { "string": "foobar" }, - ticketTy: { "prim": "string" } , - ticketTicketer: 'KT1AL8we1Bfajn2M7i3gQM5PJEuyD36sXaYb', - ticketAmount: 5, - destination: KT1SUT2TBFPCknkBxLqM5eJZKoYVY6mB26Fg, - entrypoint: 'default', -}); -``` -- `ticket_amount` is the amount that you would like to transfer to the smart contract -- `destination` is the address of the smart contract you would like to transfer the tickets to -- `entrypoint` is the entrypoint of the destination smart contract -- `ticket_contents`, `ticket_ty`, and `ticket_ticketer` can be retrieved from running this command using the rollup client (see [documentation](https://tezos.gitlab.io/alpha/transaction_rollups.html?highlight=transaction%20rollups#exchanging-assets-inside-a-rollup)) -``` -tezos-tx-rollup-client-alpha rpc get "/context/head/tickets/${ticket_hash}" -``` - -## Glossary -- `Layer-1` refers to our main protocol networks related to on-chain transactions -- `Layer-2` refers to rollup nodes deployed by any individual/group to receive transactions off-chain -- `TORU` is short for Transactional Optimistic Rollup; the experimental, temporary introduction for rollup nodes -- `SCORU` is short for Smart Contract Optimistic Rollup; the more 'permanent' solution that has yet to be be released -- `Finality Period` refers to the number of blocks needed for the chain to finalize transactions on a rollup node (40,000 blocks on mainnet and testnets, 10 blocks on Mondaynet and Dailynet for ease of testing and demo purposes). See [documentation](https://tezos.gitlab.io/alpha/transaction_rollups.html?highlight=transaction%20rollups#commitments-and-rejections). diff --git a/website/versioned_docs/version-17.4.0/ballot.md b/website/versioned_docs/version-20.0.0/ballot.md similarity index 100% rename from website/versioned_docs/version-17.4.0/ballot.md rename to website/versioned_docs/version-20.0.0/ballot.md diff --git a/website/versioned_docs/version-17.4.0/batch-api.md b/website/versioned_docs/version-20.0.0/batch-api.md similarity index 94% rename from website/versioned_docs/version-17.4.0/batch-api.md rename to website/versioned_docs/version-20.0.0/batch-api.md index 611cb48799..1f94b85bbe 100644 --- a/website/versioned_docs/version-17.4.0/batch-api.md +++ b/website/versioned_docs/version-20.0.0/batch-api.md @@ -13,8 +13,8 @@ Taquito provides a simple way of forging and sending transactions to the blockch * ONE OF THESE TRANSACTIONS WILL FAIL * AND YOU WILL GET AN ERROR MESSAGE */ -const op1 = await contract.methodsObject.interact('tezos').send(); -const op2 = await contract.methodsObject.wait(UnitValue).send(); +const op1 = await contract.methodsObject.interact({ 0: 'tezos' }).send(); +const op2 = await contract.methodsObject.wait({ 0: UnitValue }).send(); await op1.confirmation(); await op2.confirmation(); @@ -31,6 +31,7 @@ await op2.confirmation(); */ ``` + ## How does it work? The `contract` or `wallet` property of the `TezosToolkit` object exposes a method called `batch` (the choice between `contract` or `wallet` depends on your use case, whether the transaction will be signed by a wallet or not). Subsequently, the returned object exposes six different methods that you can concatenate according to the number of transactions to emit. @@ -93,8 +94,8 @@ This method may be one of the most useful ones as it allows you to batch and emi ```js const contract = await Tezos.wallet.at(VALID_CONTRACT_ADDRESS); const batch = await Tezos.wallet.batch() - .withContractCall(contract.methodsObject.interact('tezos')) - .withContractCall(contract.methodsObject.wait(UnitValue)); + .withContractCall(contract.methodsObject.interact({ 0: 'tezos' })) + .withContractCall(contract.methodsObject.wait({ 1: UnitValue }); ``` #### - The `array of transactions` method @@ -102,7 +103,7 @@ const batch = await Tezos.wallet.batch() If you prefer having an array that contains objects with the different transactions you want to emit, you can use the `with` method. It allows you to group transactions as objects instead of concatenating function calls. The object you use expects the same properties as the parameter of the corresponding method with an additional `kind` property that indicates the kind of transaction you want to emit (a handy `opKind` enum is [exported from the Taquito package](https://github.com/ecadlabs/taquito/blob/master/packages/taquito-rpc/src/opkind.ts) with the valid values for the `kind` property). ```js -import { OpKind } from '@taquito/taquito'; +import { OpKind, UnitValue } from '@taquito/taquito'; const batch = await Tezos.wallet.batch([ { @@ -122,7 +123,7 @@ const batch = await Tezos.wallet.batch([ delegate: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', }, { kind: OpKind.TRANSACTION, - ...contract.methodsObject.default(UnitValue).toTransferParams() + ...contract.methodsObject.default({ 0: UnitValue }).toTransferParams() } ]); ``` diff --git a/website/versioned_docs/version-17.4.0/beaconwallet-singleton.md b/website/versioned_docs/version-20.0.0/beaconwallet-singleton.md similarity index 100% rename from website/versioned_docs/version-17.4.0/beaconwallet-singleton.md rename to website/versioned_docs/version-20.0.0/beaconwallet-singleton.md diff --git a/website/versioned_docs/version-17.4.0/cancel_http_requests.md b/website/versioned_docs/version-20.0.0/cancel_http_requests.md similarity index 74% rename from website/versioned_docs/version-17.4.0/cancel_http_requests.md rename to website/versioned_docs/version-20.0.0/cancel_http_requests.md index 93856b1f02..78b9187bf0 100644 --- a/website/versioned_docs/version-17.4.0/cancel_http_requests.md +++ b/website/versioned_docs/version-20.0.0/cancel_http_requests.md @@ -3,6 +3,10 @@ title: Cancel HTTP requests author: Roxane Letourneau --- +:::warning +This document was recently modified to reflect the switch from Axios to Fetch +::: + Having Taquito implemented in composable modules is a design choice to allow users to customize the modules to meet some of their specific needs. One of these needs might be the ability to **cancel** HTTP requests to optimize the network. Indeed, Taquito has heavy methods that make a lot of requests to the RPC. For example, in some cases, users might want to cancel almost immediately a call when using it in user interfaces. It is possible to incorporate some logic into the `HttpBackend` and `RpcClient` classes to fulfill this need. @@ -11,7 +15,11 @@ Here is one example to override `HttpBackend` and/or `RpcClient`: #### **Create a custom** `HttpBackend` -Create a class called `CancellableHttpBackend` which extends the `HttpBackend` class. Override the `createRequest` method to utilize an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to handle and capture abort signals. We also use [Axios](https://github.com/axios/axios) to send HTTP requests. For more information on cancelling Axios requests, refer to [this documentation](https://github.com/axios/axios#cancellation) +Create a class called `CancellableHttpBackend` which extends the `HttpBackend` class. Override the `createRequest` method to utilize an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to handle and capture abort signals. + +:::warning +We currently use the `AbortController` to timeout requests in the `HttpBackend` class. Plase note that this example will override the timeout functionality. If you want to keep the timeout functionality, you can add a custom timeout to call the cancelRequest method after a certain amount of time. +::: ``` ts class CancellableHttpBackend extends HttpBackend { @@ -32,25 +40,36 @@ class CancellableHttpBackend extends HttpBackend { async createRequest( [...] let response; + try { - response = await axios.request({ - url: url + this.serialize(query), - method: method ?? 'GET', - headers: headers, - responseType: resType, + const response = await fetch(urlWithQuery, { + method, + headers, + body: JSON.stringify(data), signal: this.abortController.signal, - transformResponse, - timeout: timeout, - data: data, }); - } catch (err: any) { - throw new HttpResponseError( - `Http error response: (${err.response.status}) ${JSON.stringify(err.response.data)}`, - err.response.status as STATUS_CODE, - err.response.statusText, - JSON.stringify(err.response.data), - url + this.serialize(query) - ) + + if (typeof response === 'undefined') { + throw new Error('Response is undefined'); + } + + // Handle responses with status code >= 400 + if (response.status >= 400) { + const errorData = await response.text(); + throw new HttpResponseError( + ... + ); + } + + if (json) { + return response.json() as T; + } else { + return response.text() as unknown as T; + } + } catch (e: unknown) { + ... + } finally { + clearTimeout(t); } return response.data diff --git a/website/versioned_docs/version-17.4.0/chatbot.md b/website/versioned_docs/version-20.0.0/chatbot.md similarity index 100% rename from website/versioned_docs/version-17.4.0/chatbot.md rename to website/versioned_docs/version-20.0.0/chatbot.md diff --git a/website/versioned_docs/version-17.4.0/complex_parameters.md b/website/versioned_docs/version-20.0.0/complex_parameters.md similarity index 98% rename from website/versioned_docs/version-17.4.0/complex_parameters.md rename to website/versioned_docs/version-20.0.0/complex_parameters.md index 90dd997d3a..26031f5ae1 100644 --- a/website/versioned_docs/version-17.4.0/complex_parameters.md +++ b/website/versioned_docs/version-20.0.0/complex_parameters.md @@ -184,7 +184,7 @@ The `address %address` and the `nat %ttl` of the `set_child_record` function are ```js live noInline // import { TezosToolkit, MichelsonMap } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com') +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com') // import { importKey } from '@taquito/signer'; importKey(Tezos, secretKey) @@ -194,14 +194,14 @@ importKey(Tezos, secretKey) const dataMap = new MichelsonMap(); dataMap.set("Hello World", { nat : '3' }) - return myContract.methodsObject.set_child_record( + return myContract.methodsObject.set_child_record({ address: null, data: dataMap, label: 'EEEE', owner: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', parent: 'FFFF', ttl: null - ).send(); + }).send(); }).then(op => { println(`Waiting for ${op.hash} to be confirmed...`); return op.confirmation(1).then(() => op.hash); diff --git a/website/versioned_docs/version-17.4.0/confirmation_event_stream.md b/website/versioned_docs/version-20.0.0/confirmation_event_stream.md similarity index 100% rename from website/versioned_docs/version-17.4.0/confirmation_event_stream.md rename to website/versioned_docs/version-20.0.0/confirmation_event_stream.md diff --git a/website/versioned_docs/version-17.4.0/consensus_key.md b/website/versioned_docs/version-20.0.0/consensus_key.md similarity index 88% rename from website/versioned_docs/version-17.4.0/consensus_key.md rename to website/versioned_docs/version-20.0.0/consensus_key.md index 7b9b84b478..bda600b95d 100644 --- a/website/versioned_docs/version-17.4.0/consensus_key.md +++ b/website/versioned_docs/version-20.0.0/consensus_key.md @@ -3,7 +3,7 @@ title: Consensus Keys author: Davis Sawali & Hui-An Yang --- -The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. pre-endorsements and endorsements). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) +The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation/preendorsements and attestation/endorsements). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) Starting from Lima protocol, these 2 new operations will be available: diff --git a/website/versioned_docs/version-17.4.0/contract-test-collection.md b/website/versioned_docs/version-20.0.0/contract-test-collection.md similarity index 97% rename from website/versioned_docs/version-17.4.0/contract-test-collection.md rename to website/versioned_docs/version-20.0.0/contract-test-collection.md index cd0f92b754..25ea85fc76 100644 --- a/website/versioned_docs/version-17.4.0/contract-test-collection.md +++ b/website/versioned_docs/version-20.0.0/contract-test-collection.md @@ -956,7 +956,7 @@ ledger.set( ); const url = 'https://storage.googleapis.com/tzip-16/fa2-views.json'; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadata = new MichelsonMap(); metadata.set('', bytesUrl); @@ -964,15 +964,15 @@ const operators = new MichelsonMap(); const tokens = new MichelsonMap(); const metadataMap0 = new MichelsonMap(); -metadataMap0.set('', char2Bytes('https://storage.googleapis.com/tzip-16/token-metadata.json')); -metadataMap0.set('name', char2Bytes('Name from URI is prioritized!')); +metadataMap0.set('', stringToBytes('https://storage.googleapis.com/tzip-16/token-metadata.json')); +metadataMap0.set('name', stringToBytes('Name from URI is prioritized!')); const metadataMap1 = new MichelsonMap(); -metadataMap1.set('name', char2Bytes('AliceToken')); -metadataMap1.set('symbol', char2Bytes('ALC')); +metadataMap1.set('name', stringToBytes('AliceToken')); +metadataMap1.set('symbol', stringToBytes('ALC')); metadataMap1.set('decimals', '30'); -metadataMap1.set('extra', char2Bytes('Add more data')); +metadataMap1.set('extra', stringToBytes('Add more data')); const metadataMap2 = new MichelsonMap(); -metadataMap2.set('name', char2Bytes('Invalid token metadata')); +metadataMap2.set('name', stringToBytes('Invalid token metadata')); tokens.set('0', { metadata_map: metadataMap0, total_supply: '20000', @@ -1059,8 +1059,8 @@ const metadataJSON = { }; const metadataBigMap = new MichelsonMap(); -metadataBigMap.set('', char2Bytes('tezos-storage:here')); -metadataBigMap.set('here', char2Bytes(JSON.stringify(metadataJSON))); +metadataBigMap.set('', stringToBytes('tezos-storage:here')); +metadataBigMap.set('here', stringToBytes(JSON.stringify(metadataJSON))); const tacoShopStorageMap = new MichelsonMap(); @@ -1115,7 +1115,7 @@ storage (pair (big_map %metadata string bytes) ```js const url = 'https://storage.googleapis.com/tzip-16/taco-shop-metadata.json'; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1177,7 +1177,7 @@ const urlPercentEncoded = encodeURIComponent( ); const metadataSha256 = '0x7e99ecf3a4490e3044ccdf319898d77380a2fc20aae36b6e40327d678399d17b'; const url = 'sha256://' + metadataSha256 + '/https:' + urlPercentEncoded; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1235,7 +1235,7 @@ storage (pair (big_map %metadata string bytes) ```js const uri = 'ipfs://QmXnASUptTDnfhmcoznFqz3S1Mxu7X1zqo2YwbTN3nW52V'; -const bytesUrl = char2Bytes(uri); +const bytesUrl = stringToBytes(uri); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1291,8 +1291,8 @@ storage (pair nat (big_map %metadata string bytes)); ```js const metadataBigMAp = new MichelsonMap(); -metadataBigMAp.set('', char2Bytes('tezos-storage:here')); -metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample1))); +metadataBigMAp.set('', stringToBytes('tezos-storage:here')); +metadataBigMAp.set('here', stringToBytes(JSON.stringify(metadataViewsExample1))); const op = await tezos.contract.originate({ code: contractCode, @@ -1340,8 +1340,8 @@ storage (pair nat (big_map %metadata string bytes)); ```js const metadataBigMAp = new MichelsonMap(); -metadataBigMAp.set('', char2Bytes('tezos-storage:here')); -metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample2))); +metadataBigMAp.set('', stringToBytes('tezos-storage:here')); +metadataBigMAp.set('here', stringToBytes(JSON.stringify(metadataViewsExample2))); const op = await tezos.contract.originate({ code: contractCode, diff --git a/website/versioned_docs/version-17.4.0/contract_call_parameters.md b/website/versioned_docs/version-20.0.0/contract_call_parameters.md similarity index 96% rename from website/versioned_docs/version-17.4.0/contract_call_parameters.md rename to website/versioned_docs/version-20.0.0/contract_call_parameters.md index 234092d165..9029d617dc 100644 --- a/website/versioned_docs/version-17.4.0/contract_call_parameters.md +++ b/website/versioned_docs/version-20.0.0/contract_call_parameters.md @@ -9,6 +9,10 @@ You will find below tables that match some of the most common values that smart > You can find the tests used to check these values [in this GitHub repo](https://github.com/claudebarde/taquito-contract-call-params) +:::note +Since Taquito version 16.2.0, we introduced syntax support for nested options in `methodsObject` but not `methods` due to the limitation of the flattened form. We recommend users migrate to using `methodsObject` as its syntax is consistent with storage parameters, supports all Michelson data types, and is continually maintained. +::: + ## Primitive types | Michelson type | Michelson value | Taquito `methods & methodObject`| diff --git a/website/versioned_docs/version-17.4.0/contracts-library.md b/website/versioned_docs/version-20.0.0/contracts-library.md similarity index 100% rename from website/versioned_docs/version-17.4.0/contracts-library.md rename to website/versioned_docs/version-20.0.0/contracts-library.md diff --git a/website/versioned_docs/version-17.4.0/dapp_prelaunch.md b/website/versioned_docs/version-20.0.0/dapp_prelaunch.md similarity index 93% rename from website/versioned_docs/version-17.4.0/dapp_prelaunch.md rename to website/versioned_docs/version-20.0.0/dapp_prelaunch.md index f4c0a892f5..10c0067e5c 100644 --- a/website/versioned_docs/version-17.4.0/dapp_prelaunch.md +++ b/website/versioned_docs/version-20.0.0/dapp_prelaunch.md @@ -11,7 +11,7 @@ author: Claude Barde - Did you enable `Local Pack` in your dapp? Local Pack reduces the search time in bigmaps by 50%, and you can easily add it to your dapp by providing a new instance of the `MichelCodecPacker` class to the `setPackerProvider` method of the `TezosToolkit`. - Are you creating a single instance of the `BeaconWallet` that you can reuse throughout the different components of your dapp? The JavaScript frameworks generally offer a solution to easily share data between components (the Context API in React, Provide/Inject in Vue, or a Svelte store). The instance of the `BeaconWallet` must be saved there in order to use the same one in every component. Creating multiple instances of the `BeaconWallet` may create errors when forging new transactions. - Is your dapp making HTTP requests on update only when necessary? The JavaScript frameworks provide different solutions to rerender the DOM when internal data is updated (React `useEffect`, Vue `beforeUpdate` and Svelte `afterUpdate`). These data may be based on call responses to Tezos nodes or indexers, which is why it is crucial to optimize them. Unnecessary HTTP requests increase the traffic to Tezos nodes and indexer servers and slow down your dapp. -- Does your application wait for a confirmation of an operation, and does it check if the operation was successfull or failed when receiving the transaction receipt? This piece of information is crucial to your users in order to know if the transaction went through or not. +- Does your application wait for a confirmation of an operation, and does it check if the operation was successful or failed when receiving the transaction receipt? This piece of information is crucial to your users in order to know if the transaction went through or not. - Do you display user-friendly error messages, for example, when a transaction fails? A lack of visual feedback when transactions don't go through as expected can be confusing for users. Users must be informed about skipped, backtracked, and failed transactions. - Are you handling big numbers? Because numbers in Michelson are arbitrary-precision, they can become quite long, and JavaScript switches to the scientific notation to represent them, which can be confusing for users. You can use the `bignumber.js` library to handle potentially long numbers coming from the blockchain. - Do you have error reporting enabled on your dapp? An error reporting tool like [BugSnag](https://www.bugsnag.com/platforms/javascript) allows you to understand the issues your users face when using your dapp. diff --git a/website/versioned_docs/version-17.4.0/dapp_template.md b/website/versioned_docs/version-20.0.0/dapp_template.md similarity index 100% rename from website/versioned_docs/version-17.4.0/dapp_template.md rename to website/versioned_docs/version-20.0.0/dapp_template.md diff --git a/website/versioned_docs/version-17.4.0/drain_account.md b/website/versioned_docs/version-20.0.0/drain_account.md similarity index 94% rename from website/versioned_docs/version-17.4.0/drain_account.md rename to website/versioned_docs/version-20.0.0/drain_account.md index d8eeb6a7de..c57e3be73c 100644 --- a/website/versioned_docs/version-17.4.0/drain_account.md +++ b/website/versioned_docs/version-20.0.0/drain_account.md @@ -22,8 +22,8 @@ In the following example, we have not revealed the account that we want to empty ::: ```js live noInline -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); -// import { DEFAULT_FEE } from "@taquito/taquito"; +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); +// import { getRevealFee } from "@taquito/taquito"; Tezos.signer .publicKeyHash() @@ -37,18 +37,18 @@ Tezos.signer return Tezos.estimate .transfer({ to: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', - amount: balance.toNumber() - DEFAULT_FEE.REVEAL, // Remove default reveal fee + amount: balance.toNumber() - getRevealFee(address), // Remove default reveal fee mutez: true }) .then((estimate) => { const maxAmount = balance.minus( - estimate.suggestedFeeMutez + DEFAULT_FEE.REVEAL + estimate.suggestedFeeMutez + getRevealFee(address) ).toNumber(); println( `The estimated fees related to the emptying operation are ${ estimate.suggestedFeeMutez } mutez.\nThe fees related to the reveal operation are ${ - DEFAULT_FEE.REVEAL + getRevealFee(address) } mutez.\nConsidering those fees, the amount we need to send to empty the account is ${ maxAmount / 1000000 } ꜩ.` @@ -87,7 +87,7 @@ The contract we originate is a `manager contract.` It has a `do` method taking a In the example, we estimate the transfer operation before doing it. The associated fees are deducted from the manager's address when draining the account. Thus, for the operation to be successful, the manager's address for that account must contain funds to cover the gas. ```js live noInline -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); function transferImplicit(key, mutez) { return [ diff --git a/website/versioned_docs/version-17.4.0/estimate.md b/website/versioned_docs/version-20.0.0/estimate.md similarity index 95% rename from website/versioned_docs/version-17.4.0/estimate.md rename to website/versioned_docs/version-20.0.0/estimate.md index 8fb8e1e385..d8e8f61971 100644 --- a/website/versioned_docs/version-17.4.0/estimate.md +++ b/website/versioned_docs/version-20.0.0/estimate.md @@ -7,6 +7,10 @@ import TabItem from '@theme/TabItem'; Taquito's estimate method can be used to estimate fees, gas, and storage associated with an operation. +:::note +Our estimation of `fee`, `gasLimit` and `storageLimit` is based on the RPC call response to `simulate_operation` plus a small buffer. The context and volume at the time of `simulate_operation` might differ from `preapply/operations` and `injection/operation`, potentially causing errors like `fees_too_low`, `storage_exhausted.operation` and `gas_exhausted.operation`. +::: + ## The `Estimate` object The `Estimate` object has the following properties: diff --git a/website/versioned_docs/version-17.4.0/events.md b/website/versioned_docs/version-20.0.0/events.md similarity index 92% rename from website/versioned_docs/version-17.4.0/events.md rename to website/versioned_docs/version-20.0.0/events.md index 40938fb861..517e1a3275 100644 --- a/website/versioned_docs/version-17.4.0/events.md +++ b/website/versioned_docs/version-20.0.0/events.md @@ -7,9 +7,9 @@ author: Davis Sawali # Contract Events ## Introduction -Contract events is a way for contracts to deliver event-like information to third-party (off-chain) applications. It can be emitted by using the EMIT instruction in Michelson. +Contract events is a way for contracts to deliver event-like information to third-party (off-chain) applications. It can be emitted by using the EMIT instruction in Michelson. -For more details and examples of how the EMIT instruction works, refer to [this article](https://tezos.gitlab.io/kathmandu/event.html). +For more details and examples of how the EMIT instruction works, refer to [this article](https://tezos.gitlab.io/active/event.html). ## Getting contract events in Taquito You can get the events in a contract through the `eventSchema` field of the `ContractAbstraction`. @@ -58,8 +58,8 @@ const Tezos = new TezosToolkit(RPC_URL); Tezos.setStreamProvider( Tezos.getFactory(PollingSubscribeProvider)({ - shouldObservableSubscriptionRetry: true, - pollingIntervalMilliseconds: 1500 + shouldObservableSubscriptionRetry: true, + pollingIntervalMilliseconds: 1500 }) ); @@ -69,9 +69,9 @@ try { address: 'KT1_CONTRACT_ADDRESS', excludeFailedOperations: true }); - + sub.on('data', console.log); - + } catch (e) { console.log(e); } @@ -79,7 +79,7 @@ try { - `tag` is the tag string that was defined in the smart contract with the EMIT instruction -- `address` is the address of the smart contract that was called +- `address` is the address of the smart contract that was called - `excludeFailedOperations`: In rare cases, events from failed operations can be received by the subscriber. You can use this field to filter out these events (if you pass `true` to this field, only events from successful operations will be received) :::info diff --git a/website/versioned_docs/version-17.4.0/fa2_parameters.md b/website/versioned_docs/version-20.0.0/fa2_parameters.md similarity index 100% rename from website/versioned_docs/version-17.4.0/fa2_parameters.md rename to website/versioned_docs/version-20.0.0/fa2_parameters.md diff --git a/website/versioned_docs/version-17.4.0/failing_noop.md b/website/versioned_docs/version-20.0.0/failing_noop.md similarity index 100% rename from website/versioned_docs/version-17.4.0/failing_noop.md rename to website/versioned_docs/version-20.0.0/failing_noop.md diff --git a/website/versioned_docs/version-17.4.0/failwith_errors.md b/website/versioned_docs/version-20.0.0/failwith_errors.md similarity index 100% rename from website/versioned_docs/version-17.4.0/failwith_errors.md rename to website/versioned_docs/version-20.0.0/failwith_errors.md diff --git a/website/versioned_docs/version-17.4.0/forger.md b/website/versioned_docs/version-20.0.0/forger.md similarity index 100% rename from website/versioned_docs/version-17.4.0/forger.md rename to website/versioned_docs/version-20.0.0/forger.md diff --git a/website/versioned_docs/version-17.4.0/global_constant.md b/website/versioned_docs/version-20.0.0/global_constant.md similarity index 100% rename from website/versioned_docs/version-17.4.0/global_constant.md rename to website/versioned_docs/version-20.0.0/global_constant.md diff --git a/website/versioned_docs/version-17.4.0/images/Tzip16ExecuteView.png b/website/versioned_docs/version-20.0.0/images/Tzip16ExecuteView.png similarity index 100% rename from website/versioned_docs/version-17.4.0/images/Tzip16ExecuteView.png rename to website/versioned_docs/version-20.0.0/images/Tzip16ExecuteView.png diff --git a/website/versioned_docs/version-17.4.0/images/diagramTzip16Metadata.png b/website/versioned_docs/version-20.0.0/images/diagramTzip16Metadata.png similarity index 100% rename from website/versioned_docs/version-17.4.0/images/diagramTzip16Metadata.png rename to website/versioned_docs/version-20.0.0/images/diagramTzip16Metadata.png diff --git a/website/versioned_docs/version-17.4.0/images/github.png b/website/versioned_docs/version-20.0.0/images/github.png similarity index 100% rename from website/versioned_docs/version-17.4.0/images/github.png rename to website/versioned_docs/version-20.0.0/images/github.png diff --git a/website/versioned_docs/version-17.4.0/images/gitlab.png b/website/versioned_docs/version-20.0.0/images/gitlab.png similarity index 100% rename from website/versioned_docs/version-17.4.0/images/gitlab.png rename to website/versioned_docs/version-20.0.0/images/gitlab.png diff --git a/website/versioned_docs/version-17.4.0/increase_paid_storage.md b/website/versioned_docs/version-20.0.0/increase_paid_storage.md similarity index 97% rename from website/versioned_docs/version-17.4.0/increase_paid_storage.md rename to website/versioned_docs/version-20.0.0/increase_paid_storage.md index b15a75c085..b47e0de6e9 100644 --- a/website/versioned_docs/version-17.4.0/increase_paid_storage.md +++ b/website/versioned_docs/version-20.0.0/increase_paid_storage.md @@ -22,7 +22,7 @@ const op = await Tezos.contract.increasePaidStorage({ await op.confirmation(); ``` -- `amount` is the the number of `bytes` you want to increase the paid storage by +- `amount` is the number of `bytes` you want to increase the paid storage by - `destination` is the `KT1` address of the smart contract which storage you would like to increase After waiting for the operation confirmation, you will also have access to various getters of the operation such as `status`, `amount`, `destination`, `fee`, `gasLimit`, `errors`, `storageLimit`, `consumedMilligas`. @@ -105,4 +105,4 @@ const batch = await Tezos.wallet const op = await batch.send(); await op.confirmation(); -``` \ No newline at end of file +``` diff --git a/website/versioned_docs/version-17.4.0/inmemory_signer.md b/website/versioned_docs/version-20.0.0/inmemory_signer.md similarity index 93% rename from website/versioned_docs/version-17.4.0/inmemory_signer.md rename to website/versioned_docs/version-20.0.0/inmemory_signer.md index a80abd8cd5..503b949641 100644 --- a/website/versioned_docs/version-17.4.0/inmemory_signer.md +++ b/website/versioned_docs/version-20.0.0/inmemory_signer.md @@ -41,7 +41,7 @@ The `fromSecretKey` method takes a secret that is base58 encoded as a parameter. ```js live noInline // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); InMemorySigner.fromSecretKey('edsk2rKA8YEExg9Zo2qNPiQnnYheF1DhqjLVmfKdxiFfu5GyGRZRnb') .then((theSigner) => { @@ -58,7 +58,7 @@ InMemorySigner.fromSecretKey('edsk2rKA8YEExg9Zo2qNPiQnnYheF1DhqjLVmfKdxiFfu5GyGR ```js live noInline // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); InMemorySigner.fromSecretKey('spsk2Fiz7sGP5fNMJrokp6ynTa4bcFbsRhw58FHXbNf5ProDNFJ5Xq') .then((theSigner) => { @@ -78,7 +78,7 @@ When required, Taquito offers the `b58cencode` function allowing to encode the s // import { b58cencode, prefix, Prefix } from '@taquito/utils'; // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); const b58encodedSecret = b58cencode( '7c842c15c8b0c8fd228e6cb5302a50201f41642dd36b699003fb3c857920bc9d', @@ -119,7 +119,7 @@ Here are three examples with encrypted private keys where the passphrase used is ```js live noInline // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); InMemorySigner.fromSecretKey( 'edesk1GXwWmGjXiLHBKxGBxwmNvG21vKBh6FBxc4CyJ8adQQE2avP5vBB57ZUZ93Anm7i4k8RmsHaPzVAvpnHkFF', @@ -139,7 +139,7 @@ InMemorySigner.fromSecretKey( ```js live noInline // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); InMemorySigner.fromSecretKey( 'spesk24UQkAiJk8X6AufNtRv1WWPp2BAssEgmijCTQPMgUXweSKPmLdbyAjPmCG1pR2dC9P5UZZVeZcb7zVodUHZ', @@ -159,7 +159,7 @@ InMemorySigner.fromSecretKey( ```js live noInline // import { TezosToolkit } from '@taquito/taquito' // import { InMemorySigner } from '@taquito/signer' -// const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); InMemorySigner.fromSecretKey( 'p2esk28hoUE2J88QNFj2aDX2pjzL7wcVh2g8tkEwtWWguby9M3FHUgSbzvF2Sd7wQ4Kd8crFwvto6gF3otcBuo4T', @@ -188,15 +188,15 @@ With ed25519 default derivation path (Reminder Must be hardened with either h or ```js live noInline // import { TezosToolkit } from '@taquito/taquito // import { InMemorySigner } from '@taquito/signer' - // const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); - - // ed25519 must have all hardened paths - + // const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); + + // ed25519 must have all hardened paths + // using all default values password = '' curve = 'ed25519' and derivationPath "44'/1729'/0'/0'" const params = { mnemonic: 'author crumble medal dose ribbon permit ankle sport final hood shadow vessel horn hawk enter zebra prefer devote captain during fly found despair business' } - + const signer = InMemorySigner.fromMnemonic(params); Tezos.setSignerProvider(signer) @@ -212,7 +212,7 @@ With a non-default derivation path non-hardened with a tz2 address ```js live noInline // import { TezosToolkit } from '@taquito/taquito // import { InMemorySigner } from '@taquito/signer' - // const Tezos = new TezosToolkit('https://nairobinet.ecadinfra.com'); + // const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); const params = { mnemonic: 'author crumble medal dose ribbon permit ankle sport final hood shadow vessel horn hawk enter zebra prefer devote captain during fly found despair business', @@ -234,7 +234,7 @@ With a non-default derivation path non-hardened with a tz2 address ~~To load a faucet key (available from https://faucet.tzalpha.net/) for working a public testnet use the `importKey` function.~~ :::note -Since August 2022, the JSON faucets we used to import with the `importKey` function are no longer available. You can use the following link to fund an address on the different testnets: https://teztnets.xyz/. +Since August 2022, the JSON faucets we used to import with the `importKey` function are no longer available. You can use the following link to fund an address on the different testnets: https://teztnets.com/. ::: ### A simple factory multiple keys/wallets @@ -253,7 +253,7 @@ const signerFactory = async (rpcUrl: string, pk: string) => { }; const bob = await signerFactory('bobs_secret_key'); -const alice = await signerFactory('alices_secret_key'); +const alice = await signerFactory('alice_secret_key'); ``` [0]: https://signatory.io diff --git a/website/versioned_docs/version-17.4.0/lambda_view.md b/website/versioned_docs/version-20.0.0/lambda_view.md similarity index 98% rename from website/versioned_docs/version-17.4.0/lambda_view.md rename to website/versioned_docs/version-20.0.0/lambda_view.md index 3a18cba0ba..d9d797fbcd 100644 --- a/website/versioned_docs/version-17.4.0/lambda_view.md +++ b/website/versioned_docs/version-20.0.0/lambda_view.md @@ -54,7 +54,7 @@ Then we call the `read()` method. (Note that we have no longer need a lambda con Tezos.contract .at('KT1MhfAnNbg2oACFBP4VDU5bNY5MZUXdeDWs') .then((contract) => { - return contract.views.getTotalSupply([['Unit']]).read(); + return contract.views.getTotalSupply(UnitValue).read(); }) .then((response) => { println(response); diff --git a/website/versioned_docs/version-17.4.0/ledger_integration_test.md b/website/versioned_docs/version-20.0.0/ledger_integration_test.md similarity index 100% rename from website/versioned_docs/version-17.4.0/ledger_integration_test.md rename to website/versioned_docs/version-20.0.0/ledger_integration_test.md diff --git a/website/versioned_docs/version-17.4.0/ledger_signer.md b/website/versioned_docs/version-20.0.0/ledger_signer.md similarity index 96% rename from website/versioned_docs/version-17.4.0/ledger_signer.md rename to website/versioned_docs/version-20.0.0/ledger_signer.md index c5d0f6c4de..9a5dff3274 100644 --- a/website/versioned_docs/version-17.4.0/ledger_signer.md +++ b/website/versioned_docs/version-20.0.0/ledger_signer.md @@ -57,12 +57,12 @@ const ledgerSigner = new LedgerSigner(transport); The constructor of the `LedgerSigner` class can take three other parameters. If none are specified, the default values are used. -- path: **default value is "44'/1729'/0'/0'"** - You can use as a parameter the `HDPathTemplate` which refers to `44'/1729'/${account}'/0'`. You have to specify what is the index of the account you want to use. Or you can also use a complete path as a parameter. +- path: **default value is "44'/1729'/0'/0'"** + You can use as a parameter the `HDPathTemplate` which refers to `44'/1729'/${account}'/0'`. You have to specify what is the index of the account you want to use. Or you can also use a complete path as a parameter. _More details about paths below_ -- prompt: **default is true** +- prompt: **default is true** If true, you will be asked on your Ledger device to send your public key for validation. -- derivationType: **default is DerivationType.ED25519** +- derivationType: **default is DerivationType.ED25519** It can be DerivationType.ED25519 | DerivationType.BIP32_ED25519 (tz1), DerivationType.SECP256K1 (tz2) or DerivationType.P256 (tz3). ```js @@ -116,7 +116,7 @@ Tezos.contract console.log(`Waiting for ${op.hash} to be confirmed...`); return op.confirmation(1).then(() => op.hash); }) - .then((hash) => console.log(`Operation injected: https://jakarta.tzstats.com/${hash}`)) + .then((hash) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => console.log(`Error: ${error} ${JSON.stringify(error, null, 2)}`)); ``` @@ -135,7 +135,7 @@ Tezos.wallet console.log(`Waiting for ${op.opHash} to be confirmed...`); return op.confirmation(1).then(() => op.opHash); }) - .then((hash) => console.log(`Operation injected: https://jakarta.tzstats.com/${hash}`)) + .then((hash) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => console.log(`Error: ${error} ${JSON.stringify(error, null, 2)}`)); ``` @@ -162,7 +162,7 @@ Where `purpose` is a constant set to `44'` and `coin_type` is set to `1729'` for The path always begins with `44'/1729'` and we see some difference for the three other indexes across the Tezos ecosystem. We can notice that changing any number for the three last indexes of the path (`account' / change / address_index`) will lead to different accounts. **But, to ensure consistency, it is important trying to follow the same convention regarding the structure of the path and which index to increase to access the next address.** In Tezos, we generally see a slight difference in the path compared to the BIP44 specification. It is common to see path made of 4 indexes instead of 5 (default path being `44'/1729'/0'/0'` instead of `44'/1729'/0'/0'/0'`). For example, the default path used by tezos-client is `44'/1729'/0'/0'`. -Based on what is done by the Tezos-client, the default path used by Taquito in the `LedgerSigner` is also `44'/1729'/0'/0'`. Taquito offers a template for the path called `HDPathTemplate`. This template uses four indexes and suggests doing the iteration on the `account` index. +Based on what is done by the Tezos-client, the default path used by Taquito in the `LedgerSigner` is also `44'/1729'/0'/0'`. Taquito offers a template for the path called `HDPathTemplate`. This template uses four indexes and suggests doing the iteration on the `account` index. For example, you can use HDPathTemplate(0) (equivalent to `44'/1729'/0'/0'`) to access the first address, HDPathTemplate(1) equivalent to `44'/1729'/1'/0'`) to access the second address, HDPathTemplate(2) (equivalent to `44'/1729'/2'/0'`) to access the third address... _In order to meet the needs of each user, this template is not imposed by Taquito_. We can see other implementations that use `44'/1729'/0'/0'/0'`, where the next address is accessed by incrementing `account` or `address_index`. @@ -192,14 +192,14 @@ https://medium.com/mycrypto/wtf-is-a-derivation-path-c3493ca2eb52 ## Live example that iterates from the path `44'/1729'/0'/0'` to `44'/1729'/9'/0'` -Having your Ledger device connected to your computer and the `Tezos Wallet App` opened, you can run the following code example. It will scan your Ledger from path `44'/1729'/0'/0'` to `44'/1729'/9'/0'` to get public key hashes and the balance for revealed accounts. Confirmations will be asked on your Ledger to send the public keys. +Having your Ledger device connected to your computer and the `Tezos Wallet App` opened, you can run the following code example. It will scan your Ledger from path `44'/1729'/0'/0'` to `44'/1729'/9'/0'` to get public key hashes and the balance for revealed accounts. Confirmations will be asked on your Ledger to send the public keys. _Note that this example is not intended to be a complete example of paths scanning but only a rough outline of what it is possible to do._ ```js live noInline //import { LedgerSigner, DerivationType, HDPathTemplate } from '@taquito/ledger-signer'; //import { TezosToolkit } from '@taquito/taquito'; // import TransportWebHID from "@ledgerhq/hw-transport-webhid"; -//const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +//const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); TransportWebHID.create().then((transport) => { for (let index = 0, p = Promise.resolve(); index < 10; index++) { diff --git a/website/versioned_docs/version-17.4.0/liquidity_baking.md b/website/versioned_docs/version-20.0.0/liquidity_baking.md similarity index 100% rename from website/versioned_docs/version-17.4.0/liquidity_baking.md rename to website/versioned_docs/version-20.0.0/liquidity_baking.md diff --git a/website/versioned_docs/version-17.4.0/making_transfers.md b/website/versioned_docs/version-20.0.0/making_transfers.md similarity index 100% rename from website/versioned_docs/version-17.4.0/making_transfers.md rename to website/versioned_docs/version-20.0.0/making_transfers.md diff --git a/website/versioned_docs/version-17.4.0/manager_lambda.md b/website/versioned_docs/version-20.0.0/manager_lambda.md similarity index 100% rename from website/versioned_docs/version-17.4.0/manager_lambda.md rename to website/versioned_docs/version-20.0.0/manager_lambda.md diff --git a/website/versioned_docs/version-17.4.0/maps_bigmaps.md b/website/versioned_docs/version-20.0.0/maps_bigmaps.md similarity index 100% rename from website/versioned_docs/version-17.4.0/maps_bigmaps.md rename to website/versioned_docs/version-20.0.0/maps_bigmaps.md diff --git a/website/versioned_docs/version-17.4.0/metadata-tzip16.md b/website/versioned_docs/version-20.0.0/metadata-tzip16.md similarity index 95% rename from website/versioned_docs/version-17.4.0/metadata-tzip16.md rename to website/versioned_docs/version-20.0.0/metadata-tzip16.md index 606fd676a3..1e31f2cced 100644 --- a/website/versioned_docs/version-17.4.0/metadata-tzip16.md +++ b/website/versioned_docs/version-20.0.0/metadata-tzip16.md @@ -356,7 +356,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -375,7 +375,7 @@ Tezos.contract }) .then((result) => { println(`Result of the view someJson: ${result}`); - println(`Transform result to char: ${bytes2Char(result)}`); + println(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` @@ -385,7 +385,7 @@ Tezos.contract ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -404,7 +404,7 @@ Tezos.wallet }) .then((result) => { println(`Result of the view someJson: ${result}`); - println(`Transform result to char: ${bytes2Char(result)}`); + println(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-17.4.0/michelson_encoder.md b/website/versioned_docs/version-20.0.0/michelson_encoder.md similarity index 100% rename from website/versioned_docs/version-17.4.0/michelson_encoder.md rename to website/versioned_docs/version-20.0.0/michelson_encoder.md diff --git a/website/versioned_docs/version-17.4.0/michelsonmap.md b/website/versioned_docs/version-20.0.0/michelsonmap.md similarity index 100% rename from website/versioned_docs/version-17.4.0/michelsonmap.md rename to website/versioned_docs/version-20.0.0/michelsonmap.md diff --git a/website/versioned_docs/version-17.4.0/multisig_doc.md b/website/versioned_docs/version-20.0.0/multisig_doc.md similarity index 100% rename from website/versioned_docs/version-17.4.0/multisig_doc.md rename to website/versioned_docs/version-20.0.0/multisig_doc.md diff --git a/website/versioned_docs/version-17.4.0/on_chain_views.md b/website/versioned_docs/version-20.0.0/on_chain_views.md similarity index 100% rename from website/versioned_docs/version-17.4.0/on_chain_views.md rename to website/versioned_docs/version-20.0.0/on_chain_views.md diff --git a/website/versioned_docs/version-17.4.0/operation_flow.md b/website/versioned_docs/version-20.0.0/operation_flow.md similarity index 98% rename from website/versioned_docs/version-17.4.0/operation_flow.md rename to website/versioned_docs/version-20.0.0/operation_flow.md index ebcd67642d..7d27b9baac 100644 --- a/website/versioned_docs/version-17.4.0/operation_flow.md +++ b/website/versioned_docs/version-20.0.0/operation_flow.md @@ -73,7 +73,7 @@ You might think to do something like this: * AND YOU WILL GET AN ERROR MESSAGE */ const op1 = await contract.methodsObject.interact('tezos').send(); -const op2 = await contract.methodsObject.wait([['unit']]).send(); +const op2 = await contract.methodsObject.wait(UnitValue).send(); await op1.confirmation(); await op2.confirmation(); diff --git a/website/versioned_docs/version-17.4.0/ophash_before_injecting.md b/website/versioned_docs/version-20.0.0/ophash_before_injecting.md similarity index 100% rename from website/versioned_docs/version-17.4.0/ophash_before_injecting.md rename to website/versioned_docs/version-20.0.0/ophash_before_injecting.md diff --git a/website/versioned_docs/version-17.4.0/originate.md b/website/versioned_docs/version-20.0.0/originate.md similarity index 89% rename from website/versioned_docs/version-17.4.0/originate.md rename to website/versioned_docs/version-20.0.0/originate.md index aec0ae1697..5ee4d99235 100644 --- a/website/versioned_docs/version-17.4.0/originate.md +++ b/website/versioned_docs/version-20.0.0/originate.md @@ -35,7 +35,7 @@ This requires a signer to be configured, ie: ``` import { importKey } from '@taquito/signer'; import { TezosToolkit } from '@taquito/taquito'; -const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); importKey(Tezos, "p2sk2obfVMEuPUnadAConLWk7Tf4Dt3n4svSgJwrgpamRqJXvaYcg1") ``` @@ -45,11 +45,19 @@ importKey(Tezos, "p2sk2obfVMEuPUnadAConLWk7Tf4Dt3n4svSgJwrgpamRqJXvaYcg1") ``` import { BeaconWallet } from '@taquito/beacon-wallet'; import { TezosToolkit } from '@taquito/taquito'; -const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); -const option = { name: "nameOfWallet", network: { type: 'jakartanet' }} -const wallet = new BeaconWallet(option) -await wallet.requestPermissions() -Tezos.setWalletProvider(wallet) +const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); +const option = { name: "nameOfWallet", network: { type: 'ghostnet' }, enableMetrics: true}; +const wallet = new BeaconWallet(option); + +await wallet.client.subscribeToEvent( + BeaconEvent.ACTIVE_ACCOUNT_SET, + async (account) => { + // An active account has been set, update the dApp UI + console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account); + }, + +await wallet.requestPermissions(); +Tezos.setWalletProvider(wallet); ``` @@ -67,7 +75,7 @@ This JavaScript object : keys: ['edpkuLxx9PQD8fZ45eUzrK3BhfDZJHhBuK4Zi49DcEGANwd2rpX82t'] } ``` -Is equivilent to this Michelson expression : +Is equivalent to this Michelson expression : ``` (Pair 0 (Pair 1 { "edpkuLxx9PQD8fZ45eUzrK3BhfDZJHhBuK4Zi49DcEGANwd2rpX82t" })) @@ -85,7 +93,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation @@ -114,7 +122,7 @@ Tezos.contract ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation @@ -156,7 +164,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation @@ -181,7 +189,7 @@ Tezos.contract ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation @@ -217,7 +225,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation @@ -254,7 +262,7 @@ Tezos.contract ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // const genericMultisigJSONfile = require('./generic.json') // generic.json is referring to Michelson source code in JSON representation diff --git a/website/versioned_docs/version-20.0.0/package_bundle.md b/website/versioned_docs/version-20.0.0/package_bundle.md new file mode 100644 index 0000000000..5324905d10 --- /dev/null +++ b/website/versioned_docs/version-20.0.0/package_bundle.md @@ -0,0 +1,36 @@ +--- +title: Client-Side Environments +id: package_bundle +author: Davis Sawali +--- +# Using Taquito in Client-Side Environments +While Taquito works best in Node runtime applications, some of our users working in client-side development might not have access to such features. To accommodate for that, we have decided to provide separate pure JavaScript bundles that you can import into your client-side environment. + +Currently, the available bundles are `@taquito/local-forging` and `@taquito/beacon-wallet` packages. + +The bundle wraps functions from the `@taquito/local-forging` package into a single variable called `taquito_local_forging`, and from the `@taquito/beacon-wallet` package into a single variable called `taquito_beacon_wallet`. + +## Instructions for Using the Bundle + +To use the JavaScript bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases). + +After that, simply copy the `.js` file and the `.map.js` file into your project. + +Example of how to use the `LocalForger` class in a simple HTML script tag: +``` + + +``` +Example of how to use the `BeaconWallet` class in a simple HTML script tag: + +``` + + +``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/prepare.md b/website/versioned_docs/version-20.0.0/prepare.md similarity index 100% rename from website/versioned_docs/version-17.4.0/prepare.md rename to website/versioned_docs/version-20.0.0/prepare.md diff --git a/website/versioned_docs/version-17.4.0/proposal_and_ballot.md b/website/versioned_docs/version-20.0.0/proposal_and_ballot.md similarity index 100% rename from website/versioned_docs/version-17.4.0/proposal_and_ballot.md rename to website/versioned_docs/version-20.0.0/proposal_and_ballot.md diff --git a/website/versioned_docs/version-17.4.0/quick_start.md b/website/versioned_docs/version-20.0.0/quick_start.md similarity index 98% rename from website/versioned_docs/version-17.4.0/quick_start.md rename to website/versioned_docs/version-20.0.0/quick_start.md index 9bbe9b8ee4..3db98ac188 100644 --- a/website/versioned_docs/version-17.4.0/quick_start.md +++ b/website/versioned_docs/version-20.0.0/quick_start.md @@ -53,7 +53,7 @@ Alternatively, you can use a `WalletProvider` to interact with a wallet. Please ## Examples -### Get the current Tezos balance for an address +### Get the current Tezos spendable balance for an address ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; @@ -86,7 +86,7 @@ Tezos.setProvider({ }); ``` -The following link can be used to fund an address on the different testnets: https://teztnets.xyz/. +The following link can be used to fund an address on the different testnets: https://teztnets.com/. ### Transfer diff --git a/website/versioned_docs/version-17.4.0/rpc-cache.md b/website/versioned_docs/version-20.0.0/rpc-cache.md similarity index 100% rename from website/versioned_docs/version-17.4.0/rpc-cache.md rename to website/versioned_docs/version-20.0.0/rpc-cache.md diff --git a/website/versioned_docs/version-17.4.0/rpc_nodes.md b/website/versioned_docs/version-20.0.0/rpc_nodes.md similarity index 79% rename from website/versioned_docs/version-17.4.0/rpc_nodes.md rename to website/versioned_docs/version-20.0.0/rpc_nodes.md index 764fca96ce..6dea457825 100644 --- a/website/versioned_docs/version-17.4.0/rpc_nodes.md +++ b/website/versioned_docs/version-20.0.0/rpc_nodes.md @@ -25,21 +25,17 @@ values={[ |------------------|--------------|------------------------------------------|---------------------------------------------------------------------------------| | ECAD Labs | Mainnet | https://mainnet.ecadinfra.com | [Check](https://mainnet.ecadinfra.com/chains/main/blocks/head/header) | | ECAD Labs | Ghostnet | https://ghostnet.ecadinfra.com | [Check](https://ghostnet.ecadinfra.com/chains/main/blocks/head/header) | -| ECAD Labs | Nairobinet | https://nairobinet.ecadinfra.com | [Check](https://nairobinet.ecadinfra.com/chains/main/blocks/head/header) | -| ECAD Labs | Mumbainet | https://mumbainet.ecadinfra.com | [Check](https://mumbainet.ecadinfra.com/chains/main/blocks/head/header) | | SmartPy | Mainnet | https://mainnet.smartpy.io | [Check](https://mainnet.smartpy.io/chains/main/blocks/head/header) | | SmartPy | Ghostnet | https://ghostnet.smartpy.io | [Check](https://ghostnet.smartpy.io/chains/main/blocks/head/header) | | Tezos Foundation | Mainnet | https://rpc.tzbeta.net/ | [Check](https://rpc.tzbeta.net/chains/main/blocks/head/header) | -| Marigold | Mainnet | https://mainnet.tezos.marigold.dev/ | [Check](https://mainnet.tezos.marigold.dev/chains/main/blocks/head/header) | -| Marigold | Ghostnet | https://ghostnet.tezos.marigold.dev/ | [Check](https://ghostnet.tezos.marigold.dev/chains/main/blocks/head/header) | -| Marigold | Nairobinet | https://nairobinet.tezos.marigold.dev/ | [Check](https://nairobinet.tezos.marigold.dev/chains/main/blocks/head/header) | -| Marigold | Mumbainet | https://mumbainet.tezos.marigold.dev/ | [Check](https://mumbainet.tezos.marigold.dev/chains/main/blocks/head/header) | +| Tezos Foundation | Ghostnet | https://rpc.ghostnet.teztnets.com/ | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) | +| Tezos Foundation | Parisnet | https://rpc.parisnet.teztnets.com/ | [Check](https://rpc.parisnet.teztnets.com/chains/main/blocks/head/header) | *If you are aware of a public node missing from our list or our information is inaccurate, please help us by submitting an issue or pull request on our GitHub page.* -| Provider | Details | +| Provider | Details | |------------------|---------------------------------------------| | TzPro | https://tzpro.io/ | | MIDL.dev | https://midl.dev/tezos-rpc/ | diff --git a/website/versioned_docs/version-20.0.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-20.0.0/rpc_nodes_integration_test.md new file mode 100644 index 0000000000..76416813ac --- /dev/null +++ b/website/versioned_docs/version-20.0.0/rpc_nodes_integration_test.md @@ -0,0 +1,127 @@ +--- +title: RPC tests +author: Roxane Letourneau +--- + +## Steps to run the tests + +1. The RPC nodes' integration tests are disabled by default. +Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json. + + **parisnet**: `npm run test:parisnet rpc-nodes.spec.ts` + +**When all endpoints are accessible for a node, you will obtain:** + +``` + Test calling all methods from RPC node: http://parisnet.i.ecadinfra.com:8732/ + ✓ Verify that rpcClient.getBlockHash returns the head block hash (37 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (53 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (32 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the spendable balance excluding frozen bonds (37 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the spendable balance excluding frozen bonds (34 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the spendable balance excluding frozen bonds (37 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the spendable balance excluding frozen bonds (33 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the spendable balance excluding frozen bonds (29 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (35 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (33 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (30 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (30 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (30 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (30 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (151 ms) + ✓ Verify that rpcClient.getAllDelegates returns all delegates from RPC (132 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (32 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (30 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (33 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (46 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (34 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (33 ms) + ✓ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (38 ms) + ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (41 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (30 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (29 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (30 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (32 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (34 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (32 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (34 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (38 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (28 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (104 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (28 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (44 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (33 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (35 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (64 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (60 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (29 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (64 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (33 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (32 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (30 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (29 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (28 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (39 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for http://parisnet.i.ecadinfra.com:8732/ (29 ms) + ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (397 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (470 ms) + ○ skipped Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle null for http://parisnet.i.ecadinfra.com:8732/ +``` + +**Otherwise, you will see which endpoints do not work for a specific node:** + +``` + Test calling all methods from RPC node: http://localhost:20000 + ✓ Verify that rpcClient.getBlockHash returns the head block hash (13 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (18 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (13 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (8 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (10 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (11 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (7 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (8 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (10 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (11 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (15 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (12 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (11 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (8 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (93 ms) + ✓ Verify that rpcClient.getAllDelegates returns all delegates from RPC (132 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (10 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (7 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (10 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (10 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (9 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (6 ms) + ✓ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (12 ms) + ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (11 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (6 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (5 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (6 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (7 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (8 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (7 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (6 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (13 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (7 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (29 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (21 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (6 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (13 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (13 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (27 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (22 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (7 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (17 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (9 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (6 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (8 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (7 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (7 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (10 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle null for http://localhost:20000 (6 ms) + ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (313 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (323 ms) + ○ skipped Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for http://localhost:20000 +``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/rpc_package.md b/website/versioned_docs/version-20.0.0/rpc_package.md similarity index 85% rename from website/versioned_docs/version-17.4.0/rpc_package.md rename to website/versioned_docs/version-20.0.0/rpc_package.md index b09a5c57e9..9f1ec494c7 100644 --- a/website/versioned_docs/version-17.4.0/rpc_package.md +++ b/website/versioned_docs/version-20.0.0/rpc_package.md @@ -18,13 +18,13 @@ Methods in the RPC package map one-to-one to the corresponding Tezos RPC API end import { RpcClient } from '@taquito/rpc'; -const client = new RpcClient(' https://jakartanet.ecadinfra.com/', 'NetXLH1uAxK7CCh'); +const client = new RpcClient(' https://ghostnet.ecadinfra.com/', 'NetXLH1uAxK7CCh'); ``` The `RpcClient` constructor takes the URL of the node you want to use and the chain ID. ```js -/* Fetching the balance of an account +/* Fetching the spendable balance of an account * using the client set up above */ const balance = await client.getBalance('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'); @@ -96,7 +96,7 @@ const packedData = await client.packData({ data: { string: 'test' }, type: { pri console.log('-- Packed data:', packedData); ``` -You can simulate the `PACK` instruction from Michelson with the `packData` method. +You can simulate the `PACK` instruction from Michelson with the `packData` method. This function will execute Tzip4 views normally referred to as 'Lambda Views'. You can learn more about Tzip4 [here](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints) ```js @@ -111,17 +111,6 @@ const view = await client.runView({ }); ``` -You can obtain the `Origination Proof` for the `smart_rollup_originate` batch operation (not needed for the `smart_rollup_originate` alone) - -This function will obtain the proof needed for the `smart_rollup_originate` batch method -```js -const originationProof = await client.getOriginationProof({ - kernel: 'your kernel', - kind: 'PVM kind' -}) -``` - - ## Full documentation -You can find the full documentation at the following address: [https://taquito.io/typedoc/classes/\_taquito_rpc.rpcclient.html](https://taquito.io/typedoc/classes/_taquito_rpc.rpcclient.html) +You can find the full documentation at the following address: [https://taquito.io/typedoc/classes/_taquito_rpc.RpcClient](https://taquito.io/typedoc/classes/_taquito_rpc.RpcClient) diff --git a/website/versioned_docs/version-17.4.0/sapling.md b/website/versioned_docs/version-20.0.0/sapling.md similarity index 100% rename from website/versioned_docs/version-17.4.0/sapling.md rename to website/versioned_docs/version-20.0.0/sapling.md diff --git a/website/versioned_docs/version-17.4.0/sapling_in_memory_spending_key.md b/website/versioned_docs/version-20.0.0/sapling_in_memory_spending_key.md similarity index 100% rename from website/versioned_docs/version-17.4.0/sapling_in_memory_spending_key.md rename to website/versioned_docs/version-20.0.0/sapling_in_memory_spending_key.md diff --git a/website/versioned_docs/version-17.4.0/sapling_in_memory_viewing_key.md b/website/versioned_docs/version-20.0.0/sapling_in_memory_viewing_key.md similarity index 99% rename from website/versioned_docs/version-17.4.0/sapling_in_memory_viewing_key.md rename to website/versioned_docs/version-20.0.0/sapling_in_memory_viewing_key.md index 88ac26e839..b7772ad39b 100644 --- a/website/versioned_docs/version-17.4.0/sapling_in_memory_viewing_key.md +++ b/website/versioned_docs/version-20.0.0/sapling_in_memory_viewing_key.md @@ -16,7 +16,7 @@ const inMemoryViewingKey = new InMemoryViewingKey( ### Instantiation from an unencrypted spending key: -```js +```js import { InMemoryViewingKey } from '@taquito/sapling'; InMemoryViewingKey.fromSpendingKey( @@ -31,7 +31,7 @@ InMemoryViewingKey.fromSpendingKey( ### Instantiation from an encrypted spending key: -```js +```js import { InMemoryViewingKey } from '@taquito/sapling'; InMemoryViewingKey.fromSpendingKey( @@ -49,7 +49,7 @@ InMemoryViewingKey.fromSpendingKey( The `InMemoryViewingKey` class has a method named `getAddress`, allowing to derive addresses (zet) from the viewing key. An index can be specified as a parameter, or the default value `0` will be used. -```js +```js import { InMemoryViewingKey } from '@taquito/sapling'; const inMemoryViewingKey = new InMemoryViewingKey( diff --git a/website/versioned_docs/version-17.4.0/set_delegate.md b/website/versioned_docs/version-20.0.0/set_delegate.md similarity index 100% rename from website/versioned_docs/version-17.4.0/set_delegate.md rename to website/versioned_docs/version-20.0.0/set_delegate.md diff --git a/website/versioned_docs/version-17.4.0/signing.md b/website/versioned_docs/version-20.0.0/signing.md similarity index 95% rename from website/versioned_docs/version-17.4.0/signing.md rename to website/versioned_docs/version-20.0.0/signing.md index 68b5bb3965..022ee1021a 100644 --- a/website/versioned_docs/version-17.4.0/signing.md +++ b/website/versioned_docs/version-20.0.0/signing.md @@ -48,12 +48,12 @@ const formattedInput: string = [ ].join(' '); ``` -After formatting the string properly, you can convert it into bytes, for example, with the `char2Bytes` function of the `@taquito/utils` package: +After formatting the string properly, you can convert it into bytes, for example, with the `stringToBytes` function of the `@taquito/utils` package: ```js -import { char2Bytes } from '@taquito/utils'; +import { stringToBytes } from '@taquito/utils'; -const bytes = char2Bytes(formattedInput); +const bytes = stringToBytes(formattedInput); const bytesLength = (bytes.length / 2).toString(16); const addPadding = `00000000${bytesLength}`; const paddedBytesLength = addPadding.slice(addPadding.length - 8); @@ -90,7 +90,7 @@ The wallet will return an object with a `signature` property that holds our sign Here is the full code to sign data with a wallet: ```ts -import { char2Bytes } from '@taquito/utils'; +import { stringToBytes } from '@taquito/utils'; import { RequestSignPayloadInput, SigningType } from '@airgap/beacon-sdk'; // The data to format @@ -107,7 +107,7 @@ const formattedInput: string = [ ].join(' '); // The bytes to sign -const bytes = char2Bytes(formattedInput); +const bytes = stringToBytes(formattedInput); const bytesLength = (bytes.length / 2).toString(16); const addPadding = `00000000${bytesLength}`; const paddedBytesLength = addPadding.slice(addPadding.length - 8); @@ -143,7 +143,7 @@ const isVerified = verifySignature( ## Signing Michelson data -Taquito also offers the possibility to sign Michelson code. This feature can be useful, for example, if you need to send a lambda to a contract to be executed but want to restrict the number of users who can submit a lambda by verifiying the signer's address. The signing of Michelson code requires the use of the `michel-codec` package: +Taquito also offers the possibility to sign Michelson code. This feature can be useful, for example, if you need to send a lambda to a contract to be executed but want to restrict the number of users who can submit a lambda by verifying the signer's address. The signing of Michelson code requires the use of the `michel-codec` package: ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; diff --git a/website/versioned_docs/version-20.0.0/smart_rollups.md b/website/versioned_docs/version-20.0.0/smart_rollups.md new file mode 100644 index 0000000000..c29f0caa83 --- /dev/null +++ b/website/versioned_docs/version-20.0.0/smart_rollups.md @@ -0,0 +1,98 @@ +--- +title: Smart Rollups +author: Davis Sawali & Andrew Skubarenko +--- + +# Smart Optimistic Rollups + +Rollups are a permissionless scaling implementation for the Tezos blockchain. The idea is that anyone can originate and operate one or more rollups, increasing the overall throughput of the Tezos blockchain. + +In Taquito, we have implemented some of the operations included in Mumbai protocol update in regards to smart rollups. In this document, we will go through the operations we support. We also won't go too detailed on how rollups work behind the scenes, if you'd like to understand the feature a bit deeper, you can refer to [this document](https://tezos.gitlab.io/active/smart_rollups.html). + +## `smart_rollup_originate` + +The `Smart Rollup Originate` operation allows a user to originate a smart rollup. Users must pass a `kernel`, `pvmKind`, and `parameterType`. + +### Examples + +```typescript +const op = await Tezos.contract.smartRollupOriginate({ + pvmKind: 'wasm_2_0_0', + kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', + parametersType: { prim: 'bytes' }, + +}); +await op.confirmation(); +``` + +##### please note +- `pvmKind` at this time the only PVM supported is `wasm_2_0_0` +- `kernel` is passed as a hexadecimal string examples can be found at [this tezos docs endpoint](https://tezos.gitlab.io/active/smart_rollups.html) +- `parametersType` is a MichelsonV1Expression to define the type. + +For more information in regards to Smart Rollup Origination please refer to this [link](https://tezos.gitlab.io/active/smart_rollups.html#origination) + + +## `smart_rollup_add_messages` +The add messages operation allows users to send external messages into a rollup inbox. We will go into a bit more detail down below on what that means. + +### Usage +The main use case of sending messages, is usually to denote contract calls. These messages usually takes the form of this object: +``` +MESSAGE='[{\ + "destination" : "${CONTRACT}", \ + "parameters" : "\"Hello world\"", \ + "entrypoint" : "default" + }]' +``` + +If you read closely, the message includes a `destination`, a `parameter`, and an `entrypoint` property. All components needed to **call an entrypoint** of a contract. + +These messages can then be claimed back into L1 as a legitimate contract call using the `smart_rollup_execute_outbox_message` operation which we will go over in another section of this doc. + +for more information, refer to [this document](https://tezos.gitlab.io/active/smart_rollups.html#external-messages) + +### Example +```typescript +const op = await Tezos.contract.smartRollupAddMessages({ + message: [ + '0000000031010000000b48656c6c6f20776f726c6401bdb6f61e4f12c952f807ae7d3341af5367887dac000000000764656661756c74' + ] +}); + +await op.confirmation(); +``` + +- `message` property receives an array of encoded outbox messages. + +## `smart_rollup_execute_outbox_message` + +The `Smart Rollup Execute Outbox Message` operation allows users to execute a transaction from a smart rollup to a smart contract on L1. + +### Usage + +To execute an outbox message you need the Smart Rollup address (`sr1` address), a serialized output proof, and a commitment hash. +You may obtain the serialized output proof and commitment hash through an RPC call to the Smart Rollup Node at the following URL: +`/global/block/head/helpers/proofs/outbox/${outboxMessageLevel}/messages?index=${outboxMessageIndex}` +Where: +* `outboxMessageLevel` is the Tezos level of the outbox message; +* `outboxMessageIndex` is the index (number) of the outbox message. + +The outbox message can only be executed when the corresponding commitment is cemented. + +### Example +```typescript +const op = await Tezos.contract.smartRollupExecuteOutboxMessage({ + rollup: 'sr1JZsZT5u27MUQXeTh1aHqZBo8NvyxRKnyv', + cementedCommitment: 'src13rFpXGRRwQTPRcvTA8Ka5avJMt6MCrCEodDTCvD65BVVEoShoh', + outputProof: '0300022a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc42a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc40005820764757261626c65d0fd4fa3d7652e389a9c14bbb6e953dfc6f24a9ccdecc03eeeccfcc0075501707203746167c00800000004536f6d650003c08fb36af2c3a3c484ef7def3b75bad4d006ca0c06352b49d50d536911cfbbacca820576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075740004820132810a6c6173745f6c6576656cc004002c8f830133810f76616c69646974795f706572696f64c00400013b0082013181086f7574626f786573010e600107270103b5c08970095f2f084b393b1093c43734c9b8371807d58c3f5bd5098928d471b63b610101d000ec0071003200120009c075e2f509c2fb0a2df579d7bfb4d5485f535bb008ab32b1c1864e32bf668e87850004c0de4fa8f44890700c27f5bec943e3a52d9358b6546c5ed9536357d796584082ce0003820732393136393038820468656164c00100066c656e677468c0010007323932303239330003810468656164c001008208636f6e74656e7473810130c0d3000000cf00000000ca07070a0000001600000ff91d3da1fbeb517f3013deb5f53ceb3c79b2ec07070a0000001601a6938a03cf1d7652a7b871bd9c7c36b4655fa8030007070707000005090a0000005f05020000005907040100000010636f6e74726163745f616464726573730a0000001c050a000000160155275f943ba305902a52dbf648236db528e0f015000704010000000a746f6b656e5f747970650a0000000b0501000000054641312e32000101a6938a03cf1d7652a7b871bd9c7c36b4655fa80300000000087769746864726177066c656e677468c00101c01540203d8ed40eb550a640e0a93959284db1db2ae7a22d95cfcb7bf90655606ac0b7669db7270cf56b96a65db8a095be7800b68185ef3b2998ec2c62c5d2127574c00a83cbf5571a4df7c7fb7ad52c0e2488e7806cfcff0006b43d9abedc9c3f890dc09ae7b17d5faebe09f353bc3f7e1a67fed29710f70052e555e639a40932b16219c00df2b1cf98a44ba1724099c701f01f30db27c9f2b2f275c645a542141dc57d1bc0419dbdeb356925d5159c7ffb0b45fab6a2f68038106a1ded29485d5c83f076a4c007b1745e44e8f29e61de390bb77fde5f5c2930acb453b6dedfcb07e764e469e0c02bb1d1c11668833303d590910b72528ccc5ab8afda97f8494ca98c35eb6303f90134810d6d6573736167655f6c696d6974c002a401047761736dd02cdd11922873ef08de5097a6434a4404a4230a17b01c9c37a2647084270ee0632a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc4002c8f650000000000ca07070a0000001600000ff91d3da1fbeb517f3013deb5f53ceb3c79b2ec07070a0000001601a6938a03cf1d7652a7b871bd9c7c36b4655fa8030007070707000005090a0000005f05020000005907040100000010636f6e74726163745f616464726573730a0000001c050a000000160155275f943ba305902a52dbf648236db528e0f015000704010000000a746f6b656e5f747970650a0000000b0501000000054641312e32000101a6938a03cf1d7652a7b871bd9c7c36b4655fa80300000000087769746864726177' +}); + +await op.confirmation(); +console.log(op.hash); +// Output: onyjJoL7TeSLy1AjWuLQVRqTWVc7pRhq4VhDyMQXXMTjuv7pEtV +``` + +- `rollup` is a rollup address (`sr1` address) +- `cementedCommitment` is a hash of cemented commitment +- `outputProof` is a serialized output proof containing the transaction to be executed on L1. diff --git a/website/versioned_docs/version-17.4.0/smartcontracts.md b/website/versioned_docs/version-20.0.0/smartcontracts.md similarity index 91% rename from website/versioned_docs/version-17.4.0/smartcontracts.md rename to website/versioned_docs/version-20.0.0/smartcontracts.md index 29ebecf016..f4228884de 100644 --- a/website/versioned_docs/version-17.4.0/smartcontracts.md +++ b/website/versioned_docs/version-20.0.0/smartcontracts.md @@ -26,7 +26,7 @@ The counter contract has two entry points named `increment` and `decrement.` Taq The counter contract's storage is a simple integer that gets increased or decreased based on the calls to the entrypoints. -### Counter Contract in JSLIGO v1.1.0 +### Counter Contract in JSLIGO v1.3.0 ``` namespace Counter { @@ -211,24 +211,23 @@ Tezos.wallet ## Choosing between the `methods` or `methodsObject` members to interact with smart contracts :::note -Since Taquito version 10.2.0, the parameter can be passed in an object format when calling a smart contract entry point. +Since Taquito version 16.2.0, we introduced syntax support for nested options in `methodsObject` but not `methods` due to the limitation of the flattened form. We recommend users migrate to using `methodsObject` as its syntax is consistent with storage parameters, supports all Michelson data types, and is continually maintained. -The `ContractAbstraction` class has a new member called `methodsObject`, which serves the same purpose as the `methods` member. The format expected by the smart contract method differs: `methods` expects flattened arguments while `methodsObject` expects an object. - -It is at the user's discretion to use their preferred representation. We wanted to provide Taquito users with a way to pass an object when calling a contract entry point using a format similar to that used by the storage parameter when deploying a contract. +Since Taquito version 10.2.0, parameters can be passed in an object format when calling a smart contract entry point. The `ContractAbstraction` class has a new member called `methodsObject`, which serves the same purpose as the `methods` member. The format expected by the smart contract method differs: methods expect flattened arguments while `methodsObject` expects an object. `methodsObject` provides Taquito users with a way to pass an object when calling a contract entry point using a format similar to that used by the storage parameter when deploying a contract. An example showing the difference is provided below. ::: - -In the following example, a contract's `set_child_record` method will be called by passing the arguments using the flattened representation. The `methods` member of the `ContractAbstraction` class allows doing so. First, it is possible to obtain details about the signature of the `set_child_record` entry point by using the `getSignature` method as follow: + + +In the following example, a contract's `set_child_record` method will be called by passing the parameter in an object format. The `methodsObject` member of the `ContractAbstraction` class allows doing so. First, it is possible to obtain details about the signature of the `set_child_record` entry point by using the `getSignature` method as follow: ```js live noInline // const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); @@ -239,7 +238,7 @@ Tezos.contract println(`List all contract methods: ${Object.keys(contract.methodsObject)}\n`); println( `Inspect the signature of the 'set_child_record' contract method: ${JSON.stringify( - contract.methods.set_child_record().getSignature(), + contract.methodsObject.set_child_record().getSignature(), null, 2 )}` @@ -248,7 +247,7 @@ Tezos.contract .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` -The preceding example returns an array which contains the different possible signatures. Different signatures are possible as the `set_child_record` method contains some optional arguments. In the following example the `set_child_record` method is called by passing the arguments in the flattened way: +The preceding example returns an object giving indication on how to structure the parameter when calling the`set_child_record` method. Here is an example where the `set_child_record` method is called by passing the parameter in an object format: ```js live noInline // import { TezosToolkit, MichelsonMap } from '@taquito/taquito'; @@ -260,15 +259,14 @@ importKey(Tezos, secretKey) return Tezos.contract.at('KT1B2exfRrGMjfZqWK1bDemr3nBFhHsUWQuN'); }) .then((contract) => { - return contract.methods - .set_child_record( - 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', //address(optional) - new MichelsonMap(), //data - 'EEEE', //label - 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', //owner - 'FFFF', //parent - '10' //ttl(optional) - ) + return contract.methodsObject + .set_child_record({ + address: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', + data: new MichelsonMap(), + label: 'EEEE', + owner: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', + parent: 'FFFF', + }) .send(); }) .then((op) => { @@ -278,11 +276,10 @@ importKey(Tezos, secretKey) .then((hash) => println(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` + + - - - -In the following example, a contract's `set_child_record` method will be called by passing the parameter in an object format. The `methodsObject` member of the `ContractAbstraction` class allows doing so. First, it is possible to obtain details about the signature of the `set_child_record` entry point by using the `getSignature` method as follow: +In the following example, a contract's `set_child_record` method will be called by passing the arguments using the flattened representation. The `methods` member of the `ContractAbstraction` class allows doing so. First, it is possible to obtain details about the signature of the `set_child_record` entry point by using the `getSignature` method as follow: ```js live noInline // const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); @@ -293,7 +290,7 @@ Tezos.contract println(`List all contract methods: ${Object.keys(contract.methodsObject)}\n`); println( `Inspect the signature of the 'set_child_record' contract method: ${JSON.stringify( - contract.methodsObject.set_child_record().getSignature(), + contract.methods.set_child_record().getSignature(), null, 2 )}` @@ -302,7 +299,7 @@ Tezos.contract .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` -The preceding example returns an object giving indication on how to structure the parameter when calling the`set_child_record` method. Here is an example where the `set_child_record` method is called by passing the parameter in an object format: +The preceding example returns an array which contains the different possible signatures. Different signatures are possible as the `set_child_record` method contains some optional arguments. In the following example the `set_child_record` method is called by passing the arguments in the flattened way: ```js live noInline // import { TezosToolkit, MichelsonMap } from '@taquito/taquito'; @@ -314,14 +311,15 @@ importKey(Tezos, secretKey) return Tezos.contract.at('KT1B2exfRrGMjfZqWK1bDemr3nBFhHsUWQuN'); }) .then((contract) => { - return contract.methodsObject - .set_child_record({ - address: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', - data: new MichelsonMap(), - label: 'EEEE', - owner: 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', - parent: 'FFFF', - }) + return contract.methods + .set_child_record( + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', //address(optional) + new MichelsonMap(), //data + 'EEEE', //label + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', //owner + 'FFFF', //parent + '10' //ttl(optional) + ) .send(); }) .then((op) => { @@ -331,10 +329,11 @@ importKey(Tezos, secretKey) .then((hash) => println(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` + [0]: https://ligolang.org/ [1]: https://smartpy.io/ -[2]: https://ide.ligolang.org/p/839HdMaflPsQSA6k1Ce0Wg +[2]: https://ide.ligolang.org/local/default-project [3]: https://tezos.gitlab.io/whitedoc/michelson.html \ No newline at end of file diff --git a/website/versioned_docs/version-20.0.0/staking.md b/website/versioned_docs/version-20.0.0/staking.md new file mode 100644 index 0000000000..64343e3940 --- /dev/null +++ b/website/versioned_docs/version-20.0.0/staking.md @@ -0,0 +1,168 @@ +--- +title: Staking and Adaptive Issuance +author: Alireza Haghshenas +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Staking and Adaptive Issuance + +Staking is an update to the "Proof of Stake" Mechanism in Tezos. + +Before Staking, the only way for Tez holders to participate in the network was by delegating their tokens to a baker. Delegated funds contributed to a delegate's voting and baking power, but were not subject to staking: they could not be slashed in case the baker misbehaved. This is a useful feature for many users, but limits the total amount of staked tez to the amount of tez that bakers themselves hold. In other words, participating in the "Proof of Stake" mechanism required setting up and maintaining a baker, which is a significant barrier to entry for many users. + +Staking changes this by allowing any user to participate in the "Proof of Stake" mechanism without setting up a baker. Users can now stake their tokens to their delegates, and their staked tokens will be subject to slashing in case of delegate/baker's misbehaviour. This allows the total amount of staked Tez to be much higher than the amount of tez that bakers themselves hold, which in turn increases the security of the network. + +Users can control their staked funds using the `stake`, `unstake`, and `finalize_unstake` operations. These are implemented as pseudo-entrypoints, and the parameters are passed to a transfer operation with the same destination as the sender. + +To accept staked funds, a delegate needs to have opted in to staking. This is done by `set_delegate_parameters`. This part is not supported by Taquito, as it is not a dApp operation. More information [here](https://tezos.gitlab.io/paris/adaptive_issuance.html#staking-policy-configuration). + +:::info +After protocol Paris is activated, the adaptive issuance will still be disabled for about two weeks. During this period, staking operations will result in this error: `proto.019-PtParisB.operation.manual_staking_forbidden`. +::: + +# Staking Funds +To stake your funds, you need to call the `stake` operation. +Before you can stake your funds, two conditions should be met: +1. You need yor have delegated your funds to a delegate before you can stake them (by calling [`setDelegate`](#set_delegate)) +1. Your delegate should accept staking by calling `set_delegate_parameters` + + + + + +```javascript + +const op = await Tezos.contract.stake({ + amount: 100, + mutez: false + }); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.stake({ + amount: 100, + mutez: false + }).send(); + await op.confirmation(); + +``` + + + + +# Unstaking Funds + +To unstake your funds, you need to call the `unstake` operation. This will change your fund's status to "Unstaked + Frozen" +The unstaked funds will still be frozen (and subject to slashing for 4 cycles). After that, your funds will be in "Unstaked + Finalizable" state. + + + + +```javascript + +const op = await Tezos.contract.unstake({ + amount: 50, + mutez: false + }); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.unstake({ + amount: 50, + mutez: false + }).send(); + await op.confirmation(); + +``` + + + + +# Finalizing Unstake + +To finalize your unstaked funds, you need to call the `finalize_unstake` operation. This will change your fund's status back to "spendable". + + + + +```javascript + +const op = await Tezos.contract.finalizeUnstake(); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.finalizeUnstake().send(); + await op.confirmation(); + +``` + + + + +# Additional Info and Some Notes + +## Cycle +At the time of this writing, a cycle is ~~16384~~ blocks (with Paris protocol will be 24576), and ~~15~~ (10) seconds per block. This means a cycle is about 2.8 days (and will stay the same after Paris). This might change with the activation of newer protocols. + +## Overstaking +A delegate can set the maximum amount of staking they can accept, as a multiply of their own balance. If a delegate's limit is exceeded, the exceeding stake is automatically considered as delegation for the delegate's baking and voting power calculation, but it does remain slashable. That means it's your responsibility to make sure you're not overstaking. Remember that overstaking can even happen after you have staked successfully, because your delegate changes their own balance, or their staking parameter. + + +## Changing Delegate +When you change your delegate, your funds will be automatically unstaked. You will have to wait for 4 cycles before you can stake them again. + +## No need to finalize_unstake in some cases +The `stake` and `unstake` operations will automatically finalize all currently finalizable funds. + +## Adaptive Issuance +A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/paris/adaptive_issuance.html#adaptive-issuance). + +## Staking Rewards +In delegation, rewards were given to the baker, and it was the baker's responsibility to distribute the rewards to the delegators. In staking, the rewards are given directly to the staker. However, rewards are not given immediately, but are distributed through staked (frozen) balance, and the user can spend the reward along with their initial stake when they `unstake` and `finalize_unstake`. + +## Lifetime of Staked Funds + +Before you stake some of your Tez, it is in "Spendable" state. When you stake it, it will be in "Staked" state. When you unstake it, it will be in "Unstaked + Frozen" state, this fund is still subject to slashing. After 4 cycles, it will be in "Unstaked + Finalizable" state. You can finalize it to make it "Spendable" again. + +```mermaid +graph LR +A[Spendable] -- "stake(amount)" --> B[Staked] +B -- "unstake(amount)" --> C[Unstaked + Frozen] +C -- wait 4 cycles --> D[Unstaked + Finalizable] +D -- finalize_unstake --> A +``` diff --git a/website/versioned_docs/version-17.4.0/storage_annotations.md b/website/versioned_docs/version-20.0.0/storage_annotations.md similarity index 92% rename from website/versioned_docs/version-17.4.0/storage_annotations.md rename to website/versioned_docs/version-20.0.0/storage_annotations.md index 6763d67634..998103c9ac 100644 --- a/website/versioned_docs/version-17.4.0/storage_annotations.md +++ b/website/versioned_docs/version-20.0.0/storage_annotations.md @@ -36,7 +36,7 @@ values={[ ```js live noInline -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.contract .originate({ @@ -62,7 +62,7 @@ Tezos.contract ```js live noInline wallet -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.wallet .originate({ @@ -84,7 +84,7 @@ Tezos.wallet println(`Origination completed.`); }) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); -``` +``` @@ -111,7 +111,7 @@ values={[ ```js live noInline -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.contract .originate({ @@ -137,7 +137,7 @@ Tezos.contract ```js live noInline wallet -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.wallet .originate({ @@ -159,7 +159,7 @@ Tezos.wallet println(`Origination completed.`); }) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); -``` +``` @@ -188,7 +188,7 @@ values={[ ```js live noInline -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.contract .originate({ @@ -215,7 +215,7 @@ Tezos.contract ```js live noInline wallet -// const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); Tezos.wallet .originate({ @@ -237,6 +237,6 @@ Tezos.wallet println(`Origination completed.`); }) .catch((error) => println(`Error: ${JSON.stringify(error, null, 2)}`)); -``` +``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/taquito_utils.md b/website/versioned_docs/version-20.0.0/taquito_utils.md similarity index 100% rename from website/versioned_docs/version-17.4.0/taquito_utils.md rename to website/versioned_docs/version-20.0.0/taquito_utils.md diff --git a/website/versioned_docs/version-17.4.0/testing_strategies.md b/website/versioned_docs/version-20.0.0/testing_strategies.md similarity index 97% rename from website/versioned_docs/version-17.4.0/testing_strategies.md rename to website/versioned_docs/version-20.0.0/testing_strategies.md index a4d1ac6249..c9149b19a0 100644 --- a/website/versioned_docs/version-17.4.0/testing_strategies.md +++ b/website/versioned_docs/version-20.0.0/testing_strategies.md @@ -3,24 +3,24 @@ title: Taquito Testing Strategies id: testing_strategies author: Michael Kernaghan --- - + ### How Taquito is Tested - + #### General Philosophy - + We write and maintain tests so that we may check that the software we create will do what we think it should do and alert us when it doesn’t. This link offers more detail on software testing philosophy in general: https://www.codesimplicity.com/post/the-philosophy-of-testing/. - + #### Assumptions - + Taquito is a library. It offers tools. To test that Taquito is suitable for use, we must ensure that each tool the library provides does what it is supposed to. We also need to check that changes to support new features have not broken old features. - + We use the following Test Heuristics to achieve these assurance goals. Taquito uses several of these in the CI/CD pipeline. - + ### Unit Tests - + Unit Tests are detailed tests of simple software components at the atomic level. Taquito includes unit tests in each of its packages. Here is an example: - + ```javascript it('Public key returned by ledger device should be compressed adequately for tz1 before b58 encoding', () => { const buff = Buffer.from( @@ -34,15 +34,15 @@ Unit Tests are detailed tests of simple software components at the atomic level. ); }); ``` - + Sometimes a Unit Test will use a Mock to simulate interactions between the software and some external component. We measure how comprehensive our unit test coverage is by running "test code coverage tools" that report on the lines of code that are not touched when running unit tests. We can verify that unit tests are effecctive with "mutation testing" described below. - + ### Integration Tests Integration Tests look to ensure that multiple software components are working together. These components might be created by different teams or run on separate machines. The integration of various components can make these tests susceptible to random failures, but they will be rerun until they pass. Taquito testing routinely runs hundreds of integration tests daily. - + Here is a simple example of an integration test. The test sends Taquito instructions to a live test node with the transactions processed on the blockchain. This test originates a contract on the chain with transfers and verifies that confirmation is received. - + ```javascript it('Simple transfers with origination', async () => { const batch = await Tezos.batch() @@ -54,31 +54,31 @@ Here is a simple example of an integration test. The test sends Taquito instruct code: ligoSample, storage: 0, }) - + const op = await batch.send(); await op.confirmation(); expect(op.status).toEqual('applied') }) ``` - + ### Code Reviews - + We do Code Reviews whenever a developer seeks to merge code. Other team members review it for correctness, accuracy, conformance with Taquito design overall, and suitability. This process will rapidly find problems that testing would either miss or take wasteful cycles to resolve. We will not merge code changes or new features unless they have been code reviewed and all requested changes are determined. - + ### Static Code Analysis - + Static Code Analysis is run during the CICD cycle to do syntactic checks for errors in the code. Often a line marking a merge conflict or a violation of a coding format will cause a static analyzer to complain. During a CICD run, a Pull Request will be examined by [CodeQL](https://codeql.github.com/) and [Snyk](https://snyk.io/). - + ### End-to-End Tests - + Taquito uses the Taquito Test Dapp and the Live Code examples in the documentation as end-to-end tests. The tests exercise the entire software stack between the blockchain node and the user-facing interface. These tests show that all the components are working together. At each Taquito release, these tests are checked, and the results are included in the release. - + ### Mutation Tests - + Mutation testing is a way to verify the effectiveness of unit tests. In addition to the code coverage of unit tests, we can check that the tests are resilient against all sorts of code changes. We all understand the intuition that if you change some code and no test fails, then the tests are missing something. Mutation testing tools allow us to implement this intuition and find missed test cases, confusing tests, missing assertions, etc. Taquito has been using Stryker to identify test mutations and systematically remove them from the code base. For details on how mutation testing works, please see: https://stryker-mutator.io/docs/. - + ### Manual Tests - + When a user raises an issue, Testers will verify the problem using manual methods. For Taquito, such testing could be: a quick Taquito script, checking a result with tezos-client, @@ -87,23 +87,23 @@ rerunning scripts with variations each time, or other exploratory activities around the code base that are not fully scripted tests in the CICD. Ledger Devices require manual testing as they have buttons that an operator must press to authorize signatures and transactions. There are emulators for Ledger Devices, but Taquito testing of ledger devices combines manual and scripted exploratory testing. - + ### Security Tests - + Taquito has implemented some security tests in its integration test suite. These tests check for regressions in the Tezos code that could open known attack techniques. The tests verify that a particular attack is impossible and that appropriate error messaging and exceptions occur when the tests try some well-known attacks. - + ### Performance - + Ecad DevOps maintains an extensive performance tracking monitoring setup using Loki and Grafana, which generates alerts when specific performance parameters are out of band. - + ## Managing Tezos Protocol Migrations with Test Nets - + Each time Tezos changes protocol, there is a new test net, and old ones are deprecated. Contracts originated in a more senior test net must be originated again on the new testnet. We have to update RPC content values and recreate Live Code Example contracts. So each protocol change requires an overhaul of some of the test assets to suit the new protocol. - -The Taquito test suite will run tests in CICD against the current and next test net. There is also testing of “Mondaynet,” which represents the bleeding edge of the available Tezos test code. - + +The Taquito test suite will run tests in CICD against the current and next test net. There is also testing of “Weeklynet,” which represents the bleeding edge of the available Tezos test code. + ECAD Devops maintains a suite of Tezos public nodes that the Tezos community can use. By supporting and monitoring these nodes, ECAD engineers have an overview and insights into the behaviour of these systems and can contribute to problem isolation, bug fixes and general troubleshooting; or specific test scenarios that require DevOps level node access. - -### Mondaynet and Daily net - -To keep up with the current changes proposed for the following Tezos protocol, we can run our integration test suite against the node called "Mondaynet." This node captures the head of the Tezos development branch each Monday. By regression testing this node, we can ascertain changes Taquito may need to make early in the protocol development process. There is also "Daily net," which offers the current Tezos branch head each day. \ No newline at end of file + +### Weeklynet and Daily net + +To keep up with the current changes proposed for the following Tezos protocol, we can run our integration test suite against the node called "Weeklynet." This node captures the head of the Tezos development branch each Monday. By regression testing this node, we can ascertain changes Taquito may need to make early in the protocol development process. There is also "Daily net," which offers the current Tezos branch head each day. \ No newline at end of file diff --git a/website/versioned_docs/version-17.4.0/tezbridge_signer.md b/website/versioned_docs/version-20.0.0/tezbridge_signer.md similarity index 100% rename from website/versioned_docs/version-17.4.0/tezbridge_signer.md rename to website/versioned_docs/version-20.0.0/tezbridge_signer.md diff --git a/website/versioned_docs/version-17.4.0/tezos_domains.md b/website/versioned_docs/version-20.0.0/tezos_domains.md similarity index 89% rename from website/versioned_docs/version-17.4.0/tezos_domains.md rename to website/versioned_docs/version-20.0.0/tezos_domains.md index e7c597ca99..c4981352e7 100644 --- a/website/versioned_docs/version-17.4.0/tezos_domains.md +++ b/website/versioned_docs/version-20.0.0/tezos_domains.md @@ -16,7 +16,7 @@ If you have an address and you want to find the domain tied to it, the storage o ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { bytes2Char } from "@taquito/utils"; +import { bytesToString } from "@taquito/utils"; const domainContractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -27,7 +27,7 @@ const fetchTezosDomainFromAddress = async (address: string): Promise => const storage: any = await contract.storage(); const domain = await storage.store.reverse_records.get(address); if (domain) { - return bytes2Char(domain.name); + return bytesToString(domain.name); } else { return address; } @@ -37,7 +37,7 @@ const fetchTezosDomainFromAddress = async (address: string): Promise => 2 things to remember when you are looking for a Tezos domain in the storage of the contract: - the `reverse_records` bigmap is nested inside the `store` property -- the domain name is stored as bytes, so you can use the `bytes2Char` function from `@taquito/utils` to decode it as a string. +- the domain name is stored as bytes, so you can use the `bytesToString` function from `@taquito/utils` to decode it as a string. If we call the `fetchTezosDomainFromAddress` function with `tz1aauXT4uM8ZB3ouu5JrAenEMQdqfvDUSNH`, it will return `taquito.tez`. @@ -47,7 +47,7 @@ It is also possible to look up a domain name to find the address it references. ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { char2Bytes } from "@taquito/utils"; +import { stringToBytes } from "@taquito/utils"; const contractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -56,7 +56,7 @@ const fetchAddressFromTezosDomain = async (domainName: string): Promise const Tezos = new TezosToolkit("https://mainnet.ecadinfra.com"); const contract = await Tezos.wallet.at(contractAddress); const storage: any = await contract.storage(); - const domain = await storage.store.records.get(char2Bytes(domainName)); + const domain = await storage.store.records.get(stringToBytes(domainName)); if (domain) { return domain.address; // address that the domain points to // return domain.owner; // address that owns the domainName @@ -76,7 +76,7 @@ To find the expiry date, you can check the `expiry_map` bigmap under the `store` ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { char2Bytes } from "@taquito/utils"; +import { stringToBytes } from "@taquito/utils"; const contractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -85,7 +85,7 @@ const fetchExpiryDate = async (domainName: string): Promise => { const Tezos = new TezosToolkit("https://mainnet.ecadinfra.com"); const contract = await Tezos.wallet.at(contractAddress); const storage: any = await contract.storage(); - const expiryDate = await storage.store.expiry_map.get(char2Bytes(domainName)); + const expiryDate = await storage.store.expiry_map.get(stringToBytes(domainName)); if (expiryDate) { return expiryDate; } else { diff --git a/website/versioned_docs/version-17.4.0/tickets.md b/website/versioned_docs/version-20.0.0/tickets.md similarity index 100% rename from website/versioned_docs/version-17.4.0/tickets.md rename to website/versioned_docs/version-20.0.0/tickets.md diff --git a/website/versioned_docs/version-20.0.0/timelock.md b/website/versioned_docs/version-20.0.0/timelock.md new file mode 100644 index 0000000000..feb8b0118c --- /dev/null +++ b/website/versioned_docs/version-20.0.0/timelock.md @@ -0,0 +1,223 @@ +--- +title: Timelock (BETA) +author: Davis Sawali & Hui-An Yang +--- + +:::warning +This feature is a work in progress and might go through refinements in the near future. We encourage Taquito users to try this feature and reach out to us if you have any issues or concerns. +::: + +# Timelock (BETA) + +Timelock is a cryptographic primitive that can be used as a part of a commit & reveal scheme, it provides a guarantee that the information associated to the commit phase is eventually revealed. + +## Commit & Reveal +A classic commit & reveal scheme consists of these 2 stepsL +- Before the deadline, each participant makes a decision and publishes a commitment, which is proof that they have made a decision that they are unable to change. The proof is the hash of the data they have decided on. +- After the deadline, each participant reveals the data corresponding to their commitment. Other participants will be able to check that the hash of this data is indeed the same as the previous commitment + +This scheme makes it possible to prove a certain decision was made before the information is revealed. This information might be the decision of other participants, or some external independent information. + +above excerpt, taken from [here](https://docs.tezos.com/smart-contracts/data-types/crypto-data-types#classical-commit--reveal-scheme) + +## Taquito Implementation + +### Creating a chest +``` +import { Chest } from '@taquito/timelock' + +const time = 10000; +const payload = new TextEncoder().encode('message'); +const { chest, key } = Chest.newChestAndKey(payload, time); + +const chestBytes = chest.encode(); +const keyBytes = key.encode(); +``` + +### Create a chest from an existing Timelock +``` +import { Chest, Timelock } from '@taquito/timelock'; + +// ... +const time = 10000; +const precomputedTimelock = Timelock.precompute(time); // can be cached +const { chest, key } = Chest.fromTimelock(payload, time, precomputedTimelock); + +const chestBytes = chest.encode(); +const keyBytes = key.encode(); +``` + +### Opening a chest with an existing key +``` +import { Chest, ChestKey} from '@taquito/timelock'; + +//... +const time = 10000; +const [chest] = Chest.fromArray(chestBytes); +const [chestKey] = ChestKey.fromArray(chestKeyBytes); +const data = chest.open(chestKey, time); + +``` + +**Important Notes**: +- `time` param being passed should not be mistaken with the 'time' it takes for a chest to open in Timelocks. The `time` param here relates to a complexity relating to the number of power by modulo operations required to compute the key. Without getting too much into the weeds, we recommend using a value of `10000` and adjust accordingly. +- `payload` relates to the message payload you would like to lock in a chest + +## Coinflip Contract Example +This example is an excerpt from [Tezos docs](https://tezos.gitlab.io/active/timelock.html?highlight=timelock#example) and contracts are taken from [timelock_flip.tz](https://gitlab.com/tezos/tezos/-/blob/master/src/proto_alpha/lib_protocol/contracts/timelock_flip.tz). + +This game emulates a time constrained "guess who" game using timelocks. The goal of the game is for the challenger to guess which value was stored by the administrator. The challenger has one guess, and must submit it within 10 blocks of the game initialization. + +Please note that the contract used in this example is for educational purposes only and might not be secure. + +Its storage consists of 4 values, `level` and `chest` that relates to the initial value stored in the timelock during the start of the game. `guess` that relates to what value the player guesses to be the result of the coinflip, and `result` that indicates the status of the game. + +### Contract in Micheline +``` +storage (pair (nat %level) chest (bytes %guess) (bytes %result)); +parameter ( or (chest %initialize_game) (or (bytes %guess) (chest_key %finish_game))); +code { UNPAIR 5; + IF_LEFT { # If we receive a chest, + # we reinitialise the storage + # with the new chest and current level. + DIP {DROP 4}; + PUSH bytes 0xA0; + DUP; + PAIR; + SWAP; + LEVEL; + PAIR 3} + { IF_LEFT { # If we receive a guess, + SWAP; + DUP; + PUSH nat 10; + ADD; + LEVEL; + COMPARE; + LE; + IF { # we store the guess if current level < stored level + 10 + DIP 2 {PUSH bytes 0xB0}; + DIP {PAIR; SWAP; PAIR}; + PAIR; + DIP {DROP 2}; + } + { # else we keep the storage unchanged. + SWAP; + DROP; + PAIR 4}; + } + { # If we receive a chest_key, + # we open the chest. + DIP 4 {DROP}; + DUP 3; + SWAP; + DIP 2 {PUSH nat 1024}; + OPEN_CHEST; + IF_SOME { # If the chest opens successfully, + # we compare the guess with the locked value. + DUP 4; + COMPARE; + EQ; + IF { # If they are equal we store 0x00 + PUSH bytes 0x00} + { # else we store 0x01 + PUSH bytes 0x01}} + { # We store 0x10 in case of failure + PUSH bytes 0x10}; + DIG 3; + PAIR; + DIG 2; + PAIR; + DIG 1; + PAIR; + }; + }; + NIL operation; + PAIR; + } +``` + +### Originate the coinflip contract +Let's originate the contract with initial storage values `level` of 0, a stub chest, `guess` value of 'ff' and `result` 'ff'. + +`timelockCode` and `timelockStorage` can be found [here](https://github.com/ecadlabs/taquito/blob/master/integration-tests/data/timelock-flip-contract.ts) + +``` +// import { TezosToolkit } from '@taquito/taquito'; +// import { Chest } from '@taquito/timelock'; +// import { stringToBytes } from '@taquito/utils'; +// import { timelockCode, timelockStorage } from './timelock-flip-contract'; + +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); + +const originate = await Tezos.contract.originate({ code: timelockCode, init: timelockStorage }); +await originate.confirmation() +contract = await originate.contract(); +const originateStorage: any = await contract.storage() + +// originateStorage = { +// '1': 'caa0f4fdc993f1c39f8e89d6e29df8d09685b6faeccd99ddc99cc9ad9381f3ca86c8a7b98590da80eeefec83f4ebf8e7fcfc92daeee5d5d8cfdedfdbcdd0849a9cf793e8fbc6c389e6f3e783caf7a3b7bea69c81acb9d3afc9b9a186f8f4fda4d0a8a9d0b6dbac88e3f4cef6d0fe81c8afde84bf99d0e48ec589e8f8b587fda9f8ee85ef89a5ddc9eccdf3fc8df8c894c8e7dfceff9bc7a482cb83f78caaa6989d9db1a68ff7b99aa490eca285ff87a1b3ecf8d7b7d0f992f0d4aad2b7e7a3ba9fc794d5d098cfa7b79fdefda19b84e78fd98dec8fb18aaee9cc92b8d49f90e5cab2ab86ad9f9c8ced94d1bdecb38cd5b7e59ca5e9ec9face6fcacc9cab3adad97e0df99d7f8b1b0f9fbeab892c8989091c3b1b7ec98aaa7918acfe081e9d6fd98f3d0c201ae8e0f0470e26cfd98d461a07d506a0ec5f45dcbaed3b43a000000113f7d9ccf48b510e34b2c32532e3874f354', +// level: BigNumber { s: 1, e: 0, c: [ 0 ] }, +// guess: 'ff', +// result: 'ff' +// } +``` + +### Initialize the game +Let us now generate `chest` and `chestKey` with a complexity of `1024`, and a payload message 'hi'. + +Make a contract call to initialize the game, and the contract will update the storage values for `level` to be at head block, `chest` to point to the `chest` we generated, and both `guess` and `result` as 'a0'. + +``` +... +const time = 1024 +const message = 'hi' +const payload = new TextEncoder().encode(message); +const { chest, Key } = Chest.newChestAndKey(payload, time); +let init = await contract.methodsObject.initialize_game(chest.encode()).send() +await init.confirmation() +const initStorage: any = await contract.storage() + +// initStorage = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: 'a0', +// result: 'a0' +// } +``` + +### Submitting our guess +Let us now make a contract call to the `guess` entrypoint with a payload message 'hi' that will update the storage values of `guess` to `6869`, and `result` to 'b0'. + +``` +... +let guess1 = await contract.methodsObject.guess(stringToBytes(message)).send() +await guess1.confirmation() +const storageGuess: any = await contract.storage() + +// storageGuess = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: '6869', +// result: 'b0' +// } +``` + +### Revealing the time-locked value with `chestKey` +We can now make a contract call to the `finish_game` entrypoint with a `chestKey` to open the timelock. If successful, the contract will compare the value of `guess` to the timelock message. If the bytes are equal, the message is updated to `0x00`. If false, it would be updated to `0x01`. + +If the chest opening fails, the message will be updated to `0x10`. + +``` +... +let finish = await contract.methodsObject.finish_game(key.encode()).send() +await finish.confirmation() +const storageFinish: any = await contract.storage() + +// storageFinish = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: '6869', +// result: '00' +// } +``` diff --git a/website/versioned_docs/version-17.4.0/transaction_limits.md b/website/versioned_docs/version-20.0.0/transaction_limits.md similarity index 100% rename from website/versioned_docs/version-17.4.0/transaction_limits.md rename to website/versioned_docs/version-20.0.0/transaction_limits.md diff --git a/website/versioned_docs/version-20.0.0/tutorial.md b/website/versioned_docs/version-20.0.0/tutorial.md new file mode 100644 index 0000000000..5d4e04865e --- /dev/null +++ b/website/versioned_docs/version-20.0.0/tutorial.md @@ -0,0 +1,647 @@ +--- +title: 🧑‍🏫 Tutorial +id: tutorial +author: Alireza Haghshenas +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## Introduction + +In this tutorial, we will walk through the process of creating a simple dApp (short for "Decentralized Application") using Taquito. We will: + +1. Create a simple command-line application that reads the balance of an address from the blockchain +1. Establish a high-level understanding of the blockchain, Tezos, dApps, and Taquito +1. Send a `Transfer` operation to the blockchain using Taquito +1. Interact with a smart contract using Taquito +1. Implement a simple GUI dApp + +## Prerequisites + +### Prior knowledge + +In order to follow this tutorial, you need to have some understanding about the following concepts: +- Basic knowledge of JavaScript and programming in general +- A high-level understanding of blockchain technology and ecosystem (we will also cover this briefly in the tutorial) + +### Development machine + +We need a development machine with the following software installed: +- [Node.js](https://nodejs.org): one of the current versions (LTS recommended) +- A code editor like VS Code, or any other editor of your choice +- Optionally: docker (for creating your own key pair) + +This tutorial should work on Windows, Linux, and macOS. On other systems like a Chromebook or a tablet, you might need additional setup not covered in the tutorial. + +:::info +If you are using windows, there are two ways to run the commands in this tutorial: inside a WSL2 terminal, or inside the PowerShell. Generally, WSL2 is recommended for programming. But if you prefer, you can still use PowerShell. If you use WSL2, you can use the same commands as Linux. For PowerShell, we will provide commands in a separate tab **only when they are different from Linux**. +::: + +## Let's start with a simple command-line application {#start-coding} + +In this section, we will create a simple command-line application that shows the balance of an address. This will help us understand the basics of Taquito and the flow of events in a dApp. + +Open a terminal and run the following commands: + + + + +```bash +mkdir my-cli-dapp +cd my-cli-dapp + +npm init -y +npm i -D typescript ts-node +``` + + + + +```bash +md my-cli-dapp +cd my-cli-dapp + +npm init -y +npm i -D typescript ts-node +``` + + + +Then, create a file named `index.ts` in the folder `my-cli-dapp` and add the following code: + +```ts +console.log("Hello Blockchain!"); +``` + +Now, run the following command in the terminal: + +```bash +npx ts-node index.ts +``` + +If everything is done right, you should be able to see the output `Hello Blockchain!` in the terminal. +Now, we can start using Taquito to interact with the Tezos blockchain. +Run the following command to install Taquito: + +```bash +npm i @taquito/taquito +``` + +Now, open the file `index.ts` and replace the code with the following: + +```ts +import { TezosToolkit } from "@taquito/taquito"; + +var tezosToolkit = new TezosToolkit("https://ghostnet.ecadinfra.com"); + +tezosToolkit.tz.getBalance("tz1YvE7Sfo92ueEPEdZceNWd5MWNeMNSt16L").then(balance => { + console.log(balance.toNumber()); +}); +``` + +Running `npx ts-node index.ts` should now show the spendable balance of the specified address. This balance is in units of Mutez (micro Tez). Tez is the currency of Tezos, its code is `XTZ`, and the symbol is `ꜩ`. 1 Tez is 1,000,000 Mutez. + +Congratulations! You have just interacted with the Tezos blockchain using Taquito. In the next section, we will establish a high-level understanding of the blockchain, Tezos, dApps, and Taquito. If you are already familiar with these concepts, you can skip to [Sending a Transfer operation to the blockchain using Taquito](#sending-operations). + +## What is a blockchain? +The blockchain is a way to trust a network of computers run by strangers (so you don't have to trust the individual people). It might seem impossible, but it works. How? + +All computers that form a blockchain run the same software. They also store all the information needed to verify the integrity of the data. So anyone can verify that the data is correct. Techniques from cryptography are used to make this possible. + +In order to work with a blockchain, a high level understanding is enough: + +1. The blockchain is a network of computers that run the same software. +1. The blockchain stores data in a way that anyone can verify the integrity of the data. +1. The data is split into "blocks". Each block contains a list of operations (like sending some tokens from one account to another). +1. Once a block is created and the blockchain reaches a consensus on the information in it, it is impossible to change the data in the block. +1. In order to send an operation to the blockchain, you can send it to any of the nodes participating in the consensus. The node will forward the data to the other nodes. +1. In order to read data from the blockchain, you can send a request to any of the nodes. +1. Anyone can read data from the blockchain. But to send an operation to the blockchain, it needs to be cryptographically signed. + +Like any complex system, the simple overview we just gave is vastly simplified by leaving out a lot of details, and avoiding unnecessary precision. I believe having a good mental model of the system is more important than being precise. As you keep working in the blockchain ecosystem, your mental model will become more accurate over time. + +
+ How does the blockchain work? + +Here, I try to explain the overall mechanism that enables the blockchain to work. This is not necessary to understand the rest of the tutorial. But if you are curious, read on. Also, this is by no means a complete explanation. I am leaving out a lot of details. + +As said earlier, the data to be written to the blockchain is divided into blocks. Each block contains a list of operations, and a cryptographic hash (like sha256) of the block is calculated. The hash is a short string that uniquely identifies the block. The hash of the previous block is also stored in the block. So the blocks are effectively making a chain, hence the name "blockchain". + +This chaining has an interesting property: if you change the data in a block, the hash of the block will change. Because the hash of this block is stored in the next block, the hash of the next block will also change, and now you have to change the hash of all blocks after that. This feels like branching out another chain from the block you changed. Your branch will never reconcile with the original, unmodified chain. + +This also has another interesting property: if you want to make sure that you agree with another computer on the entire contents of the blockchain, you just need to compare the hashes of the last blocks. If the hashes are the same, you agree on the entire contents of the blockchain before that block. + +This is fine as long as all computers agree on the hash. But what if an attacker wants to advertise the wrong block? The network needs a way to establish a "majority" of votes. So that the "honest" nodes can still agree on the correct block even if some nodes are dishonest. This is done using a "consensus algorithm". + +We need to make it hard for an attacker to dominate the honest votes. If every node on the network had the same vote, the attacker could just create a lot of nodes and vote for the wrong block. So, we need a way to have some voting power that favors the real majority. + +When Bitcoin was invented, it used a consensus algorithm called "Proof of Work". In this algorithm, the computers compete to solve a puzzle. The first computer to solve the puzzle gets to create the next block. If an attacker manages to beat the rest of the network on one block, the honest nodes still have a higher chance of finding the next block based on the block they agree on. So, the attacker needs to have more computing power than the rest of the network combined. With a large network like Bitcoin, this is very expensive and not practical. + +While POW is a genius solution, it is also very energy-intensive. It is estimated that the Bitcoin network uses as much energy as the entire country of Argentina. This is not sustainable. + +A later generation of blockchains introduced the "Proof of Stake". In this algorithm, the computers that participate in the consensus are selected based on the amount of tokens they have. The more tokens you have, the higher your chance of being selected to create the next block. This is much more energy-efficient. The Tezos blockchain uses this algorithm. +
+ +## What makes Tezos different? {#about-tezos} + +Some interesting features in Tezos are designed to address the shortcomings of the earlier generations of blockchain. When Tezos was created, it had these benefits over existing blockchains: + +1. Proof of stake (It is now being adopted by some other blockchains as well). This eliminates a big problem with earlier blockchains: the need for a lot of energy to run the network. +1. Evolution of the blockchain. Remember that the blockchain is a network of computers that run the same software. This means that if you want to upgrade the software, all the nodes need to be upgraded at the same time. This is not easy to do. Tezos solves this problem by having evolution baked into the protocol. This means that the blockchain can evolve over time without the need for a "hard fork". +1. Delegation: Users can "delegate" their funds to a "baker". The baker will participate in the network consensus and will receive rewards. The baker will then share the rewards with the delegators. This makes it possible for users to participate in the network consensus without the need to run a node themselves or give control of their funds to a third party. + +Because Tezos is designed to evolve, it is now much more than what it was when it was created. + +Different versions of Tezos protocol are named after historic cities. At the time of this writing, we are in the "Nairobi" era. But the next protocol "Oxford" is being implemented and will be voted on soon, then the next one would be a city that starts with "P". 🤔 I wonder what will happen after we reach Z. 🤷 + +The "mainnet" is the actual Tezos Blockchain. However, there are several "testnets" that are used for testing. One of them is named "ghostnet", and it evolves to the new protocol much earlier than the mainnet, so that the ecosystem has enough time to implement and test the new protocol's features. + +## What is a dApp? + +A dApp is a web application that interacts with a blockchain. The blockchain is the source of truth for the dApp. The dApp usually interacts with the user, reads data from, and writes to the blockchain. The dApp might also communicate with other services, notably a blockchain indexer. But dApps are not limited to these ideas. For instance, one might create a dApp that works as part of an industrial process, and interacts with the blockchain to benefit from its features, like transparency, immutability, and provability. + +## What is Taquito? + +Taquito is a JavaScript library that makes it easy to interact with the Tezos blockchain. It is designed to be used in dApps. It is also used in some wallets and other tools. It is open-source, developed and maintained by ECAD Labs. + +Without Taquito, sending operations to the Tezos blockchain requires you to write a lot of code. Some of that is to: +1. Estimate the costs for the operation +1. Properly encode the operation +1. Sign the operation +1. Inject the operation +1. Get the operation receipt +1. Monitor the chain for inclusion of the operation + +And to implement all these, you need detailed information about different data types, protocols, constants, and algorithms used in the Tezos blockchain. Taquito abstracts away all this complexity and provides a simple API for interacting with the blockchain. + +## Sending a `Transfer` operation to the blockchain using Taquito {#sending-operations} +Now, we want to send an operation to the blockchain. When reading, we just sent a read request. When sending an operation, we need to prove that we own the address. To do this, we need to sign the operation with the private key of the address. + +In the next step, we will simply store the private key in the source code. This is not secure, and you should never do this in a production application. + +Taquito provides an "In Memory Signer" functionality. Use the following command to add that to your project: + +```bash +npm i @taquito/signer +``` + +Open the file `index.ts` and replace the code with the following: + +```ts +import { InMemorySigner } from "@taquito/signer"; +import { TezosToolkit } from "@taquito/taquito"; + +async function main() { + var tezosToolkit = new TezosToolkit("https://ghostnet.ecadinfra.com"); + + // WARNING: DO NOT DO THIS IN PRODUCTION, KEEP YOUR SECRETS SAFE + const signer = await InMemorySigner.fromSecretKey('spsk29SxqYRjnreqGzsYiAUEqxyhDwD8j2J57pJjaGgGtReZVD2UiD'); + + const pkh = await signer.publicKeyHash(); + console.log(pkh); + + tezosToolkit.setProvider({ signer }); + + const op = await tezosToolkit.contract.transfer({ to: 'tz1YvE7Sfo92ueEPEdZceNWd5MWNeMNSt16L', amount: 1 }); + await op.confirmation(); + + console.log(op.hash); +} + +main().catch(console.error); +``` + +Now, if you run your code, you should be able to see the address of the signer (`tz2DZLWLuDRKUuR4BrWetimZ1C6Pg6pPAo3n`) and the hash of the operation in the terminal. + +What is happening here? Let's break it down: + +1. We create a new instance of `TezosToolkit` and pass the URL of the node we want to connect to. +1. We create a new instance of `InMemorySigner` and pass the private key of the address we want to use to sign the operation. +1. We get the public key hash of the address. +1. We set the provider of the `TezosToolkit` instance to the signer we created in step 2. +1. We send a `Transfer` operation to the blockchain. Taquito will automatically do the following behind the scenes: + 1. Estimate the cost of the operation. + 1. Encode the operation. + 1. Sign the operation with the private key. + 1. Send the signed operation to the blockchain. +1. We wait for the operation to be included in a block. +1. We print the hash of the operation. + +For the purpose of this section, I have created a new address and funded it on testnet. You are sharing the same secret key with everyone else going through this tutorial. So don't use this address for anything important. Also, there are two possible reasons why you might not be able to send the operation: +1. Other people testing the code have consumed all the ꜩ in the address, so your operation will fail because of insufficient funds. You can head over to [ghostnet faucet](https://faucet.ghostnet.teztnets.xyz/) and send some ꜩ to the address for free. Or you can get free Testnet Tez right from your terminal: `npx @oxheadalpha/get-tez --amount 100 --network ghostnet` +1. Another person is sending an operation from this address at the same time as you. One address can only send one operation to each block. This is very improbable, but at least you know someone else is going through this tutorial at the same time as you. 😄 + +
+ How to create my own public/private key pair? + + Most users can simply use a wallet to create addresses. This is useful for dApps that run inside a browser. If you are running a dApp as a desktop, mobile, or server process, you can create your own key pair. Here is how you can do it: + + ```bash + docker run --pull always -it --entrypoint sh docker.io/tezos/tezos:latest + + # now you are inside the docker container + octez-client -E https://ghostnet.ecadinfra.com gen keys mysamplekey -s secp256k1 + octez-client -E https://ghostnet.ecadinfra.com show address mysamplekey -S + ``` + The new address you just created has a balance of zero. For the testnet, You can go to [ghostnet faucet](https://faucet.ghostnet.teztnets.xyz/) and send some ꜩ to it for free. On mainnet, you need to buy actual Tez on an exchange. +
+ +Congratulations! You have just sent an operation to the Tezos blockchain using Taquito. + +## Interacting with a smart contract using Taquito + +In this section, we will interact with a smart contract using Taquito. We will mint an NFT on [objkt.com](https://objkt.com) NFT marketplace. + +Well, objk.com is the production service. We will use the testnet one: [ghostnet.objkt.com](https://ghostnet.objkt.com/), because to mint NFT on it, you only need ghostnet ꜩ, which is free. Also, because I want to put my test secret key here, and I don't like to share my mainnet secret key with actual ꜩ in it with everyone. + +The concepts you learn here are not limited to objkt.com or NFTs. You can use the same concepts to interact with any smart contract on the Tezos blockchain. + +Most dApps interact with smart contracts. You can think of a smart contract as a program that runs on the blockchain. The smart contract can store data and execute code. The code is executed when a user sends an operation to one of the smart contract's `entrypoint`s. The smart contract can also send operations to the blockchain, or to other smart contracts. + +In Tezos, smart contracts are written using one of the high-level languages (like Ligo), and compiled to Michelson. Then the contract is originated (deployed) to the blockchain. During origination, an address prefixed with `KT1` is created for the contract. You can then interact with the smart contract by sending operations to this address. + +In objkt.com, any user can create a number of collections and then mint NFTs in any of these collections. I have already created a collection and made our test address (`tz2DZLWLuDRKUuR4BrWetimZ1C6Pg6pPAo3n`) an operator of the collection. So, this user can now mint NFTs in this collection. Check out the collection [here](https://ghostnet.objkt.com/collection/KT1XmD31NdBrTcL7bPF3md6i5g4BbE6s2YLv), and note the number of tokens in it. + +Open the file `index.ts` and change the `main` function to the following: + +```ts +async function main() { + var tezosToolkit = new TezosToolkit("https://ghostnet.ecadinfra.com"); + + const signer = await InMemorySigner.fromSecretKey('spsk29SxqYRjnreqGzsYiAUEqxyhDwD8j2J57pJjaGgGtReZVD2UiD'); + tezosToolkit.setProvider({ signer }); + + const contract = await tezosToolkit.contract.at('KT1JarALvhDLjtFhraeTMGGoeNLUkuL6jGtM'); + const op = await contract.methodsObject.mint_artist({ + collection_id: 71947, + editions: 1, + metadata_cid: '697066733a2f2f516d52325672336775713467594d45366268676b47474a34714656647652786867766e47516d7a6672346d364635', + target: 'tz2DZLWLuDRKUuR4BrWetimZ1C6Pg6pPAo3n' + }).send(); + + await op.confirmation(); + + console.log(op.hash); +} +``` + +What happens here? Let's break it down: +1- We set up the Tezos Toolkit, and the signer as before. +1- We get the contract metadata from the blockchain. This metadata contains information about the contract, including its entrypoints. +1- We call the `mint_artist` entrypoint of the contract. We need to provide the data it expects, which is provided as a javascript object. Taquito will automatically encode this data to be sent to the contract. +1- We wait for the confirmation and print the hash as before. + +Now, if you run your code, you should be able to see the hash of the operation in the terminal. +After about a minute, you should be able to see the new NFT in the collection from [this link](https://ghostnet.objkt.com/collection/KT1XmD31NdBrTcL7bPF3md6i5g4BbE6s2YLv). Because everyone following this tutorial is minting NFTs with the same metadata, all the NFTs in this collection will look the same. However, the number of tokens in the collection should increase by one. + +Congratulations! You have just interacted with a smart contract using Taquito. Additionally, you programmatically minted an NFT. + +Up until now, we have created programs that run in a terminal. While some of the code written to interact with the blockchain might actually be such an application, most of the time, we will usually create dApps that can be accessed in the browser. + +For these "browser dApps", there is a problem: how do we sign the operations? We can't store the secret key in the source code because anyone can see it. We also should not ask users to enter their secret key in our dApp, because that requires them to fully trust our dApp. + +As it turns out, there is an elegant solution to this problem. + +## dApps and Crypto Wallets + +The wallet is a program that stores the user's secrets (like the private key) and signs operations on behalf of the user. The wallet is not part of the dApp. It is a separate program. The wallet is usually a browser extension, a website, a mobile app, or a hardware wallet. The wallet is also responsible for showing the operations to the user and asking them to approve the operation. The user only needs to fully trust the wallet. The dApp cannot make any write operations to the blockchain unless it is signed by the wallet. + +The beacon SDK is a library that provides a standard way for dApps to connect to wallets. The beacon SDK supports several wallets, including Thanos, Temple, and Kukai. You don't need to use the beacon SDK directly. Taquito uses the beacon SDK internally. + +Another interesting component is the indexer/explorer. The way data is stored on the blockchain is optimized for storage, and to facilitate data retrieval that's essential for new operations (like checking the balance of an account). But some other operations might be slow. A blockchain indexer reads all the data from the blockchain and stores it in an optimized way for fast retrieval. Users can interact with that data through the explorer, which is a web application that shows the data in a user-friendly way. Also, dApps can read the data from the indexer to reduce the load on the blockchain and/or to have a faster response time. + +The smart contract is conceptually part of the dApp, but it lives on the blockchain. + +## The flow of events in the dApp + +Here is a high-level summary of the flow of events in the dApp: +1. The user visits the dApp in their browser (by entering the URL or clicking on a link) +1. The browser loads the dApp's code from a web server +1. The dApp is loaded, and the user can interact with it +1. At this stage, the dApp can read data from the blockchain, as long as the data does not need to be limited to a specific user (in our example dApp, the list of ideas can be read by anyone, but to show a list of user's collection, votes, etc., the dApp needs to know who the user is) +1. The user makes an interaction that requires connecting the wallet +1. The dApp shows a popup to the user, asking them to choose a wallet to connect to +1. The user selects a wallet +1. The user visits their wallet (on their phone, computer, a browser extension, in another tab, or even a hardware wallet) and approves the connection +1. The user revisits the dApp. This time, the dApp might be showing additional information (such as the user's collection) or allowing the user to send operations to the blockchain (such as registering an idea or voting on an idea) +1. The user makes an interaction that requires sending an operation to the blockchain +1. The dApp sends the operation to the wallet +1. The wallet shows the operation to the user and asks them to approve it +1. The user approves the operation +1. The wallet sends the signed operation to the blockchain +1. The blockchain processes the operation +1. The dApp can wait for the operation to be included in a block +1. The dApp can read the result of the operation from the blockchain + +```mermaid +sequenceDiagram + actor user + participant browser + participant dApp as dApp
(inside browser) + participant blockchain + participant wallet + participant indexer + participant server as server
(not part of the blockchain) + user->>browser: visits the dApp + browser->>server: request the dApp's code + server->>browser: sends the dApp's code + browser->>dApp: loads and runs the dApp + dApp->>blockchain: can read data from the blockchain + blockchain->>dApp: sends the data + dApp->>indexer: can read indexed data from the indexer/explorer + indexer->>dApp: sends the data + dApp->>user: shows data from the blockchain/indexer/explorer + user->>dApp: makes an interaction that requires connecting the wallet + dApp->>user: shows a popup to connect the wallet + user->>wallet: selects a wallet and visits the wallet + wallet->>user: asks for approval of the connection + user->>wallet: approves the connection + wallet->>dApp: approves the connection + user->>dApp: interacts with dapp that requires sending an operation to the blockchain + dApp->>wallet: sends the operation to the wallet to be signed + wallet->>user: shows the operation to the user and asks for approval + user->>wallet: approves the operation + wallet->>blockchain: sends the signed operation to the blockchain + wallet->>dApp: sends the result of the operation to the dApp + dApp->>blockchain: awaits the inclusion of the operation in a block + dApp->>user: shows the result of the operation +``` + +Alternatively, in a slightly different flow, the wallet sends the signed operation to the dApp, and dApp sends it to the blockchain. From the user's point of view, both flows look the same. + +## Creating a simple dApp that transfers ꜩ from the user's wallet to another address + +We will start by creating a simple dApp that transfers ꜩ from the user's wallet to another address. This will help us understand the flow of events in a dApp and the role of Taquito and Beacon SDK in the process. + +### creating the React app + +Open your terminal and run the following commands: + +```bash +npm create vite@latest my-dapp -- --template react-ts +cd my-dapp +npm i +npm run dev +``` + +The terminal should show a message that says: `➜ Local: http://localhost:4173/` but the port number might be different. +Now open a browser and visit the URL printed in the terminal. You should see a page that says: "Hello, Vite + React". + +
+ Optional: Commit the initial code to git + +```bash +git init +git add . +git commit -m "initial commit" +``` + +
+ +### adding Taquito and Beacon SDK to the React app + +In the next step, we add Taquito and Beacon SDK to the React app, and create a minimal UI to connect to the wallet and transfer ꜩ. + +```bash +npm i @taquito/taquito @taquito/beacon-wallet @airgap/beacon-dapp +``` + +Open the file `index.html` and make the following changes: + +```diff +- Vite + React ++ My dApp +``` + +Open the file `src/App.tsx` and replace the content with the following code: + +```tsx +import { useState } from "react"; +import { TezosToolkit } from "@taquito/taquito"; +import "./App.css"; +import ConnectButton from "./components/ConnectWallet"; +import Transfer from "./components/Transfer"; +import { BeaconWallet } from "@taquito/beacon-wallet"; + +const App = () => { + const [Tezos] = useState( + new TezosToolkit("https://ghostnet.ecadinfra.com") + ); + const [wallet, setWallet] = useState(undefined); + const [userAddress, setUserAddress] = useState(undefined); + + switch (userAddress) { + case undefined: return ; + default: return ; + + } +}; + +export default App; +``` + +### Connecting to the wallet + +The first step in interacting with the blockchain is connecting to the user's wallet. Taquito provides a BeaconWallet class that abstracts away the complexity of connecting to the wallet. The BeaconWallet class is a wrapper around the Beacon SDK. + +Create a new file `src/components/ConnectWallet.tsx` and add the following code: + +```tsx +import { Dispatch, SetStateAction, useEffect } from "react"; +import { TezosToolkit } from "@taquito/taquito"; +import { BeaconWallet } from "@taquito/beacon-wallet"; +import { + NetworkType, +} from "@airgap/beacon-dapp"; + +type ButtonProps = { + Tezos: TezosToolkit; + setUserAddress: Dispatch>; + setWallet: Dispatch>; + wallet: BeaconWallet | undefined; +}; + +const ConnectButton = ({ + Tezos, + setUserAddress, + setWallet, + wallet, +}: ButtonProps): JSX.Element => { + const connectWallet = async (): Promise => { + try { + await wallet!.requestPermissions({ + network: { + type: NetworkType.GHOSTNET, + rpcUrl: "https://ghostnet.ecadinfra.com", + }, + }); + const userAddress = await wallet!.getPKH(); + setUserAddress(userAddress); + } catch (error) { + console.log(error); + } + }; + + useEffect(() => { + (async () => { + const wallet = new BeaconWallet({ + name: "My dApp", + preferredNetwork: NetworkType.GHOSTNET, + disableDefaultEvents: false, + enableMetrics: true, + }); + Tezos.setWalletProvider(wallet); + setWallet(wallet); + })(); + }, []); + + return ( +
+ +
+ ); +}; + +export default ConnectButton; + +``` + +### Transferring ꜩ from the user's wallet to another address + +After you connect to the wallet, you can send operations to the blockchain. In this step, we will create a simple UI to transfer ꜩ from the user's wallet to another address. + +Create a new file `src/components/Transfer.tsx` and add the following code: + +```tsx +import { useState } from "react"; +import { TezosToolkit } from "@taquito/taquito"; + +const Transfer = ({ + Tezos, +}: { + Tezos: TezosToolkit; +}): JSX.Element => { + const [recipient, setRecipient] = useState(""); + const [amount, setAmount] = useState(""); + const [loading, setLoading] = useState(false); + + const sendTez = async (): Promise => { + if (recipient && amount) { + setLoading(true); + try { + const op = await Tezos.wallet + .transfer({ to: recipient, amount: parseInt(amount), mutez: true }) + .send(); + await op.confirmation(); + } catch (error) { + console.log(error); + } finally { + setLoading(false); + } + } + }; + + return ( +
+ Recipient: setRecipient(e.target.value)} + /> +
+ Amount in uTez: setAmount(e.target.value)} + /> +
+ +
+ ); +}; + +export default Transfer; + +``` + +### Fixing node-specific dependencies in the browser + +The libraries Taquito and Beacon SDK are designed to run in a Node.js environment. However, we are running them in a browser. This causes some issues. For example, the Beacon SDK uses the Node.js `buffer`, `stream`, and `util` modules. These modules are not available in the browser. Fortunately, there are browser-compatible versions of these modules. We can use these versions instead of the Node.js versions. To do this, we need to install the following packages: + +```bash +npm i -D vite-plugin-node-polyfills +``` + +Now we need to tell Vite to use this plugin. To do this, open the file `vite.config.ts` and add the following code: + +```ts +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import { nodePolyfills } from 'vite-plugin-node-polyfills' + +export default defineConfig({ + plugins: [react(), nodePolyfills()], +}); +``` + +### Running the dApp + +Make sure that the command `npm run dev` is still running in the terminal, and that there are no build errors. + +Now, you should be able to see the "Connect Wallet" button in the browser. Clicking on it opens the wallet selection modal. You can choose your favorite wallet and connect to it. After this, you need to visit your wallet to approve the connection. After that, you should be able to see the "Send" button. You can enter an address and an amount (in Mutez, notice the `mutez: true` in `Transfer.tsx`) and click on the "Send" button to send ꜩ to the address. + +If you have not set up a wallet before, clicking on the Kukai wallet opens a page that asks you to create a new wallet. Remember to visit the [ghostnet faucet](https://faucet.ghostnet.teztnets.xyz/) to fund your wallet with some ꜩ. If you want to use that wallet for real ꜩ, you need to back up the mnemonic phrase. But remember that the mnemonic phrase is a secret. Anyone who has access to it can steal your ꜩ. + +## Closing thoughts + +We've come a long way: + 1. We started with a simple command-line application that reads the balance of an address from the blockchain. + 1. Then, we established a high-level understanding of the blockchain, Tezos, dApps, and Taquito. + 1. After that, we sent a `Transfer` operation to the blockchain using Taquito. + 1. Then, we interacted with a smart contract using Taquito. + 1. Finally, we implemented a simple GUI dApp. + +Your journey does not end here. There are many more things to learn. Here are some ideas: + +- Check out the [Taquito documentation](quick_start) to learn more about Taquito. +- Learn a smart contract language like [Ligo](https://ligolang.org/). +- Learn more about Tezos and its ecosystem, check out the [Tezos Developer Portal](https://tezos.com/developers/). +- See what others are doing: Join Tezos community on [Discord](https://discord.gg/tezos), [Reddit](https://www.reddit.com/r/tezos/), [Twitter](https://twitter.com/tezos), and [Telegram](https://t.me/tezosplatform). +- Start building. There is no better way to learn than to build something. You can start with a simple idea and build on it. + +### What is needed to make the dApp production-ready + +Please ensure you read and consider the checklist in [dApp pre-launch checklist](dapp_prelaunch) before you launch your dApp. diff --git a/website/versioned_docs/version-17.4.0/tutorial_links.md b/website/versioned_docs/version-20.0.0/tutorial_links.md similarity index 100% rename from website/versioned_docs/version-17.4.0/tutorial_links.md rename to website/versioned_docs/version-20.0.0/tutorial_links.md diff --git a/website/versioned_docs/version-17.4.0/tzip12.md b/website/versioned_docs/version-20.0.0/tzip12.md similarity index 92% rename from website/versioned_docs/version-17.4.0/tzip12.md rename to website/versioned_docs/version-20.0.0/tzip12.md index e385f6ca6d..4d130dddcb 100644 --- a/website/versioned_docs/version-17.4.0/tzip12.md +++ b/website/versioned_docs/version-20.0.0/tzip12.md @@ -144,7 +144,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -161,10 +161,10 @@ Tezos.contract.at(contractAddress, tzip16) return views['token_metadata']().executeView(tokenId) }).then (result => { println('Result of the view token_metadata:'); - println(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - println(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - println(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - println(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + println(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + println(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + println(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + println(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` @@ -173,7 +173,7 @@ Tezos.contract.at(contractAddress, tzip16) ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -190,10 +190,10 @@ Tezos.wallet.at(contractAddress, tzip16) return views['token_metadata']().executeView(tokenId) }).then (result => { println('Result of the view token_metadata:'); - println(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - println(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - println(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - println(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + println(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + println(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + println(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + println(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => println(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-17.4.0/tzip16-sequence-diagram.md b/website/versioned_docs/version-20.0.0/tzip16-sequence-diagram.md similarity index 100% rename from website/versioned_docs/version-17.4.0/tzip16-sequence-diagram.md rename to website/versioned_docs/version-20.0.0/tzip16-sequence-diagram.md diff --git a/website/versioned_docs/version-17.4.0/validators.md b/website/versioned_docs/version-20.0.0/validators.md similarity index 100% rename from website/versioned_docs/version-17.4.0/validators.md rename to website/versioned_docs/version-20.0.0/validators.md diff --git a/website/versioned_docs/version-17.4.0/version.md b/website/versioned_docs/version-20.0.0/version.md similarity index 93% rename from website/versioned_docs/version-17.4.0/version.md rename to website/versioned_docs/version-20.0.0/version.md index 65489cb6b4..705e323944 100644 --- a/website/versioned_docs/version-17.4.0/version.md +++ b/website/versioned_docs/version-20.0.0/version.md @@ -3,6 +3,246 @@ title: Versions author: Jev Bjorsell --- +# Taquito v20.0.0 +## Summary + +### Paris(B) Protocol Support +Paris(B) Protocol has new Adaptive Issuance features, including staking pseudo-operations and rpc endpoints. + +⚠️ Warning ⚠️ +Adaptive Issuance, Staking, and Adaptive slashing will be in effect roughly two weeks (5 cycles) after the proposal is activated on Mainnet. The new AI features will not be usable until then. + +### ⚠️ Breaking Changes ⚠️ + +### Beacon Migration +As of Beacon version 4.2.0, Beacon has migrated from using `dAppClient.getActiveAccount()` to using an event subscription method `BeaconEvent.ACTIVE_ACCOUNT_SET` for handling active account changes. + +**IF YOU ARE STILL USING THE `eventHandlers` PROPERTY WHEN INITIALIZING A DAPP CLIENT, PLEASE UPDATE YOUR CODE.** + +``` +const wallet = new BeaconWallet(options); +await wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => { + // your logic to update your state + console.log(data.address); + console.log(data.network.type); +}); +await wallet.requestPermissions(); +``` +### Michelson-encoder +We fixed a bug in `@taquito/Michelson-encoder` when there are nested `pair` and `or` without having `annots` consistently; the indexing key will have unexpected behaviour as below. This is an API behaviour-breaking change; if your dApp depends on the old behaviour or changing is too much effort, you can configure your `TezosToolkit` with `Tezos.setFieldNumberingStrategy('Legacy')` to keep the previous behaviour. But please note that this option might be removed in a future release. + +Previous behaviour - inner object's field numbers depend on the object's location in its parent, and start with '2' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '2': 'thirdValue', + '3': 'fourthValue' + } +} +``` +New behaviour - inner object's field number will start with '0' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '0': 'thirdValue', + '1': 'fourthValue' + } +} +``` + +### New Features +- `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API. This includes support for `prepareProvider`, `estimationProvider`, and `rpcContractProvider` #2886 +- `@taquito/taquito` - Added staking related pseudo operations (stake, unstake, finalize_unstake) to the Wallet API #2921 +- `@taquito/rpc` - Added various RPC endpoints related to Adaptive Issuance (Staking) #2676 #2678 +- `@taquito/rpc` - Updated return types for several RPC endpoints related to the Paris protocol update #2887 +- `@taquito/rpc` - Removed `getEndorsingRights` RPC endpoint along with its related type definition and tests #2884 +- `@taquito/rpc` - Updated RPC types for `AttestationWithDal` and `EndorsementWithDal` #2880 +- `@taquito/rpc` - Updated RPC response types to support DAL types #2882 +- `@taquito/rpc` - Updated RPC response type for the new manager op `dal_publish_commitment` #2881 +- `@taquito/rpc` - Added a new RPC endpoint called `getAllDelegates` #2976 +- `@taquito/local-forging` - Added local forging support for `AttestationWithDal` operation #2880 +- `@taquito/local-forging` - Added local forging support for the new manager operation `dal_publish_commitment` #2881 +- `@taquito/michel-codec` - Updated Michelson type definitions and validators to include the new Paris protocol ticket literals [PR#2940](https://github.com/ecadlabs/taquito/pull/2940) + +### Internals +- Updated protocol constants integration test for Paris protocol #2869 +- Configured keygen and integration test configs for Paris protocol #2888 +- Added forger integration test for protocol migrations #2850 +- Updated `@taquito/beacon-wallet` to use event subscription instead of `getActiveAccount()` #2958 +- Updated some website dependencies [PR#2961](https://github.com/ecadlabs/taquito/pull/2961) +- Updated Beacon wallet dependency to the latest version `v4.2.2` (includes Paris protocol definitions) [PR#2956](https://github.com/ecadlabs/taquito/pull/2956) +- Fixed nested `pair` and `or` indexing bug #2927 +- Added a test-dapp case to transfer ghostnet tez to etherlink address #2944 +- Updated the Paris protocol hash to reflect the latest Octez fix [PR](https://github.com/ecadlabs/taquito/pull/2974) + +### Documentation +- Updated documentation for new Adaptive Issuance related features [PR#2928](https://github.com/ecadlabs/taquito/pull/2928) +- Added Tezos Foundation public testnet nodes to rpc_nodes on website #2933 + + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API + +```javascript +const op = await Tezos.contract.stake({ + amount: 100 +}); +await op.confirmation(); +``` + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Wallet API + +```javascript +const op = await Tezos.wallet.stake({ + amount: 100, + mutez: false +}).send(); +await op.confirmation(); +``` + +# Taquito v19.2.0 + +**Breaking Changes**: (if applicable) + +## Summary + +### New Features +- `@taquito/timelock`- A new package for Timelocks have been introduced #2843. Users will now be able to create Chests, unlock Chests, and utilize Chests. For more information, please refer to this [document](https://taquito.io/docs/next/timelock) +- `@taquito/beacon-wallet` - the `beacon-wallet` package is now bundled in a `.zip` file for [PR#2860](https://github.com/ecadlabs/taquito/pull/2860) + +### Documentation +- UX improvements to search funtionality on the Taquito website #2858 +- Simplify tutorial for building dApps [PR#2852](https://github.com/ecadlabs/taquito/pull/2852) +- Updated several documentation blobs on the Taquito website [PR#2860](https://github.com/ecadlabs/taquito/pull/2860) +- Fixed several live code examples in the Taquito website [PR#2877](https://github.com/ecadlabs/taquito/pull/2877) +- Changed Taquito documentation website domain from `tezostaquito.io` to `taquito.io` [PR#2876](https://github.com/ecadlabs/taquito/pull/2876) + +### Internals +- Re-added Flextesa test scripts run `drain_delegate` and `ballot` operations' integration test against a Nairobi sandbox #2851 +- Updated Airgap's Beacon package to version 4.2.1. For more information on the release, click [here](https://github.com/airgap-it/beacon-sdk/releases/tag/v4.2.1) [PR#2874](https://github.com/ecadlabs/taquito/pull/2874) +- Changed website build command for CloudFlare [PR#2804](https://github.com/ecadlabs/taquito/pull/2804) + +# Taquito v19.1.0 + +**Potential Breaking Changes**: +- `@taquito/rpc` - replaced `OperationBalanceUpdatesItem` in favour of `OperationMetadataBalanceUpdates` #2817 #2827 +- `@taquito/taquito` - Several optimizations made to fees and estimation in Taquito #2532 + - removed `DEFAULT_GAS_LIMIT`, `DEFAULT_STORAGE_LIMIT`, `DEFAULT_FEE` in favour of `getRevealFee`, more details + - Added a small buffer to `gasLimit` (varying depending on operations) + - Reduced `suggestedFeeMutez` buffer from 100 to 20 per op + - Refined `gasLimit` and `storageLimit` according to `simulate_operation` results from the octez-client + +## Summary + +### New Features +- `@taquito/taquito` - Added smart rollup execute outbox message operation #2321 (please note that this feature is not fully tested due to some parts requiring the use of `octez-client`) +`@taquito/beacon-wallet` - added beacon-wallet bundle script to output a `.zip` bundle for browser only environments #2744 + +### Improvement +- `@taquito/michelson-encoder` - replaced references of `[['unit']]` to be `UnitValue` instead [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) +- `@taquito/taquito` - added 20 storageLimit buffer to prevent `storage_exhausted` error #2854 +- `@taquito/taquito` - removed the storageLimit cap mechanism #2855 + +### Documentation +- Added michel-codec to Typedoc documentation #2806 +- Updated `docs` and `examples` to use `methodsObject` instead of `methods` wherever needed [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) +- Removed `giganode` references from Taquito documentation [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) + +### Deprecation +- `@taquito/utils` - Deprecated several util methods and updated their names into something more representative. Slight improvements to existing util methods #2372 #2274 +- `@taquito/taquito` - Deprecated `methods` in favour of `methodsObject`. `methodsObject`'s syntax is more consistent with storage params, supports all Michelson data types, and will be maintained going forward #2813 + +### Internals +- Updated various dependencies in Taquito website and the Test DApp (Sass, Firebase, Algoliasearch, Dotenv) [PR#2834](https://github.com/ecadlabs/taquito/pull/2834) +- Updated integration tests to use network types instead of hard coding RPC URL #2164 +- Organized integration tests into more meaningful subfolders and renamed some files for brevity #2203 +- Resolved dependabot updates [PR#2849](https://github.com/ecadlabs/taquito/pull/2849) +- Added confirmation blocks on older integration tests [PR#2847](https://github.com/ecadlabs/taquito/pull/2847) +- Added small buffer to operation reveal fee fixed value [PR#2848](https://github.com/ecadlabs/taquito/pull/2848) + +# Taquito v19.0.2 + +### Bug Fixes +- `@taquito/local-forging` - Added the correct constants for staking/unstaking in the forger [PR#2824](https://github.com/ecadlabs/taquito/pull/2824) + + +# Taquito v19.0.1 + +### Dependency updates +- Updated Beacon version to v4.1.2 [PR#2811](https://github.com/ecadlabs/taquito/pull/2811) + +### Documentation +- Removed Sapling live code examples from the website due to large bundle sizes, static code examples will still exist [PR#2810](https://github.com/ecadlabs/taquito/pull/2810) + +# Taquito v19.0.0 + +:::info +You might have noticed that we jumped versions from v17.5.0 to v19.0.0 (no v18). We do this as an effort to be in parallel with the current Octez version. +- Oxford - v18 +- Oxford2 - v19 + +Taquito v19 supports Oxford2, and not the previously named Oxford protocol. +::: + +**Potential Breaking Changes**: +Oxford2 comes with quite a few breaking changes, please make sure to update your projects accordingly. + +Oxford2 changes: +- Removed transactional rollups (tx rollup) references in Taquito #2650 +- Removed origination proof from smart rollups #2597 +- Updated all references of `endorsement` into `attestation` for Oxford2 #2599 +- `@taquito/rpc` - Updated RPC types for Oxford2 compatibility #2596 + + +## Summary + +### New Features +- `@taquito/local-forging` - Added new property `whitelist` in smart rollup origination operation #2776 + + +### Documentation + +### Internals + + +# Taquito 17.5.0 + +**Important Note:** +In this version, we replaced instances of `Axios` in favour of `Fetch`. + +We are not expecting any breaking changes, but if there are any issues that you see regarding this, please reach out to the Taquito team. + +## Summary + +### New Features +- `@taquito/taquito` - Expose and publicly `smartContractAbstractionSemantic` #2534 + +### Improvement +- `@taquito/http-utils` - Removed `Axios` as a dependency of Taquito in favour of `fetch`/`node-fetch` #2461 +### Documentation +- Updated RPC nodes on the website [PR#2732](https://github.com/ecadlabs/taquito/pull/2732 +- Updated Michelson encoder documentation to reference `generateSchema` instead of the outdated `extractSchema` #2630 +- Added a Taquito Chatbot assistant for the Taquito website to help answer user questions #2684 + +### Internals +- Removed archive node, and references to it in Taquito [PR#2743](https://github.com/ecadlabs/taquito/pull/2743) +- Updated Sass, Lerna, and Firebase versions [PR#2749](https://github.com/ecadlabs/taquito/pull/2749) +- Updated integration tests to increase speed and reliability #2741 + + +## `@taquito/http-utils` - Removed `Axios` in favour of `fetch` +The `taquito/http-utils` is responsible for handling all HTTP incoming and outgoing HTTP requests in Taquito. It utilized `Axios` as a main dependency to handle requests coming in and out of Taquito. + +Now that browsers and Node have supported `fetch` natively, it makes more sense for us to move towards it. + +Axios came with quite a large dependency tree, as well as multiple workarounds we needed to include for it to work properly (i.e. the `axios-fetch-adapter`) + +With this change we hope for a more stable HTTP handler in Taquito while reducing the package size at the same time. + + # Taquito v17.4.0 **Potential Breaking Changes** : @@ -535,7 +775,7 @@ const forgedBytes = await forger.forge(params); - Added documentation on ~100 most popular contract entrypoint parameter examples on Tezos #2153 - Fixed broken link on Dapp pre-launch checklist page #2293 - Fixed broken link on smart contract collection page #2295 -- Fixed broken live code examples on the `taquito.io#2305 +- Fixed broken live code examples on the `taquito.io` website #2305 - Removed invalid links and duplicate entries #2332 - Added documentation for contract entrypoints parameters in JS/TS #2153 - Fixed broken link on Smart Contract collection page #2295 @@ -1176,7 +1416,7 @@ The `RPCRunOperationParam` parameter has new optional properties: `self`, `unpar Added support to forge and unforge the new operation kinds `transfer_ticket`, `tx_rollup_origination` and `tx_rollup_submit_batch` related to TORU. We plan to add support for the remaining operations in a subsequent release. -## `@taquito/michelson-encoder` - Added support for the the new type`tx_rollup_l2_address` +## `@taquito/michelson-encoder` - Added support for the new type`tx_rollup_l2_address` We created a new class `TxRollupL2AddressToken` in the michelson-encoder to support the new Michelson type `tx_rollup_l2_address`. This type is used to identify accounts on transaction rollups' ledgers. Those accounts are prefixed with `tz4`. The `TxRollupL2AddressToken` class allows users of Taquito to pass `tz4` addresses in storage or smart contract entry points using the Taquito JS abstraction. @@ -2621,7 +2861,7 @@ If you have feature or issue requests, please create an issue on http://github.c # 8.0.6-beta.0 Updated beacon-sdk, bug fixed related to contract callback entry point * Updated beacon-sdk to version 2.2.2 #677 -* char2bytes and bytes2char functions (initially in the taquito-tzip16 package) have been added to the taquito-utils package #589 +* char2Bytes and bytes2char functions (initially in the taquito-tzip16 package) have been added to the taquito-utils package #589 * Allow specifying an entry point in a contract callback #652 * Improved CI by adding retry for some of the integration tests diff --git a/website/versioned_docs/version-17.4.0/wallet_API.md b/website/versioned_docs/version-20.0.0/wallet_API.md similarity index 98% rename from website/versioned_docs/version-17.4.0/wallet_API.md rename to website/versioned_docs/version-20.0.0/wallet_API.md index a9b02d08f7..04ad53a32c 100644 --- a/website/versioned_docs/version-17.4.0/wallet_API.md +++ b/website/versioned_docs/version-20.0.0/wallet_API.md @@ -64,19 +64,15 @@ const options = { name: 'MyAwesomeDapp', iconUrl: 'https://taquito.io/img/favicon.svg', network: { type: 'ghostnet' }, - eventHandlers: { - PERMISSION_REQUEST_SUCCESS: { - handler: async (data) => { - console.log('permission data:', data); - }, - }, - }, + enableMetrics: true, }; const wallet = new BeaconWallet(options); ``` The necessary bare minimum to instantiate the wallet is an object with a `name` property that contains the name of your dapp and the network you want it to point to. In this case, we choose to point it to `ghostnet`. However, the Beacon wallet allows you to customize your dapp responses to different events. In the example above, instead of getting the default Beacon pop-up after the user connects the wallet, it will display the available data in the console. You can use whatever solution you prefer for feedback. You can find a list of all the default handlers [in the beacon-sdk Github repo](https://github.com/airgap-it/beacon-sdk/blob/master/packages/beacon-dapp/src/events.ts). +The `enableMetrics` property is an optional parameter that allows you to enable or disable the collection of metrics. It also allows the user to report bugs via a link in the wallet pop-up. + > Note: Previous versions of Beacon used to have a `preferredNetwork` property instead of `network`. This property has been removed in the latest version of Beacon, and you must now use the `network` property. The Beacon wallet requires an extra step to set up the network to connect to and the permissions: @@ -92,7 +88,7 @@ Please check out the section [Subscribing to events](#subscribing-to-events) to In previous versions of Beacon, you were able to set the `network` property when doing `requestPermissions()`. This behavior was removed from Beacon, and you must now set the network when instantiating the wallet. -You can choose among `mainnet`, `jakartanet` `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: +You can choose among `mainnet`, `parisnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: ```js const userAddress = await wallet.getPKH(); @@ -116,7 +112,7 @@ Make sure you have the Beacon browser extension installed (the extension offers ```js live noInline wallet // import { BeaconWallet } from '@taquito/beacon-wallet'; -// const options = { name: 'exampleWallet' }; +// const options = { name: 'exampleWallet', enableMetrics: true }; // const wallet = new BeaconWallet(options); wallet @@ -179,7 +175,7 @@ const wallet = new TempleWallet('MyAwesomeDapp'); The class constructor takes one parameter, the name of your dapp (this will be used later in the transaction confirmation pop-up). After the instantiation, we can connect the wallet by calling the `connect` method: ```js -await wallet.connect('mainnet' | 'mumbainet' | 'nairobinet' | 'ghostnet' | 'mondaynet' | 'sandbox'); +await wallet.connect('mainnet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox'); ``` (Temple used to be called Thanos and some Taquito code still uses the name Thanos.) diff --git a/website/versioned_docs/version-17.4.0/wallets.md b/website/versioned_docs/version-20.0.0/wallets.md similarity index 100% rename from website/versioned_docs/version-17.4.0/wallets.md rename to website/versioned_docs/version-20.0.0/wallets.md diff --git a/website/versioned_docs/version-17.4.0/web3js_taquito.md b/website/versioned_docs/version-20.0.0/web3js_taquito.md similarity index 98% rename from website/versioned_docs/version-17.4.0/web3js_taquito.md rename to website/versioned_docs/version-20.0.0/web3js_taquito.md index 305aa9980c..3b40c29a38 100644 --- a/website/versioned_docs/version-17.4.0/web3js_taquito.md +++ b/website/versioned_docs/version-20.0.0/web3js_taquito.md @@ -53,7 +53,7 @@ const balance = await web3.eth.getBalance('account_address'); const balance = await Tezos.tz.getBalance('account_address'); ``` -Both Web3js and Taquito use the `getBalance` method with the account address to fetch its balance from the network. +Both Web3js and Taquito use the `getBalance` method with the account address to fetch its spendable balance from the network. ## Transfer tokens diff --git a/website/versioned_sidebars/version-17.4.0-sidebars.json b/website/versioned_sidebars/version-20.0.0-sidebars.json similarity index 97% rename from website/versioned_sidebars/version-17.4.0-sidebars.json rename to website/versioned_sidebars/version-20.0.0-sidebars.json index b21abc6700..a809344ab8 100644 --- a/website/versioned_sidebars/version-17.4.0-sidebars.json +++ b/website/versioned_sidebars/version-20.0.0-sidebars.json @@ -8,6 +8,7 @@ "collapsible": false, "items": [ "quick_start", + "tutorial", "operation_flow", "rpc_nodes", "web3js_taquito", @@ -40,7 +41,8 @@ "set_delegate", "smart_rollups", "proposal_and_ballot", - "failing_noop" + "failing_noop", + "staking" ] }, { @@ -125,6 +127,7 @@ "rpc_package", "michelson_encoder", "contracts-library", + "timelock", "taquito_utils", { "type": "category", @@ -186,7 +189,7 @@ "collapsed": false, "collapsible": false, "items": [ - "mobile_bundle", + "package_bundle", "dapp_template", "dapp_prelaunch" ] diff --git a/website/versions.json b/website/versions.json index b4df3e9eac..4fc2276529 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,7 +1,7 @@ [ + "20.0.0", "19.2.0", "19.1.0", "19.0.0", - "17.5.0", - "17.4.0" + "17.5.0" ]