From 47944c747c60b194ec18f0fa169741a2f7f07e01 Mon Sep 17 00:00:00 2001 From: huianyang Date: Tue, 15 Oct 2024 18:30:56 -0700 Subject: [PATCH] chore(releng) bump version to 20.1.0 --- apps/taquito-test-dapp/package.json | 10 +- docs/version.md | 32 +++ 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.5.0/mobile_bundle.md | 26 -- .../rpc_nodes_integration_test.md | 81 ------ .../version-17.5.0/smart_rollups.md | 67 ----- .../version-17.5.0/tx_rollups.md | 108 -------- .../ballot.md | 0 .../batch-api.md | 12 +- .../beaconwallet-singleton.md | 0 .../cancel_http_requests.md | 1 + .../chatbot.md | 0 .../complex_parameters.md | 2 +- .../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 | 18 +- .../lambda_view.md | 2 +- .../ledger_integration_test.md | 0 .../ledger_signer.md | 6 +- .../liquidity_baking.md | 0 .../making_transfers.md | 0 .../manager_lambda.md | 0 .../maps_bigmaps.md | 0 .../metadata-tzip16.md | 8 +- .../version-20.1.0/michel_codec.md | 123 +++++++++ .../michelson_encoder.md | 124 ++++++++- .../michelsonmap.md | 0 .../multisig_doc.md | 0 .../on_chain_views.md | 0 .../operation_flow.md | 0 .../ophash_before_injecting.md | 0 .../originate.md | 34 ++- .../version-20.1.0/package_bundle.md | 36 +++ .../prepare.md | 0 .../proposal_and_ballot.md | 0 .../quick_start.md | 2 +- .../rpc-cache.md | 0 .../rpc_nodes.md | 6 +- .../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 | 0 .../set_delegate.md | 0 .../signing.md | 96 ++++++- .../version-20.1.0/smart_rollups.md | 98 +++++++ .../smartcontracts.md | 75 +++--- .../versioned_docs/version-20.1.0/staking.md | 168 ++++++++++++ .../storage_annotations.md | 12 +- .../taquito_utils.md | 0 .../testing_strategies.md | 74 +++--- .../tezbridge_signer.md | 0 .../tezos_domains.md | 14 +- .../tickets.md | 0 .../versioned_docs/version-20.1.0/timelock.md | 223 ++++++++++++++++ .../transaction_limits.md | 0 .../tutorial.md | 50 +--- .../tutorial_links.md | 0 .../tzip12.md | 20 +- .../tzip16-sequence-diagram.md | 0 .../validators.md | 0 .../version.md | 242 +++++++++++++++++- .../wallet_API.md | 20 +- .../wallets.md | 0 .../web3js_taquito.md | 2 +- ...bars.json => version-20.1.0-sidebars.json} | 7 +- website/versions.json | 4 +- 127 files changed, 1767 insertions(+), 836 deletions(-) delete mode 100644 website/versioned_docs/version-17.5.0/mobile_bundle.md delete mode 100644 website/versioned_docs/version-17.5.0/rpc_nodes_integration_test.md delete mode 100644 website/versioned_docs/version-17.5.0/smart_rollups.md delete mode 100644 website/versioned_docs/version-17.5.0/tx_rollups.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/ballot.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/batch-api.md (94%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/beaconwallet-singleton.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/cancel_http_requests.md (98%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/chatbot.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/complex_parameters.md (99%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/confirmation_event_stream.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/consensus_key.md (88%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/contract-test-collection.md (97%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/contract_call_parameters.md (96%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/contracts-library.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/dapp_prelaunch.md (93%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/dapp_template.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/drain_account.md (94%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/estimate.md (95%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/events.md (92%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/fa2_parameters.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/failing_noop.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/failwith_errors.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/forger.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/global_constant.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/images/Tzip16ExecuteView.png (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/images/diagramTzip16Metadata.png (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/images/github.png (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/images/gitlab.png (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/increase_paid_storage.md (97%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/inmemory_signer.md (93%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/lambda_view.md (98%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/ledger_integration_test.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/ledger_signer.md (97%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/liquidity_baking.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/making_transfers.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/manager_lambda.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/maps_bigmaps.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/metadata-tzip16.md (95%) create mode 100644 website/versioned_docs/version-20.1.0/michel_codec.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/michelson_encoder.md (80%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/michelsonmap.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/multisig_doc.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/on_chain_views.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/operation_flow.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/ophash_before_injecting.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/originate.md (89%) create mode 100644 website/versioned_docs/version-20.1.0/package_bundle.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/prepare.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/proposal_and_ballot.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/quick_start.md (99%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/rpc-cache.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/rpc_nodes.md (85%) create mode 100644 website/versioned_docs/version-20.1.0/rpc_nodes_integration_test.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/rpc_package.md (85%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/sapling.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/sapling_in_memory_spending_key.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/sapling_in_memory_viewing_key.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/set_delegate.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/signing.md (68%) create mode 100644 website/versioned_docs/version-20.1.0/smart_rollups.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/smartcontracts.md (91%) create mode 100644 website/versioned_docs/version-20.1.0/staking.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/storage_annotations.md (93%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/taquito_utils.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/testing_strategies.md (97%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tezbridge_signer.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tezos_domains.md (89%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tickets.md (100%) create mode 100644 website/versioned_docs/version-20.1.0/timelock.md rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/transaction_limits.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tutorial.md (96%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tutorial_links.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tzip12.md (92%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/tzip16-sequence-diagram.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/validators.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/version.md (93%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/wallet_API.md (97%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/wallets.md (100%) rename website/versioned_docs/{version-17.5.0 => version-20.1.0}/web3js_taquito.md (98%) rename website/versioned_sidebars/{version-17.5.0-sidebars.json => version-20.1.0-sidebars.json} (97%) diff --git a/apps/taquito-test-dapp/package.json b/apps/taquito-test-dapp/package.json index 1d09c8a68a..a06b83bec3 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.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/beacon-wallet": "^20.1.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "buffer": "^6.0.3", "svelte-select": "^5.8.3", "vite-compatible-readable-stream": "^3.6.1" diff --git a/docs/version.md b/docs/version.md index f2c9f94d9e..244341960f 100644 --- a/docs/version.md +++ b/docs/version.md @@ -3,6 +3,38 @@ title: Versions author: Jev Bjorsell --- +# Taquito v20.1.0 + +**Breaking changes:** +* We removed `account` public property on `BeaconWallet` class. If you'd like to get the info, please use `subscribeToEvent` with `BeaconEvent.ACTIVE_ACCOUNT_SET` +* We migrated `Node.js` support from LTS18 to LTS20 and above + +## Summary +### New features +* `@taquito/taquito` - Supported operation `transferTicket` in walletAPI PR #3003 + +### Improvement +* `@taquito/taquito` - Exported SmartRollupExecuteOutboxMessageParams PR #3031 +* `@taquito/beacon-wallet` - reverted `subscribeToEvent` of `ACTIVE_ACCOUNT_SET` in the package to ensure users will get a console warning, if they didn't subscribe events themselves PR #2987 +* `@taquito/rpc` - Updated rpc type `FrozenStaker` with `Baker_edge` PR #2987 +* `@taquito/rpc` - Updated rpc type `METADATA_BALANCE_UPDATES_CATEGORY` and`OperationMetadataBalanceUpdates` to have backwards compatible PR #2987 + +### Documentation +* Updated `michelson_encoder` documentation with section `#flattening-nested-tokens-pairunion` PR #3002 +* Updated `signing` documentation with section `#generating-a-tzip-32-message-signature` PR #2879 + +### Testing +* @taquito/beacon-wallet - Added broadcast-channel mock for @airgap/beacon-transport-postmessage in unit test +* Removed flextesa tests from CI workflow PR #3001 +* Fixed tzip16 test with new public IPFS gateway domain PR #3033 +* Updated staking and failing_noop integration tests to be robust PR #3033 + +### Internals +* `@taquito/http-utils` Configured the `fetch` call to be `keepalive=false` to fix socket hangup errors after node19 PR #2986 +* Updated denpendencies PR #3018 #3038 #3043 #3052 +* Removed taquito-test-dapp parisnet label on staking operations PR #3033 +* Removed Netlify references after migrating to Cloudflare PR #3012 + # Taquito v20.0.0 ## Summary diff --git a/example/package.json b/example/package.json index 1d4d26270d..a7ea6afa17 100644 --- a/example/package.json +++ b/example/package.json @@ -1,7 +1,7 @@ { "name": "@taquito/example", "private": true, - "version": "20.1.0-RC.0", + "version": "20.1.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.29.5", - "@taquito/ledger-signer": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/sapling": "^20.1.0-RC.0", - "@taquito/signer": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/ledger-signer": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/sapling": "^20.1.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip16": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/integration-tests/package.json b/integration-tests/package.json index cf3b86fc12..54beb40b45 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.1.0-RC.0", + "version": "20.1.0", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.0-RC.0", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/remote-signer": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/sapling": "^20.1.0-RC.0", - "@taquito/signer": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip12": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/contracts-library": "^20.1.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/remote-signer": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/sapling": "^20.1.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip12": "^20.1.0", + "@taquito/tzip16": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" diff --git a/lerna.json b/lerna.json index 90ea89b462..9c11232668 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "useNx": true, - "version": "20.1.0-RC.0" + "version": "20.1.0" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 271ff47355..12a361ea41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,14 +56,14 @@ }, "apps/taquito-test-dapp": { "name": "taquito-test-dapp-vite", - "version": "20.1.0-RC.0", + "version": "20.1.0", "dependencies": { "@airgap/beacon-sdk": "^4.2.2", "@airgap/beacon-types": "^4.2.2", - "@taquito/beacon-wallet": "^20.1.0-RC.0", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/beacon-wallet": "^20.1.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "buffer": "^6.0.3", "svelte-select": "^5.8.3", "vite-compatible-readable-stream": "^3.6.1" @@ -109,19 +109,19 @@ }, "example": { "name": "@taquito/example", - "version": "20.1.0-RC.0", + "version": "20.1.0", "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.29.5", - "@taquito/ledger-signer": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/sapling": "^20.1.0-RC.0", - "@taquito/signer": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/ledger-signer": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/sapling": "^20.1.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip16": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -130,26 +130,26 @@ } }, "integration-tests": { - "version": "20.1.0-RC.0", + "version": "20.1.0", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.0-RC.0", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/remote-signer": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/sapling": "^20.1.0-RC.0", - "@taquito/signer": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip12": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/contracts-library": "^20.1.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/remote-signer": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/sapling": "^20.1.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip12": "^20.1.0", + "@taquito/tzip16": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" @@ -27385,17 +27385,17 @@ }, "packages/taquito": { "name": "@taquito/taquito", - "version": "20.1.0-RC.0", + "version": "20.1.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -27443,12 +27443,12 @@ }, "packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -27499,13 +27499,13 @@ }, "packages/taquito-contracts-library": { "name": "@taquito/contracts-library", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -27542,7 +27542,7 @@ }, "packages/taquito-core": { "name": "@taquito/core", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -27558,10 +27558,10 @@ }, "packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -27619,14 +27619,14 @@ }, "packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -27687,15 +27687,15 @@ }, "packages/taquito-local-forging": { "name": "@taquito/local-forging", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.0-RC.0", + "@taquito/rpc": "^20.1.0", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", @@ -27733,10 +27733,10 @@ }, "packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -27765,21 +27765,21 @@ } }, "packages/taquito-michel-codec/pack-test-tool": { - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.1.0-RC.0", + "@taquito/rpc": "^20.1.0", "yargs": "^17.7.2" } }, "packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -27816,15 +27816,15 @@ }, "packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -27861,12 +27861,12 @@ }, "packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -27902,17 +27902,17 @@ }, "packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -27973,7 +27973,7 @@ }, "packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -27982,9 +27982,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.5.7", @@ -28027,7 +28027,7 @@ }, "packages/taquito-timelock": { "name": "@taquito/timelock", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -28035,9 +28035,9 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "@types/node": "^22.0.0", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -28068,13 +28068,13 @@ }, "packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip16": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -28110,15 +28110,15 @@ }, "packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -28157,12 +28157,12 @@ }, "packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.1.0-RC.0", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", "@types/bs58check": "^2.1.2", "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 4319c49ba0..2fb7747f0d 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.1.0-RC.0", + "version": "20.1.0", "description": "Beacon wallet provider", "keywords": [ "tezos", @@ -68,8 +68,8 @@ }, "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", diff --git a/packages/taquito-beacon-wallet/src/version.ts b/packages/taquito-beacon-wallet/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-beacon-wallet/src/version.ts +++ b/packages/taquito-beacon-wallet/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-contracts-library/package.json b/packages/taquito-contracts-library/package.json index 6580f6ad96..44b5306257 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.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-contracts-library/src/version.ts +++ b/packages/taquito-contracts-library/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-core/package.json b/packages/taquito-core/package.json index 273db1dd61..8621c2a901 100644 --- a/packages/taquito-core/package.json +++ b/packages/taquito-core/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/core", - "version": "20.1.0-RC.0", + "version": "20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-core/src/version.ts +++ b/packages/taquito-core/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-http-utils/package.json b/packages/taquito-http-utils/package.json index 732466fb7a..8b6b6034f1 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.1.0-RC.0", + "version": "20.1.0", "description": "", "keywords": [ "tezos" @@ -58,7 +58,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0", + "@taquito/core": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-http-utils/src/version.ts +++ b/packages/taquito-http-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-ledger-signer/package.json b/packages/taquito-ledger-signer/package.json index 4c8cf25fba..c6eaedce9e 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.1.0-RC.0", + "version": "20.1.0", "description": "Ledger signer provider", "keywords": [ "tezos", @@ -59,9 +59,9 @@ "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-ledger-signer/src/version.ts +++ b/packages/taquito-ledger-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-local-forging/package.json b/packages/taquito-local-forging/package.json index 6e7a8ceddb..9ade8d6514 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.1.0-RC.0", + "version": "20.1.0", "description": "Provide local forging functionality to be with taquito", "keywords": [ "tezos", @@ -67,12 +67,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.0-RC.0", + "@taquito/rpc": "^20.1.0", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", diff --git a/packages/taquito-local-forging/src/version.ts b/packages/taquito-local-forging/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-local-forging/src/version.ts +++ b/packages/taquito-local-forging/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-michel-codec/pack-test-tool/package.json b/packages/taquito-michel-codec/pack-test-tool/package.json index 6083887288..27f66a352c 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.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", + "@taquito/rpc": "^20.1.0", "yargs": "^17.7.2" } } diff --git a/packages/taquito-michel-codec/package.json b/packages/taquito-michel-codec/package.json index ba82f5855b..e0fe927332 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.1.0-RC.0", + "version": "20.1.0", "description": "Michelson parser/validator/formatter", "keywords": [ "tezos", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", diff --git a/packages/taquito-michel-codec/src/version.ts b/packages/taquito-michel-codec/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-michel-codec/src/version.ts +++ b/packages/taquito-michel-codec/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-michelson-encoder/package.json b/packages/taquito-michelson-encoder/package.json index 0b05e1fc8e..d93569785d 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.1.0-RC.0", + "version": "20.1.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -67,9 +67,9 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-michelson-encoder/src/version.ts +++ b/packages/taquito-michelson-encoder/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-remote-signer/package.json b/packages/taquito-remote-signer/package.json index 038f0d6961..5b0c99bcc5 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.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-remote-signer/src/version.ts +++ b/packages/taquito-remote-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-rpc/package.json b/packages/taquito-rpc/package.json index e95d5c46b9..ffe36dc71e 100644 --- a/packages/taquito-rpc/package.json +++ b/packages/taquito-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/rpc", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-rpc/src/version.ts b/packages/taquito-rpc/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-rpc/src/version.ts +++ b/packages/taquito-rpc/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-sapling/package.json b/packages/taquito-sapling/package.json index 6fd36f35c0..b3fe15d348 100644 --- a/packages/taquito-sapling/package.json +++ b/packages/taquito-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/sapling", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-sapling/src/version.ts +++ b/packages/taquito-sapling/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-signer/package.json b/packages/taquito-signer/package.json index 2230870f1a..1ec528e535 100644 --- a/packages/taquito-signer/package.json +++ b/packages/taquito-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/signer", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.5.7", diff --git a/packages/taquito-signer/src/version.ts b/packages/taquito-signer/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-signer/src/version.ts +++ b/packages/taquito-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-timelock/package.json b/packages/taquito-timelock/package.json index cc2d356d7a..d660400099 100644 --- a/packages/taquito-timelock/package.json +++ b/packages/taquito-timelock/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/timelock", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/signer": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "@types/node": "^22.0.0", "@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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-timelock/src/version.ts +++ b/packages/taquito-timelock/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-tzip12/package.json b/packages/taquito-tzip12/package.json index c8e396642e..bbad2c719c 100644 --- a/packages/taquito-tzip12/package.json +++ b/packages/taquito-tzip12/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip12", - "version": "20.1.0-RC.0", + "version": "20.1.0", "description": "Tzip12", "keywords": [ "tezos", @@ -62,10 +62,10 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/tzip16": "^20.1.0-RC.0" + "@taquito/core": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip16": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", diff --git a/packages/taquito-tzip12/src/version.ts b/packages/taquito-tzip12/src/version.ts index 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-tzip12/src/version.ts +++ b/packages/taquito-tzip12/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-tzip16/package.json b/packages/taquito-tzip16/package.json index cdef0a0eb0..fdf75853df 100644 --- a/packages/taquito-tzip16/package.json +++ b/packages/taquito-tzip16/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip16", - "version": "20.1.0-RC.0", + "version": "20.1.0", "description": "Tzip16", "keywords": [ "tezos", @@ -61,12 +61,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/taquito": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-tzip16/src/version.ts +++ b/packages/taquito-tzip16/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito-utils/package.json b/packages/taquito-utils/package.json index d523c3ff41..8dd509f74a 100644 --- a/packages/taquito-utils/package.json +++ b/packages/taquito-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/utils", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", + "@taquito/core": "^20.1.0", "@types/bs58check": "^2.1.2", "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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito-utils/src/version.ts +++ b/packages/taquito-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/packages/taquito/README.md b/packages/taquito/README.md index 159a1d91f0..070d132686 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 a58168c647..507b08a5c8 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-N5MAQc6peu71YajcvxJWm1HwX9p7f470TUKMihTpDwk= sha384-9XOrXaG+6XC9+rBZDjlJMvCzSaAe2KVaeRMKGsgYeXQo00iv6CWnRNTX6/1SQ0wj sha512-zSS7KEgPwnq4j2Km+wVMBAH4wYeCW/VNBpM0EviHvOEscbMUH+QDtQC8w0laLeLYfcKNmbixD3oPlok4gZe33A==" + "integrity": "sha256-wCCd9Y0MjdfwpfLCpUYxWZ1U2giilq0DgWDDItpL/v0= sha384-VjBcZcYC06DZCafRWVHxeWhiXqBPhyIwh1BArbsZHNwDae4NIyjxdmS3dlnCQ6WP sha512-gcWlAFelRYgsHAsCfz+n9ze0y3RyO/gtQShbK7T3eEHeLxVpAIdYo0GKsTiwCKta1Y0VhVXCp8Z8etANSXxpuA==" } } \ No newline at end of file diff --git a/packages/taquito/package.json b/packages/taquito/package.json index 49b210340a..7102893494 100644 --- a/packages/taquito/package.json +++ b/packages/taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/taquito", - "version": "20.1.0-RC.0", + "version": "20.1.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.1.0-RC.0", - "@taquito/http-utils": "^20.1.0-RC.0", - "@taquito/local-forging": "^20.1.0-RC.0", - "@taquito/michel-codec": "^20.1.0-RC.0", - "@taquito/michelson-encoder": "^20.1.0-RC.0", - "@taquito/rpc": "^20.1.0-RC.0", - "@taquito/utils": "^20.1.0-RC.0", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.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 3a659e6a3b..77804e804e 100644 --- a/packages/taquito/src/version.ts +++ b/packages/taquito/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "f903ced4144b4fd7b2afd585612dcf342912299b", - "version": "20.1.0-RC.0" + "commitHash": "ccdb0db9569457dbbe7e5c0c2b7cb2003bb6155d", + "version": "20.1.0" }; diff --git a/website/package-lock.json b/website/package-lock.json index ecfc324edb..8e92ef0357 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,12 +1,12 @@ { "name": "@taquito/website", - "version": "20.0.0", + "version": "20.1.0-RC.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@taquito/website", - "version": "20.0.0", + "version": "20.1.0-RC.0", "dependencies": { "@docusaurus/core": "2.4.3", "@docusaurus/plugin-google-gtag": "2.4.3", @@ -68,17 +68,17 @@ }, "../packages/taquito": { "name": "@taquito/taquito", - "version": "20.0.1", + "version": "20.1.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/local-forging": "^20.0.1", - "@taquito/michel-codec": "^20.0.1", - "@taquito/michelson-encoder": "^20.0.1", - "@taquito/rpc": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/local-forging": "^20.1.0", + "@taquito/michel-codec": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -126,12 +126,12 @@ }, "../packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.2.2", - "@taquito/core": "^20.0.1", - "@taquito/taquito": "^20.0.1" + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -171,7 +171,7 @@ }, "../packages/taquito-core": { "name": "@taquito/core", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -187,10 +187,10 @@ }, "../packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", + "@taquito/core": "^20.1.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -228,14 +228,14 @@ }, "../packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -272,10 +272,10 @@ }, "../packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1" + "@taquito/core": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -305,12 +305,12 @@ }, "../packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/rpc": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -347,15 +347,15 @@ }, "../packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -392,12 +392,12 @@ }, "../packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -433,7 +433,7 @@ }, "../packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -442,9 +442,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.5.7", @@ -487,13 +487,13 @@ }, "../packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/michelson-encoder": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/tzip16": "^20.0.1" + "@taquito/core": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/tzip16": "^20.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -529,15 +529,15 @@ }, "../packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.0.1", - "@taquito/http-utils": "^20.0.1", - "@taquito/michelson-encoder": "^20.0.1", - "@taquito/rpc": "^20.0.1", - "@taquito/taquito": "^20.0.1", - "@taquito/utils": "^20.0.1", + "@taquito/core": "^20.1.0", + "@taquito/http-utils": "^20.1.0", + "@taquito/michelson-encoder": "^20.1.0", + "@taquito/rpc": "^20.1.0", + "@taquito/taquito": "^20.1.0", + "@taquito/utils": "^20.1.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -576,12 +576,12 @@ }, "../packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.0.1", + "version": "20.1.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.0.1", + "@taquito/core": "^20.1.0", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/website/package.json b/website/package.json index 0aa25173f7..5736ca5728 100644 --- a/website/package.json +++ b/website/package.json @@ -84,5 +84,5 @@ "last 1 safari version" ] }, - "version": "20.1.0-RC.0" + "version": "20.1.0" } diff --git a/website/versioned_docs/version-17.5.0/mobile_bundle.md b/website/versioned_docs/version-17.5.0/mobile_bundle.md deleted file mode 100644 index b36c363472..0000000000 --- a/website/versioned_docs/version-17.5.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.5.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-17.5.0/rpc_nodes_integration_test.md deleted file mode 100644 index d9bf64803d..0000000000 --- a/website/versioned_docs/version-17.5.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.5.0/smart_rollups.md b/website/versioned_docs/version-17.5.0/smart_rollups.md deleted file mode 100644 index efb75fd3dd..0000000000 --- a/website/versioned_docs/version-17.5.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.5.0/tx_rollups.md b/website/versioned_docs/version-17.5.0/tx_rollups.md deleted file mode 100644 index e80f611ab7..0000000000 --- a/website/versioned_docs/version-17.5.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.5.0/ballot.md b/website/versioned_docs/version-20.1.0/ballot.md similarity index 100% rename from website/versioned_docs/version-17.5.0/ballot.md rename to website/versioned_docs/version-20.1.0/ballot.md diff --git a/website/versioned_docs/version-17.5.0/batch-api.md b/website/versioned_docs/version-20.1.0/batch-api.md similarity index 94% rename from website/versioned_docs/version-17.5.0/batch-api.md rename to website/versioned_docs/version-20.1.0/batch-api.md index 29c987c7c2..1f94b85bbe 100644 --- a/website/versioned_docs/version-17.5.0/batch-api.md +++ b/website/versioned_docs/version-20.1.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(); @@ -94,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(contractObject.interact('tezos')) - .withContractCall(contract.methodsObject.wait(UnitValue)); + .withContractCall(contract.methodsObject.interact({ 0: 'tezos' })) + .withContractCall(contract.methodsObject.wait({ 1: UnitValue }); ``` #### - The `array of transactions` method @@ -103,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([ { @@ -123,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.5.0/beaconwallet-singleton.md b/website/versioned_docs/version-20.1.0/beaconwallet-singleton.md similarity index 100% rename from website/versioned_docs/version-17.5.0/beaconwallet-singleton.md rename to website/versioned_docs/version-20.1.0/beaconwallet-singleton.md diff --git a/website/versioned_docs/version-17.5.0/cancel_http_requests.md b/website/versioned_docs/version-20.1.0/cancel_http_requests.md similarity index 98% rename from website/versioned_docs/version-17.5.0/cancel_http_requests.md rename to website/versioned_docs/version-20.1.0/cancel_http_requests.md index 78b9187bf0..79a6c3c143 100644 --- a/website/versioned_docs/version-17.5.0/cancel_http_requests.md +++ b/website/versioned_docs/version-20.1.0/cancel_http_requests.md @@ -43,6 +43,7 @@ class CancellableHttpBackend extends HttpBackend { try { const response = await fetch(urlWithQuery, { + keepalive: false, // generally only for Node 19 and above method, headers, body: JSON.stringify(data), diff --git a/website/versioned_docs/version-17.5.0/chatbot.md b/website/versioned_docs/version-20.1.0/chatbot.md similarity index 100% rename from website/versioned_docs/version-17.5.0/chatbot.md rename to website/versioned_docs/version-20.1.0/chatbot.md diff --git a/website/versioned_docs/version-17.5.0/complex_parameters.md b/website/versioned_docs/version-20.1.0/complex_parameters.md similarity index 99% rename from website/versioned_docs/version-17.5.0/complex_parameters.md rename to website/versioned_docs/version-20.1.0/complex_parameters.md index df8da2414e..e0ac50e707 100644 --- a/website/versioned_docs/version-17.5.0/complex_parameters.md +++ b/website/versioned_docs/version-20.1.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) diff --git a/website/versioned_docs/version-17.5.0/confirmation_event_stream.md b/website/versioned_docs/version-20.1.0/confirmation_event_stream.md similarity index 100% rename from website/versioned_docs/version-17.5.0/confirmation_event_stream.md rename to website/versioned_docs/version-20.1.0/confirmation_event_stream.md diff --git a/website/versioned_docs/version-17.5.0/consensus_key.md b/website/versioned_docs/version-20.1.0/consensus_key.md similarity index 88% rename from website/versioned_docs/version-17.5.0/consensus_key.md rename to website/versioned_docs/version-20.1.0/consensus_key.md index 7b9b84b478..bda600b95d 100644 --- a/website/versioned_docs/version-17.5.0/consensus_key.md +++ b/website/versioned_docs/version-20.1.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.5.0/contract-test-collection.md b/website/versioned_docs/version-20.1.0/contract-test-collection.md similarity index 97% rename from website/versioned_docs/version-17.5.0/contract-test-collection.md rename to website/versioned_docs/version-20.1.0/contract-test-collection.md index f8b7d5bee6..2043138481 100644 --- a/website/versioned_docs/version-17.5.0/contract-test-collection.md +++ b/website/versioned_docs/version-20.1.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.5.0/contract_call_parameters.md b/website/versioned_docs/version-20.1.0/contract_call_parameters.md similarity index 96% rename from website/versioned_docs/version-17.5.0/contract_call_parameters.md rename to website/versioned_docs/version-20.1.0/contract_call_parameters.md index 234092d165..9029d617dc 100644 --- a/website/versioned_docs/version-17.5.0/contract_call_parameters.md +++ b/website/versioned_docs/version-20.1.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.5.0/contracts-library.md b/website/versioned_docs/version-20.1.0/contracts-library.md similarity index 100% rename from website/versioned_docs/version-17.5.0/contracts-library.md rename to website/versioned_docs/version-20.1.0/contracts-library.md diff --git a/website/versioned_docs/version-17.5.0/dapp_prelaunch.md b/website/versioned_docs/version-20.1.0/dapp_prelaunch.md similarity index 93% rename from website/versioned_docs/version-17.5.0/dapp_prelaunch.md rename to website/versioned_docs/version-20.1.0/dapp_prelaunch.md index f4c0a892f5..10c0067e5c 100644 --- a/website/versioned_docs/version-17.5.0/dapp_prelaunch.md +++ b/website/versioned_docs/version-20.1.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.5.0/dapp_template.md b/website/versioned_docs/version-20.1.0/dapp_template.md similarity index 100% rename from website/versioned_docs/version-17.5.0/dapp_template.md rename to website/versioned_docs/version-20.1.0/dapp_template.md diff --git a/website/versioned_docs/version-17.5.0/drain_account.md b/website/versioned_docs/version-20.1.0/drain_account.md similarity index 94% rename from website/versioned_docs/version-17.5.0/drain_account.md rename to website/versioned_docs/version-20.1.0/drain_account.md index b7513fa2a8..5086d56569 100644 --- a/website/versioned_docs/version-17.5.0/drain_account.md +++ b/website/versioned_docs/version-20.1.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(); console.log( `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.5.0/estimate.md b/website/versioned_docs/version-20.1.0/estimate.md similarity index 95% rename from website/versioned_docs/version-17.5.0/estimate.md rename to website/versioned_docs/version-20.1.0/estimate.md index 4e532e360c..509bf3ee60 100644 --- a/website/versioned_docs/version-17.5.0/estimate.md +++ b/website/versioned_docs/version-20.1.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.5.0/events.md b/website/versioned_docs/version-20.1.0/events.md similarity index 92% rename from website/versioned_docs/version-17.5.0/events.md rename to website/versioned_docs/version-20.1.0/events.md index 40938fb861..517e1a3275 100644 --- a/website/versioned_docs/version-17.5.0/events.md +++ b/website/versioned_docs/version-20.1.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.5.0/fa2_parameters.md b/website/versioned_docs/version-20.1.0/fa2_parameters.md similarity index 100% rename from website/versioned_docs/version-17.5.0/fa2_parameters.md rename to website/versioned_docs/version-20.1.0/fa2_parameters.md diff --git a/website/versioned_docs/version-17.5.0/failing_noop.md b/website/versioned_docs/version-20.1.0/failing_noop.md similarity index 100% rename from website/versioned_docs/version-17.5.0/failing_noop.md rename to website/versioned_docs/version-20.1.0/failing_noop.md diff --git a/website/versioned_docs/version-17.5.0/failwith_errors.md b/website/versioned_docs/version-20.1.0/failwith_errors.md similarity index 100% rename from website/versioned_docs/version-17.5.0/failwith_errors.md rename to website/versioned_docs/version-20.1.0/failwith_errors.md diff --git a/website/versioned_docs/version-17.5.0/forger.md b/website/versioned_docs/version-20.1.0/forger.md similarity index 100% rename from website/versioned_docs/version-17.5.0/forger.md rename to website/versioned_docs/version-20.1.0/forger.md diff --git a/website/versioned_docs/version-17.5.0/global_constant.md b/website/versioned_docs/version-20.1.0/global_constant.md similarity index 100% rename from website/versioned_docs/version-17.5.0/global_constant.md rename to website/versioned_docs/version-20.1.0/global_constant.md diff --git a/website/versioned_docs/version-17.5.0/images/Tzip16ExecuteView.png b/website/versioned_docs/version-20.1.0/images/Tzip16ExecuteView.png similarity index 100% rename from website/versioned_docs/version-17.5.0/images/Tzip16ExecuteView.png rename to website/versioned_docs/version-20.1.0/images/Tzip16ExecuteView.png diff --git a/website/versioned_docs/version-17.5.0/images/diagramTzip16Metadata.png b/website/versioned_docs/version-20.1.0/images/diagramTzip16Metadata.png similarity index 100% rename from website/versioned_docs/version-17.5.0/images/diagramTzip16Metadata.png rename to website/versioned_docs/version-20.1.0/images/diagramTzip16Metadata.png diff --git a/website/versioned_docs/version-17.5.0/images/github.png b/website/versioned_docs/version-20.1.0/images/github.png similarity index 100% rename from website/versioned_docs/version-17.5.0/images/github.png rename to website/versioned_docs/version-20.1.0/images/github.png diff --git a/website/versioned_docs/version-17.5.0/images/gitlab.png b/website/versioned_docs/version-20.1.0/images/gitlab.png similarity index 100% rename from website/versioned_docs/version-17.5.0/images/gitlab.png rename to website/versioned_docs/version-20.1.0/images/gitlab.png diff --git a/website/versioned_docs/version-17.5.0/increase_paid_storage.md b/website/versioned_docs/version-20.1.0/increase_paid_storage.md similarity index 97% rename from website/versioned_docs/version-17.5.0/increase_paid_storage.md rename to website/versioned_docs/version-20.1.0/increase_paid_storage.md index b15a75c085..b47e0de6e9 100644 --- a/website/versioned_docs/version-17.5.0/increase_paid_storage.md +++ b/website/versioned_docs/version-20.1.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.5.0/inmemory_signer.md b/website/versioned_docs/version-20.1.0/inmemory_signer.md similarity index 93% rename from website/versioned_docs/version-17.5.0/inmemory_signer.md rename to website/versioned_docs/version-20.1.0/inmemory_signer.md index f5296841e0..1beaf8d42a 100644 --- a/website/versioned_docs/version-17.5.0/inmemory_signer.md +++ b/website/versioned_docs/version-20.1.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,7 +188,7 @@ 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'); + // const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); // ed25519 must have all hardened paths @@ -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', @@ -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.5.0/lambda_view.md b/website/versioned_docs/version-20.1.0/lambda_view.md similarity index 98% rename from website/versioned_docs/version-17.5.0/lambda_view.md rename to website/versioned_docs/version-20.1.0/lambda_view.md index cf8754e8d4..0f3277dd4a 100644 --- a/website/versioned_docs/version-17.5.0/lambda_view.md +++ b/website/versioned_docs/version-20.1.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) => { console.log(response); diff --git a/website/versioned_docs/version-17.5.0/ledger_integration_test.md b/website/versioned_docs/version-20.1.0/ledger_integration_test.md similarity index 100% rename from website/versioned_docs/version-17.5.0/ledger_integration_test.md rename to website/versioned_docs/version-20.1.0/ledger_integration_test.md diff --git a/website/versioned_docs/version-17.5.0/ledger_signer.md b/website/versioned_docs/version-20.1.0/ledger_signer.md similarity index 97% rename from website/versioned_docs/version-17.5.0/ledger_signer.md rename to website/versioned_docs/version-20.1.0/ledger_signer.md index d0f8d7d82a..1e91f88b90 100644 --- a/website/versioned_docs/version-17.5.0/ledger_signer.md +++ b/website/versioned_docs/version-20.1.0/ledger_signer.md @@ -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)}`)); ``` @@ -199,7 +199,7 @@ _Note that this example is not intended to be a complete example of paths scanni //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.5.0/liquidity_baking.md b/website/versioned_docs/version-20.1.0/liquidity_baking.md similarity index 100% rename from website/versioned_docs/version-17.5.0/liquidity_baking.md rename to website/versioned_docs/version-20.1.0/liquidity_baking.md diff --git a/website/versioned_docs/version-17.5.0/making_transfers.md b/website/versioned_docs/version-20.1.0/making_transfers.md similarity index 100% rename from website/versioned_docs/version-17.5.0/making_transfers.md rename to website/versioned_docs/version-20.1.0/making_transfers.md diff --git a/website/versioned_docs/version-17.5.0/manager_lambda.md b/website/versioned_docs/version-20.1.0/manager_lambda.md similarity index 100% rename from website/versioned_docs/version-17.5.0/manager_lambda.md rename to website/versioned_docs/version-20.1.0/manager_lambda.md diff --git a/website/versioned_docs/version-17.5.0/maps_bigmaps.md b/website/versioned_docs/version-20.1.0/maps_bigmaps.md similarity index 100% rename from website/versioned_docs/version-17.5.0/maps_bigmaps.md rename to website/versioned_docs/version-20.1.0/maps_bigmaps.md diff --git a/website/versioned_docs/version-17.5.0/metadata-tzip16.md b/website/versioned_docs/version-20.1.0/metadata-tzip16.md similarity index 95% rename from website/versioned_docs/version-17.5.0/metadata-tzip16.md rename to website/versioned_docs/version-20.1.0/metadata-tzip16.md index 162daa6209..2268343d3e 100644 --- a/website/versioned_docs/version-17.5.0/metadata-tzip16.md +++ b/website/versioned_docs/version-20.1.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) => { console.log(`Result of the view someJson: ${result}`); - console.log(`Transform result to char: ${bytes2Char(result)}`); + console.log(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => console.log(`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) => { console.log(`Result of the view someJson: ${result}`); - console.log(`Transform result to char: ${bytes2Char(result)}`); + console.log(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-20.1.0/michel_codec.md b/website/versioned_docs/version-20.1.0/michel_codec.md new file mode 100644 index 0000000000..010409f11e --- /dev/null +++ b/website/versioned_docs/version-20.1.0/michel_codec.md @@ -0,0 +1,123 @@ +--- +title: Michel Codec +author: Hui-An Yang +--- + +The `taquito/michel-codec` package converts and validates Michelson expressions between JSON-based Michelson and Micheline. It also comes with various functions like `packData`, `packDataBytes`, `unpackData` and `unpackDataBytes` to serialize any value of packable type to its optimized binary representation locally and vice versa, like Michelson instructions `PACK` and `UNPACK`. + +## Parser class +To use the parser class, import and initialize it as follows. + +```ts +import { Parser } from '@taquito/michel-codec' +const p = new Parser() +``` +### Configuration +You can configure the parser class by passing `ParserOptions` through initialization with `expandMacros` and `expandGlobalConstant` properties. + +* `expandMacros` - defaults to true unless you don't want `Parser` class to expand them; you can pass `{ expandMacros: false }` to disable it. ref: Expand [Michelson macros](https://tezos.gitlab.io/whitedoc/michelson.html#macros) during parsing +* `expandGlobalConstant` - expects an object where the keys are global constant hashes and the values are the corresponding JSON Micheline expressions. + +for example + +```ts +import { Parser } from '@taquito/michel-codec' + +const parserOptions: ParserOptions = { + expandMacros: true, + expandGlobalConstant: { + 'expr...': { prim: 'DROP', args: [{ int: '2' }] } + } +} +const p = new Parser(parserOptions); +``` + +### parseJSON & emitMicheline - Parse JSON Michelson and convert it to Micheline +* `parseJSON` - takes a JSON-encoded Michelson, validates it, strips away unneeded properties and expands macros based on your configuration. +* `emitMicheline` takes a parsed JSON Michelson object and converts it to a Micheline expression with formatting options. + +```js live noInline +// import { Parser, emitMicheline } from '@taquito/michel-codec' + +const p = new Parser(); +Tezos.contract + .at("KT1BJadpDyLCACMH7Tt9xtpx4dQZVKw9cDF7") + .then(contract => { + const code = p.parseJSON(contract.script.code); + console.log("Pretty print Michelson smart contract:"); + console.log(emitMicheline(code, {indent:" ", newline: "\n",})); + + const storage = p.parseJSON(contract.script.storage); + console.log("Pretty print Storage:"); + console.log(emitMicheline(storage, {indent:" ", newline: "\n",})); + }) + .catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); +``` + +### parseMichelineExpression - Parse Micheline and convert it to JSON Michelson +Takes a Micheline expression in the form of script or data and converts it to JSON Michelson + +```js live noInline +// import { Parser } from '@taquito/michel-codec' + +const p = new Parser(); + +const michelineScript = `{parameter unit; storage unit; code {CDR; NIL operation; PAIR};}` +const script = p.parseMichelineExpression(michelineScript); +console.log('JSON Michelson script: ' + JSON.stringify(script) + '\n'); + +const michelineData = `(IF_LEFT { IF_LEFT { SWAP ; SUB } { ADD } })`; +const data = p.parseMichelineExpression(michelineData); +console.log('JSON Michelson data: ' + JSON.stringify(data)); +``` + +## PACK and UNPACK locally + +### packData & packDataBytes - Pack Michelson data +Serialize any value of packable type to its optimized binary representation identical to the one used by PACK Michelson instructions. +Without a type definition (not recommended), `packData` and `packDataBytes` will encode the data as a binary form of a generic Michelson expression. +Type definition allows types like `timestamp`, `address` and other base58 representable types to be encoded to corresponding optimized binary forms borrowed from the Tezos protocol. + +```ts +// import { packData, packDataBytes } from '@taquito/michel-codec' + +const data: MichelsonData = { string: 'KT1RvkwF4F7pz1gCoxkyZrG1RkrxQy3gmFTv%foo' }; +const typ: MichelsonType = { prim: 'address' }; + +const packed = packData(data, typ); +// 050a0000001901be41ee922ddd2cf33201e49d32da0afec571dce300666f6f + +const packedBytes = packDataBytes(data, typ); +// { bytes: "050a0000001901be41ee922ddd2cf33201e49d32da0afec571dce300666f6f" } +``` + +### unpackData & unpackDataBytes - Unpack Michelson data +Deserialize a byte array into its corresponding Michelson value. +Without a type definition (not recommended), the binary data will be treated as a binary form of a generic Michelson expression and returned as is. +Type definition allows some types, like `timestamp` and `address` and others, usually encoded in optimized binary forms, to be transformed back to their string representations like base58 and ISO timestamps. + +```ts +// import { unpackData, unpackDataBytes } from '@taquito/michel-codec' +const type: MichelsonType = { prim: 'timestamp' }; + +const src1 = [0x05, 0x00, 0xa7, 0xe8, 0xe4, 0xd8, 0x0b]; +const data1 = unpackData(src1, type); +// { string: "2019-09-26T10:59:51Z" } + +const src2 = { bytes: '0500a7e8e4d80b' }; +const data2 = unpackDataBytes(src2, type); +// { string: "2019-09-26T10:59:51Z" } +``` + +Alternatively, the same binary data without passing a type definition to `unpackData`, `unpackDataBytes` will not be deserialized correctly +```ts +// import { unpackData, unpackDataBytes } from '@taquito/michel-codec' + +const src1 = [0x05, 0x00, 0xa7, 0xe8, 0xe4, 0xd8, 0x0b]; +const data1 = unpackData(src1); +// { int: "1569495591" } + +const src2 = { bytes: '0500a7e8e4d80b' }; +const data2 = unpackDataBytes(src2); +// { int: "1569495591" } +``` diff --git a/website/versioned_docs/version-17.5.0/michelson_encoder.md b/website/versioned_docs/version-20.1.0/michelson_encoder.md similarity index 80% rename from website/versioned_docs/version-17.5.0/michelson_encoder.md rename to website/versioned_docs/version-20.1.0/michelson_encoder.md index 73ae5050dd..d48294ae63 100644 --- a/website/versioned_docs/version-17.5.0/michelson_encoder.md +++ b/website/versioned_docs/version-20.1.0/michelson_encoder.md @@ -7,6 +7,11 @@ The purpose of the `Michelson-Encoder` package is to create an abstraction over Its integration into the main `Taquito` package makes it easier to write the storage when deploying a contract and the parameter when calling a contract entry-point. +:::info +With the release of Taquito vevsion 20.0.0, we have made a breaking change in the Michelson Encoder package. +Please check the [Breaking Change to Field Numbering](#breaking-change-to-field-numbering) section of this document for more information and how to enable the old behavior. +::: + ## How it works? There are three main classes in the Michelson Encoder: @@ -264,12 +269,16 @@ const storageType = { ] }; const storageSchema = new Schema(storageType); -const typecheck = storageSchema.Typecheck({ - stored_counter: 10, - threshold: 5, - keys: ['edpkuLxx9PQD8fZ45eUzrK3yhfDZJHhBuK4Zi49DcEGANwd2rpX82t'] -}) -console.log(typecheck); +try { + storageSchema.Typecheck({ + stored_counter: 10, + threshold: 5, + keys: ['edpkuLxx9PQD8fZ45eUzrK3yhfDZJHhBuK4Zi49DcEGANwd2rpX82t'] + }) + console.log('Storage object is valid'); +} catch (e) { + console.log(`Storage is not valid: ${e}`); +} ``` ### The Encode method @@ -533,3 +542,106 @@ const storageSchema = new Schema({ const mixedSchema = storageSchema.ExtractSchema(); console.log(JSON.stringify(mixedSchema, null, 2)); ``` + +## Breaking Change to Field Numbering {#breaking-change-to-field-numbering} +When having nested `pair`s or unions (`or`), Taquito assigns numbers to fields when an annotation is not present. +In previous versions of Taquito, the nested object's fields were numbered were a continuation of the parent object's fields. +For example, the following schema: + +```js live noInline +const param = { + prim: 'or', + args: [ + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%transfer'] + }, + { + prim: 'or', + args: [ + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%approve'] + }, + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%mint'] + } + ] + } + ], + annots: [':_entries'] +}; +const parameterSchema = new ParameterSchema(param); +Token.fieldNumberingStrategy = "Legacy"; //To bring back the old behavior +const value = parameterSchema.generateSchema(); +console.log(JSON.stringify(value, null, 2)); +Token.fieldNumberingStrategy = 'Latest'; //To restore the default (new) behavior +``` + +Please run the code above and check the output. + +Please note how nested field numbers are not predictable. The field numbers are assigned in the order their parent were encountered during the traversal of the tree. For instance, in the above example, `approve` would get a field number of `1`. Because it has annotations, the field number is not used. But its nested fields would be numbered starting from `1` and not `2`. + +While this behavior is not an error, it is prone to unexpected changes when the schema is modified. Also, predicting the field number of a specific field is not straightforward. + +With the release of Taquito version 20.0.0, we have made a breaking change in the Michelson Encoder package. The field numbering is now predictable and consistent. +The field numbers for each nested object (`Or`/`Pair`) are now reset from zero. You can see that by commenting out the line: `Token.fieldNumberingStrategy = "Legacy";` and running the code again. + +Below you can see a diff of the new versus old behavior: + +```diff +{ + "__michelsonType": "or", + "schema": { + "transfer": { + "__michelsonType": "pair", + "schema": { + "0": { + "__michelsonType": "address", + "schema": "address" + }, + "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + }, + "approve": { + "__michelsonType": "pair", + "schema": { +- "1": { ++ "0": { + "__michelsonType": "address", + "schema": "address" + }, +- "2": { ++ "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + }, + "mint": { + "__michelsonType": "pair", + "schema": { +- "2": { ++ "0": { + "__michelsonType": "address", + "schema": "address" + }, +- "3": { ++ "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + } + } +} +``` +You can enable the old behavior by setting the `Token.fieldNumberingStrategy = 'Legacy'`. Please note that this value should stay the same for the whole application. +The possible values are: `type FieldNumberingStrategy = 'Legacy' | 'ResetFieldNumbersInNestedObjects' | 'Latest';` For new applications, we recommend using the default value `Latest`. diff --git a/website/versioned_docs/version-17.5.0/michelsonmap.md b/website/versioned_docs/version-20.1.0/michelsonmap.md similarity index 100% rename from website/versioned_docs/version-17.5.0/michelsonmap.md rename to website/versioned_docs/version-20.1.0/michelsonmap.md diff --git a/website/versioned_docs/version-17.5.0/multisig_doc.md b/website/versioned_docs/version-20.1.0/multisig_doc.md similarity index 100% rename from website/versioned_docs/version-17.5.0/multisig_doc.md rename to website/versioned_docs/version-20.1.0/multisig_doc.md diff --git a/website/versioned_docs/version-17.5.0/on_chain_views.md b/website/versioned_docs/version-20.1.0/on_chain_views.md similarity index 100% rename from website/versioned_docs/version-17.5.0/on_chain_views.md rename to website/versioned_docs/version-20.1.0/on_chain_views.md diff --git a/website/versioned_docs/version-17.5.0/operation_flow.md b/website/versioned_docs/version-20.1.0/operation_flow.md similarity index 100% rename from website/versioned_docs/version-17.5.0/operation_flow.md rename to website/versioned_docs/version-20.1.0/operation_flow.md diff --git a/website/versioned_docs/version-17.5.0/ophash_before_injecting.md b/website/versioned_docs/version-20.1.0/ophash_before_injecting.md similarity index 100% rename from website/versioned_docs/version-17.5.0/ophash_before_injecting.md rename to website/versioned_docs/version-20.1.0/ophash_before_injecting.md diff --git a/website/versioned_docs/version-17.5.0/originate.md b/website/versioned_docs/version-20.1.0/originate.md similarity index 89% rename from website/versioned_docs/version-17.5.0/originate.md rename to website/versioned_docs/version-20.1.0/originate.md index c1f5a88305..215fb5be8f 100644 --- a/website/versioned_docs/version-17.5.0/originate.md +++ b/website/versioned_docs/version-20.1.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.1.0/package_bundle.md b/website/versioned_docs/version-20.1.0/package_bundle.md new file mode 100644 index 0000000000..5324905d10 --- /dev/null +++ b/website/versioned_docs/version-20.1.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.5.0/prepare.md b/website/versioned_docs/version-20.1.0/prepare.md similarity index 100% rename from website/versioned_docs/version-17.5.0/prepare.md rename to website/versioned_docs/version-20.1.0/prepare.md diff --git a/website/versioned_docs/version-17.5.0/proposal_and_ballot.md b/website/versioned_docs/version-20.1.0/proposal_and_ballot.md similarity index 100% rename from website/versioned_docs/version-17.5.0/proposal_and_ballot.md rename to website/versioned_docs/version-20.1.0/proposal_and_ballot.md diff --git a/website/versioned_docs/version-17.5.0/quick_start.md b/website/versioned_docs/version-20.1.0/quick_start.md similarity index 99% rename from website/versioned_docs/version-17.5.0/quick_start.md rename to website/versioned_docs/version-20.1.0/quick_start.md index d110457731..10e2e0b4e2 100644 --- a/website/versioned_docs/version-17.5.0/quick_start.md +++ b/website/versioned_docs/version-20.1.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'; diff --git a/website/versioned_docs/version-17.5.0/rpc-cache.md b/website/versioned_docs/version-20.1.0/rpc-cache.md similarity index 100% rename from website/versioned_docs/version-17.5.0/rpc-cache.md rename to website/versioned_docs/version-20.1.0/rpc-cache.md diff --git a/website/versioned_docs/version-17.5.0/rpc_nodes.md b/website/versioned_docs/version-20.1.0/rpc_nodes.md similarity index 85% rename from website/versioned_docs/version-17.5.0/rpc_nodes.md rename to website/versioned_docs/version-20.1.0/rpc_nodes.md index 5395019f9f..3f361e2fc9 100644 --- a/website/versioned_docs/version-17.5.0/rpc_nodes.md +++ b/website/versioned_docs/version-20.1.0/rpc_nodes.md @@ -25,13 +25,11 @@ 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) | | 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) | +| Tezos Foundation | Ghostnet | https://rpc.ghostnet.teztnets.com/ | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) | +| Tezos Foundation | Parisnet | https://rpc.pariscnet.teztnets.com/ | [Check](https://rpc.pariscnet.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.* diff --git a/website/versioned_docs/version-20.1.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-20.1.0/rpc_nodes_integration_test.md new file mode 100644 index 0000000000..76416813ac --- /dev/null +++ b/website/versioned_docs/version-20.1.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.5.0/rpc_package.md b/website/versioned_docs/version-20.1.0/rpc_package.md similarity index 85% rename from website/versioned_docs/version-17.5.0/rpc_package.md rename to website/versioned_docs/version-20.1.0/rpc_package.md index b09a5c57e9..9f1ec494c7 100644 --- a/website/versioned_docs/version-17.5.0/rpc_package.md +++ b/website/versioned_docs/version-20.1.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.5.0/sapling.md b/website/versioned_docs/version-20.1.0/sapling.md similarity index 100% rename from website/versioned_docs/version-17.5.0/sapling.md rename to website/versioned_docs/version-20.1.0/sapling.md diff --git a/website/versioned_docs/version-17.5.0/sapling_in_memory_spending_key.md b/website/versioned_docs/version-20.1.0/sapling_in_memory_spending_key.md similarity index 100% rename from website/versioned_docs/version-17.5.0/sapling_in_memory_spending_key.md rename to website/versioned_docs/version-20.1.0/sapling_in_memory_spending_key.md diff --git a/website/versioned_docs/version-17.5.0/sapling_in_memory_viewing_key.md b/website/versioned_docs/version-20.1.0/sapling_in_memory_viewing_key.md similarity index 100% rename from website/versioned_docs/version-17.5.0/sapling_in_memory_viewing_key.md rename to website/versioned_docs/version-20.1.0/sapling_in_memory_viewing_key.md diff --git a/website/versioned_docs/version-17.5.0/set_delegate.md b/website/versioned_docs/version-20.1.0/set_delegate.md similarity index 100% rename from website/versioned_docs/version-17.5.0/set_delegate.md rename to website/versioned_docs/version-20.1.0/set_delegate.md diff --git a/website/versioned_docs/version-17.5.0/signing.md b/website/versioned_docs/version-20.1.0/signing.md similarity index 68% rename from website/versioned_docs/version-17.5.0/signing.md rename to website/versioned_docs/version-20.1.0/signing.md index edfa044e48..a946fdab03 100644 --- a/website/versioned_docs/version-17.5.0/signing.md +++ b/website/versioned_docs/version-20.1.0/signing.md @@ -4,6 +4,9 @@ id: signing author: Claude Barde --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + Signing arbitrary chunks of data is a common practice in a blockchain environment and is usually done to prove that a user has access to a certain account or that a message comes from a certain account. This practice is still new on Tezos and the use cases are rare. However, as the interactions between users and smart contracts increase, knowing how to sign data and send the signature to a smart contract can set you one step ahead in your knowledge of the Tezos blockchain. @@ -48,12 +51,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 +93,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 +110,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); @@ -141,9 +144,90 @@ const isVerified = verifySignature( ); ``` +## Generating a TZIP-32 message signature + +The community have proposed [TZIP-32](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-message-signing/tzip-32.md)(draft), Off-Chain Message Signing, which aims to define a formal message signing standard that is simple, secure, extendable and compatible with hardware wallets. TZIP-32 can be further used in [TZIP-33](https://gitlab.com/tezos/tzip/-/blob/6483efc9e591960effe76f4ae996ec187bf13bf4/drafts/current/draft-sign-in-with-tezos.md)(draft) which is a [CAIP-122](https://chainagnostic.org/CAIPs/caip-122) compliant sign-in with Tezos standard. + +**Message encoding** + +This is the schema to encode the message into bytes, please read the [TZIP-32](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-message-signing/tzip-32.md) for more detail. + +| Name | Size | Contents | +|-----------------------|----------|-------------------------| +| magic_string | 30 bytes | bytes | +| # Bytes in next field | 1 byte | unsigned 8-bit integer | +| interface | variable | bytes | +| character_encoding | 1 byte | unsigned 8-bit integer | +| # Bytes in next field | 2 bytes | unsigned 16-bit integer | +| message | Variable | bytes | + +**Examples of signing TZIP-32 message on contractAPI and walletAPI** + +The Off-Chain Message Signing magic bytes is `0x80` defined in [TZIP-31](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-signer-requests/tzip-31.md)(draft). + + + + +```js live noInline +// import { TezosToolkit } from '@taquito/taquito' +// import { InMemorySigner } from '@taquito/signer' +// import { stringToBytes, num2PaddedHex } from '@taquito/utils'; +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); + +let magicByte = '0x80' +let magicString = 'tezos signed offchain message' +let interface_ = 'tzip://32' +let characterEncoding = '0' +let message = 'Hello world!' + +let bytes = stringToBytes(magicString) + num2PaddedHex(interface_.length, 8) + stringToBytes(interface_) + num2PaddedHex(Number(characterEncoding), 8) + num2PaddedHex(message.length, 16) + stringToBytes(message) + +InMemorySigner.fromSecretKey('edsk2rKA8YEExg9Zo2qNPiQnnYheF1DhqjLVmfKdxiFfu5GyGRZRnb') + .then((theSigner) => { + Tezos.setProvider({ signer: theSigner }); + return Tezos.signer.sign(bytes, new Uint8Array([parseInt(magicByte, 16)])) + }) + .then(signed => { + console.log(JSON.stringify(signed, null, 2)); + }) + .catch((error) => console.log(`Error: ${error} ${JSON.stringify(error, null, 2)}`)); +``` + + + + +```js live noInline wallet +// import { TezosToolkit } from '@taquito/taquito' +// import { InMemorySigner } from '@taquito/signer' +// import { stringToBytes, num2PaddedHex } from '@taquito/utils'; +// const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com'); + +let magicByte = '0x80' +let magicString = 'tezos signed offchain message' +let interface_ = 'tzip://32' +let characterEncoding = '0' +let message = 'Hello world!' + +let bytes = stringToBytes(magicString) + num2PaddedHex(interface_.length, 8) + stringToBytes(interface_) + num2PaddedHex(Number(characterEncoding), 8) + num2PaddedHex(message.length, 16) + stringToBytes(message) + +const payload = { + signingType: SigningType.RAW, + payload: magicByte + bytes +} +wallet.client.requestSignPayload(payload).then(signed => console.log(JSON.stringify(signed, null, 2))) +``` + + + + ## 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.1.0/smart_rollups.md b/website/versioned_docs/version-20.1.0/smart_rollups.md new file mode 100644 index 0000000000..c29f0caa83 --- /dev/null +++ b/website/versioned_docs/version-20.1.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.5.0/smartcontracts.md b/website/versioned_docs/version-20.1.0/smartcontracts.md similarity index 91% rename from website/versioned_docs/version-17.5.0/smartcontracts.md rename to website/versioned_docs/version-20.1.0/smartcontracts.md index 32ac82ab2a..779e83b550 100644 --- a/website/versioned_docs/version-17.5.0/smartcontracts.md +++ b/website/versioned_docs/version-20.1.0/smartcontracts.md @@ -26,11 +26,11 @@ 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.2.0 +### Counter Contract in JSLIGO v1.3.0 ``` -export namespace Counter { - export type storage = int; +namespace Counter { + type storage = int; type ret = [list, storage]; // Three entrypoints @@ -42,7 +42,7 @@ export namespace Counter { const decrement = (delta : int, store : storage) : ret => [list([]), store - delta]; @entry - const reset = (_u : unit, _s : storage) : ret => [list([]), 0]; + const reset = (_p : unit, _s : storage) : ret => [list([]), 0]; }; ``` @@ -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 console.log(`List all contract methods: ${Object.keys(contract.methodsObject)}\n`); console.log( `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) => console.log(`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) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => console.log(`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 console.log(`List all contract methods: ${Object.keys(contract.methodsObject)}\n`); console.log( `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) => console.log(`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) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)) .catch((error) => console.log(`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.1.0/staking.md b/website/versioned_docs/version-20.1.0/staking.md new file mode 100644 index 0000000000..64343e3940 --- /dev/null +++ b/website/versioned_docs/version-20.1.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.5.0/storage_annotations.md b/website/versioned_docs/version-20.1.0/storage_annotations.md similarity index 93% rename from website/versioned_docs/version-17.5.0/storage_annotations.md rename to website/versioned_docs/version-20.1.0/storage_annotations.md index d6a0bcc6c0..f889263eba 100644 --- a/website/versioned_docs/version-17.5.0/storage_annotations.md +++ b/website/versioned_docs/version-20.1.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({ @@ -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({ @@ -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({ diff --git a/website/versioned_docs/version-17.5.0/taquito_utils.md b/website/versioned_docs/version-20.1.0/taquito_utils.md similarity index 100% rename from website/versioned_docs/version-17.5.0/taquito_utils.md rename to website/versioned_docs/version-20.1.0/taquito_utils.md diff --git a/website/versioned_docs/version-17.5.0/testing_strategies.md b/website/versioned_docs/version-20.1.0/testing_strategies.md similarity index 97% rename from website/versioned_docs/version-17.5.0/testing_strategies.md rename to website/versioned_docs/version-20.1.0/testing_strategies.md index a4d1ac6249..c9149b19a0 100644 --- a/website/versioned_docs/version-17.5.0/testing_strategies.md +++ b/website/versioned_docs/version-20.1.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.5.0/tezbridge_signer.md b/website/versioned_docs/version-20.1.0/tezbridge_signer.md similarity index 100% rename from website/versioned_docs/version-17.5.0/tezbridge_signer.md rename to website/versioned_docs/version-20.1.0/tezbridge_signer.md diff --git a/website/versioned_docs/version-17.5.0/tezos_domains.md b/website/versioned_docs/version-20.1.0/tezos_domains.md similarity index 89% rename from website/versioned_docs/version-17.5.0/tezos_domains.md rename to website/versioned_docs/version-20.1.0/tezos_domains.md index e7c597ca99..c4981352e7 100644 --- a/website/versioned_docs/version-17.5.0/tezos_domains.md +++ b/website/versioned_docs/version-20.1.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.5.0/tickets.md b/website/versioned_docs/version-20.1.0/tickets.md similarity index 100% rename from website/versioned_docs/version-17.5.0/tickets.md rename to website/versioned_docs/version-20.1.0/tickets.md diff --git a/website/versioned_docs/version-20.1.0/timelock.md b/website/versioned_docs/version-20.1.0/timelock.md new file mode 100644 index 0000000000..feb8b0118c --- /dev/null +++ b/website/versioned_docs/version-20.1.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.5.0/transaction_limits.md b/website/versioned_docs/version-20.1.0/transaction_limits.md similarity index 100% rename from website/versioned_docs/version-17.5.0/transaction_limits.md rename to website/versioned_docs/version-20.1.0/transaction_limits.md diff --git a/website/versioned_docs/version-17.5.0/tutorial.md b/website/versioned_docs/version-20.1.0/tutorial.md similarity index 96% rename from website/versioned_docs/version-17.5.0/tutorial.md rename to website/versioned_docs/version-20.1.0/tutorial.md index 226c5eb002..5d4e04865e 100644 --- a/website/versioned_docs/version-17.5.0/tutorial.md +++ b/website/versioned_docs/version-20.1.0/tutorial.md @@ -105,7 +105,7 @@ tezosToolkit.tz.getBalance("tz1YvE7Sfo92ueEPEdZceNWd5MWNeMNSt16L").then(balance }); ``` -Running `npx ts-node index.ts` should now show the 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. +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). @@ -239,7 +239,7 @@ For the purpose of this section, I have created a new address and funded it on t
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 @@ -409,7 +409,7 @@ git commit -m "initial commit" 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 +npm i @taquito/taquito @taquito/beacon-wallet @airgap/beacon-dapp ``` Open the file `index.html` and make the following changes: @@ -501,6 +501,7 @@ const ConnectButton = ({ name: "My dApp", preferredNetwork: NetworkType.GHOSTNET, disableDefaultEvents: false, + enableMetrics: true, }); Tezos.setWalletProvider(wallet); setWallet(wallet); @@ -601,52 +602,21 @@ export default Transfer; 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 buffer stream-browserify util +npm i -D vite-plugin-node-polyfills ``` -Now we need to tell Vite to use these packages instead of the Node.js versions. To do this, open the file `vite.config.ts` and add the following code: +Now we need to tell Vite to use this plugin. To do this, open the file `vite.config.ts` and add the following code: -```tsx +```ts import { defineConfig } from 'vite' -import react from "@vitejs/plugin-react"; +import react from '@vitejs/plugin-react' +import { nodePolyfills } from 'vite-plugin-node-polyfills' export default defineConfig({ - define: { - global: {}, - }, - build: { - commonjsOptions: { - transformMixedEsModules: true, - }, - }, - plugins: [react()], - resolve: { - alias: { - buffer: "buffer", - stream: "stream-browserify", - util: "util", - }, - }, + plugins: [react(), nodePolyfills()], }); ``` -Also, create a file named `src/polyfills.ts` and add the following code: - -```tsx -import { Buffer } from "buffer"; - -globalThis.Buffer = Buffer; -``` -Also, make the following modification to the file `index.html`: - -```diff -
-+ - - - -``` - ### Running the dApp Make sure that the command `npm run dev` is still running in the terminal, and that there are no build errors. diff --git a/website/versioned_docs/version-17.5.0/tutorial_links.md b/website/versioned_docs/version-20.1.0/tutorial_links.md similarity index 100% rename from website/versioned_docs/version-17.5.0/tutorial_links.md rename to website/versioned_docs/version-20.1.0/tutorial_links.md diff --git a/website/versioned_docs/version-17.5.0/tzip12.md b/website/versioned_docs/version-20.1.0/tzip12.md similarity index 92% rename from website/versioned_docs/version-17.5.0/tzip12.md rename to website/versioned_docs/version-20.1.0/tzip12.md index b59f951c26..bcbc463059 100644 --- a/website/versioned_docs/version-17.5.0/tzip12.md +++ b/website/versioned_docs/version-20.1.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 => { console.log('Result of the view token_metadata:'); - console.log(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - console.log(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - console.log(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - console.log(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + console.log(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + console.log(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + console.log(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + console.log(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => console.log(`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 => { console.log('Result of the view token_metadata:'); - console.log(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - console.log(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - console.log(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - console.log(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + console.log(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + console.log(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + console.log(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + console.log(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-17.5.0/tzip16-sequence-diagram.md b/website/versioned_docs/version-20.1.0/tzip16-sequence-diagram.md similarity index 100% rename from website/versioned_docs/version-17.5.0/tzip16-sequence-diagram.md rename to website/versioned_docs/version-20.1.0/tzip16-sequence-diagram.md diff --git a/website/versioned_docs/version-17.5.0/validators.md b/website/versioned_docs/version-20.1.0/validators.md similarity index 100% rename from website/versioned_docs/version-17.5.0/validators.md rename to website/versioned_docs/version-20.1.0/validators.md diff --git a/website/versioned_docs/version-17.5.0/version.md b/website/versioned_docs/version-20.1.0/version.md similarity index 93% rename from website/versioned_docs/version-17.5.0/version.md rename to website/versioned_docs/version-20.1.0/version.md index b6e631f824..244341960f 100644 --- a/website/versioned_docs/version-17.5.0/version.md +++ b/website/versioned_docs/version-20.1.0/version.md @@ -2,6 +2,244 @@ title: Versions author: Jev Bjorsell --- + +# Taquito v20.1.0 + +**Breaking changes:** +* We removed `account` public property on `BeaconWallet` class. If you'd like to get the info, please use `subscribeToEvent` with `BeaconEvent.ACTIVE_ACCOUNT_SET` +* We migrated `Node.js` support from LTS18 to LTS20 and above + +## Summary +### New features +* `@taquito/taquito` - Supported operation `transferTicket` in walletAPI PR #3003 + +### Improvement +* `@taquito/taquito` - Exported SmartRollupExecuteOutboxMessageParams PR #3031 +* `@taquito/beacon-wallet` - reverted `subscribeToEvent` of `ACTIVE_ACCOUNT_SET` in the package to ensure users will get a console warning, if they didn't subscribe events themselves PR #2987 +* `@taquito/rpc` - Updated rpc type `FrozenStaker` with `Baker_edge` PR #2987 +* `@taquito/rpc` - Updated rpc type `METADATA_BALANCE_UPDATES_CATEGORY` and`OperationMetadataBalanceUpdates` to have backwards compatible PR #2987 + +### Documentation +* Updated `michelson_encoder` documentation with section `#flattening-nested-tokens-pairunion` PR #3002 +* Updated `signing` documentation with section `#generating-a-tzip-32-message-signature` PR #2879 + +### Testing +* @taquito/beacon-wallet - Added broadcast-channel mock for @airgap/beacon-transport-postmessage in unit test +* Removed flextesa tests from CI workflow PR #3001 +* Fixed tzip16 test with new public IPFS gateway domain PR #3033 +* Updated staking and failing_noop integration tests to be robust PR #3033 + +### Internals +* `@taquito/http-utils` Configured the `fetch` call to be `keepalive=false` to fix socket hangup errors after node19 PR #2986 +* Updated denpendencies PR #3018 #3038 #3043 #3052 +* Removed taquito-test-dapp parisnet label on staking operations PR #3033 +* Removed Netlify references after migrating to Cloudflare PR #3012 + +# 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:** @@ -1210,7 +1448,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. @@ -2655,7 +2893,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.5.0/wallet_API.md b/website/versioned_docs/version-20.1.0/wallet_API.md similarity index 97% rename from website/versioned_docs/version-17.5.0/wallet_API.md rename to website/versioned_docs/version-20.1.0/wallet_API.md index 575f72909f..f5b1111c05 100644 --- a/website/versioned_docs/version-17.5.0/wallet_API.md +++ b/website/versioned_docs/version-20.1.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' | '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.) @@ -289,7 +285,7 @@ In this example, we are working with a simple smart contract with two methods: ` Most of the entrypoint method's possible arguments are pretty straightforward and intuitive and do not require any explanation. However, a couple of them need more attention. -Most of the time, the process is simple: you take the contract abstraction you created for the contract you target, you call the `methods` property on it which exposes all the entrypoints of the contract as methods. You pass the argument you want to send to the contract as a function argument before calling the `send()` method to send the transaction: +Most of the time, the process is simple: you take the contract abstraction you created for the contract you target, you call the `methodsObject` property on it which exposes all the entrypoints of the contract as methods. You pass the argument you want to send to the contract as a function argument before calling the `send()` method to send the transaction: ```js live noInline wallet Tezos.wallet @@ -606,7 +602,7 @@ _Properties:_ 1. `address`: a string containing the address of the smart contract. -2. `methods`: an object whose methods are named after the contract entrypoints (if the entrypoints are not annotated, the methods will be numbers). +2. `methodsObject`: an object whose methods are named after the contract entrypoints (if the entrypoints are not annotated, the methods will be numbers). 3. `parameterSchema`: an instance of the [Parameter class](https://github.com/ecadlabs/taquito/blob/d424fa178a95675920b21c8e8c228fbe0e7df36e/packages/taquito-michelson-encoder/src/schema/parameter.ts) with two useful methods: `hasAnnotation` tells you if the entrypoints are annotated and `isMultipleEntryPoint` tells you if the contract has multiple entrypoints (if _false_, you can interact with the contract with `.methodsObject.default()`). diff --git a/website/versioned_docs/version-17.5.0/wallets.md b/website/versioned_docs/version-20.1.0/wallets.md similarity index 100% rename from website/versioned_docs/version-17.5.0/wallets.md rename to website/versioned_docs/version-20.1.0/wallets.md diff --git a/website/versioned_docs/version-17.5.0/web3js_taquito.md b/website/versioned_docs/version-20.1.0/web3js_taquito.md similarity index 98% rename from website/versioned_docs/version-17.5.0/web3js_taquito.md rename to website/versioned_docs/version-20.1.0/web3js_taquito.md index 305aa9980c..3b40c29a38 100644 --- a/website/versioned_docs/version-17.5.0/web3js_taquito.md +++ b/website/versioned_docs/version-20.1.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.5.0-sidebars.json b/website/versioned_sidebars/version-20.1.0-sidebars.json similarity index 97% rename from website/versioned_sidebars/version-17.5.0-sidebars.json rename to website/versioned_sidebars/version-20.1.0-sidebars.json index c8b9a5900c..b3ebfc567d 100644 --- a/website/versioned_sidebars/version-17.5.0-sidebars.json +++ b/website/versioned_sidebars/version-20.1.0-sidebars.json @@ -41,7 +41,8 @@ "set_delegate", "smart_rollups", "proposal_and_ballot", - "failing_noop" + "failing_noop", + "staking" ] }, { @@ -125,7 +126,9 @@ "items": [ "rpc_package", "michelson_encoder", + "michel_codec", "contracts-library", + "timelock", "taquito_utils", { "type": "category", @@ -187,7 +190,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 4fc2276529..03cbda3788 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,7 +1,7 @@ [ + "20.1.0", "20.0.0", "19.2.0", "19.1.0", - "19.0.0", - "17.5.0" + "19.0.0" ]