diff --git a/apps/taquito-test-dapp/package.json b/apps/taquito-test-dapp/package.json index 6e53f7b40a..c602d10a9a 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": "17.5.0-beta-RC.1", + "version": "17.5.0", "type": "module", "scripts": { "dev": "vite", @@ -25,10 +25,10 @@ }, "dependencies": { "@airgap/beacon-sdk": "4.0.12", - "@taquito/beacon-wallet": "^17.5.0-beta-RC.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/beacon-wallet": "^17.5.0", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "buffer": "^6.0.3", "svelte-select": "^5.7.0", "vite-compatible-readable-stream": "^3.6.1" diff --git a/docs/version.md b/docs/version.md index 3c2909a9e5..0956126b8d 100644 --- a/docs/version.md +++ b/docs/version.md @@ -2,6 +2,40 @@ title: Versions author: Jev Bjorsell --- +# Taquito 17.5.0 + +**Important Note:** +In this version, we replaced instances of `Axios` in favour of `Fetch`. + +We are not expecting any breaking changes, but if there are any issues that you see regarding this, please reach out to the Taquito team. + +## Summary + +### New Features +- `@taquito/taquito` - Expose and publicly `smartContractAbstractionSemantic` #2534 + +### Improvement +- `@taquito/http-utils` - Removed `Axios` as a dependency of Taquito in favour of `fetch`/`node-fetch` #2461 +### Documentation +- Updated RPC nodes on the website [PR#2732](https://github.com/ecadlabs/taquito/pull/2732 +- Updated Michelson encoder documentation to reference `generateSchema` instead of the outdated `extractSchema` #2630 +- Added a Taquito Chatbot assistant for the Taquito website to help answer user questions #2684 + +### Internals +- Removed archive node, and references to it in Taquito [PR#2743](https://github.com/ecadlabs/taquito/pull/2743) +- Updated Sass, Lerna, and Firebase versions [PR#2749](https://github.com/ecadlabs/taquito/pull/2749) +- Updated integration tests to increase speed and reliability #2741 + + +## `@taquito/http-utils` - Removed `Axios` in favour of `fetch` +The `taquito/http-utils` is responsible for handling all HTTP incoming and outgoing HTTP requests in Taquito. It utilized `Axios` as a main dependency to handle requests coming in and out of Taquito. + +Now that browsers and Node have supported `fetch` natively, it makes more sense for us to move towards it. + +Axios came with quite a large dependency tree, as well as multiple workarounds we needed to include for it to work properly (i.e. the `axios-fetch-adapter`) + +With this change we hope for a more stable HTTP handler in Taquito while reducing the package size at the same time. + # Taquito v17.4.0 diff --git a/example/package.json b/example/package.json index 89cdd73c78..1c23e31922 100644 --- a/example/package.json +++ b/example/package.json @@ -1,7 +1,7 @@ { "name": "@taquito/example", "private": true, - "version": "17.5.0-beta-RC.1", + "version": "17.5.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", @@ -41,16 +41,16 @@ }, "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.27.21", - "@taquito/ledger-signer": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/sapling": "^17.5.0-beta-RC.1", - "@taquito/signer": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/ledger-signer": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/sapling": "^17.5.0", + "@taquito/signer": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip16": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/integration-tests/package.json b/integration-tests/package.json index b5e365d340..c7c6e042d7 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -10,26 +10,26 @@ "test:mondaynet-secret-key": "RUN_MONDAYNET_WITH_SECRET_KEY=true jest --runInBand", "test": "jest" }, - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "dependencies": { "@ledgerhq/devices": "8.0.7", "@ledgerhq/hw-transport": "6.28.8", "@ledgerhq/hw-transport-node-hid": "6.27.21", "@ledgerhq/hw-transport-node-hid-noevents": "6.27.19", - "@taquito/contracts-library": "^17.5.0-beta-RC.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/remote-signer": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/sapling": "^17.5.0-beta-RC.1", - "@taquito/signer": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip12": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/contracts-library": "^17.5.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/remote-signer": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/sapling": "^17.5.0", + "@taquito/signer": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip12": "^17.5.0", + "@taquito/tzip16": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" diff --git a/lerna.json b/lerna.json index c014f3bd69..1c41d30d99 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "useNx": true, - "version": "17.5.0-beta-RC.1" + "version": "17.5.0" } diff --git a/package-lock.json b/package-lock.json index e15adc5cef..0d2679c16f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,13 +56,13 @@ }, "apps/taquito-test-dapp": { "name": "taquito-test-dapp-vite", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "dependencies": { "@airgap/beacon-sdk": "4.0.12", - "@taquito/beacon-wallet": "^17.5.0-beta-RC.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/beacon-wallet": "^17.5.0", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "buffer": "^6.0.3", "svelte-select": "^5.7.0", "vite-compatible-readable-stream": "^3.6.1" @@ -107,19 +107,19 @@ }, "example": { "name": "@taquito/example", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.27.21", - "@taquito/ledger-signer": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/sapling": "^17.5.0-beta-RC.1", - "@taquito/signer": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/ledger-signer": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/sapling": "^17.5.0", + "@taquito/signer": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip16": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -128,26 +128,26 @@ } }, "integration-tests": { - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "dependencies": { "@ledgerhq/devices": "8.0.7", "@ledgerhq/hw-transport": "6.28.8", "@ledgerhq/hw-transport-node-hid": "6.27.21", "@ledgerhq/hw-transport-node-hid-noevents": "6.27.19", - "@taquito/contracts-library": "^17.5.0-beta-RC.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/remote-signer": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/sapling": "^17.5.0-beta-RC.1", - "@taquito/signer": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip12": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/contracts-library": "^17.5.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/remote-signer": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/sapling": "^17.5.0", + "@taquito/signer": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip12": "^17.5.0", + "@taquito/tzip16": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" @@ -20786,17 +20786,17 @@ }, "packages/taquito": { "name": "@taquito/taquito", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -20844,12 +20844,12 @@ }, "packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "4.0.12", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -20896,13 +20896,13 @@ }, "packages/taquito-contracts-library": { "name": "@taquito/contracts-library", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -20939,7 +20939,7 @@ }, "packages/taquito-core": { "name": "@taquito/core", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -20955,10 +20955,10 @@ }, "packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -21015,14 +21015,14 @@ }, "packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.28.8", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -21082,15 +21082,15 @@ }, "packages/taquito-local-forging": { "name": "@taquito/local-forging", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^17.5.0-beta-RC.1", + "@taquito/rpc": "^17.5.0", "@types/bluebird": "^3.5.40", "@types/estree": "^1.0.2", "@types/jest": "^29.5.5", @@ -21128,10 +21128,10 @@ }, "packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "MIT", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -21160,21 +21160,21 @@ } }, "packages/taquito-michel-codec/pack-test-tool": { - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^17.5.0-beta-RC.1", + "@taquito/rpc": "^17.5.0", "yargs": "^17.7.2" } }, "packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -21211,15 +21211,15 @@ }, "packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -21256,12 +21256,12 @@ }, "packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -21297,17 +21297,17 @@ }, "packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -21367,7 +21367,7 @@ }, "packages/taquito-signer": { "name": "@taquito/signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -21376,9 +21376,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", @@ -21421,13 +21421,13 @@ }, "packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip16": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -21463,15 +21463,15 @@ }, "packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -21510,12 +21510,12 @@ }, "packages/taquito-utils": { "name": "@taquito/utils", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/packages/taquito-beacon-wallet/package.json b/packages/taquito-beacon-wallet/package.json index cbd60c9ad2..7fe54ede7e 100644 --- a/packages/taquito-beacon-wallet/package.json +++ b/packages/taquito-beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/beacon-wallet", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Beacon wallet provider", "keywords": [ "tezos", @@ -67,8 +67,8 @@ }, "dependencies": { "@airgap/beacon-dapp": "4.0.12", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-beacon-wallet/src/version.ts b/packages/taquito-beacon-wallet/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-beacon-wallet/src/version.ts +++ b/packages/taquito-beacon-wallet/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-contracts-library/package.json b/packages/taquito-contracts-library/package.json index 788dbcc223..df9321ed32 100644 --- a/packages/taquito-contracts-library/package.json +++ b/packages/taquito-contracts-library/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/contracts-library", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Can be used as an extension on the TezosToolkit to provide contracts data", "keywords": [ "tezos" @@ -67,10 +67,10 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-contracts-library/src/version.ts +++ b/packages/taquito-contracts-library/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-core/package.json b/packages/taquito-core/package.json index 9148ae48f2..8e04b70f0e 100644 --- a/packages/taquito-core/package.json +++ b/packages/taquito-core/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/core", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-core/src/version.ts +++ b/packages/taquito-core/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-http-utils/package.json b/packages/taquito-http-utils/package.json index 4b31fa828c..fd173cb555 100644 --- a/packages/taquito-http-utils/package.json +++ b/packages/taquito-http-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/http-utils", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "", "keywords": [ "tezos" @@ -58,7 +58,7 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-http-utils/src/version.ts +++ b/packages/taquito-http-utils/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-ledger-signer/package.json b/packages/taquito-ledger-signer/package.json index b7a7881db4..4600fbfffb 100644 --- a/packages/taquito-ledger-signer/package.json +++ b/packages/taquito-ledger-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/ledger-signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Ledger signer provider", "keywords": [ "tezos", @@ -59,9 +59,9 @@ "dependencies": { "@ledgerhq/hw-transport": "^6.28.8", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-ledger-signer/src/version.ts +++ b/packages/taquito-ledger-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-local-forging/package.json b/packages/taquito-local-forging/package.json index e193f3029c..64c76e3a6e 100644 --- a/packages/taquito-local-forging/package.json +++ b/packages/taquito-local-forging/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/local-forging", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Provide local forging functionality to be with taquito", "keywords": [ "tezos", @@ -67,12 +67,12 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^17.5.0-beta-RC.1", + "@taquito/rpc": "^17.5.0", "@types/bluebird": "^3.5.40", "@types/estree": "^1.0.2", "@types/jest": "^29.5.5", diff --git a/packages/taquito-local-forging/src/version.ts b/packages/taquito-local-forging/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-local-forging/src/version.ts +++ b/packages/taquito-local-forging/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-michel-codec/pack-test-tool/package.json b/packages/taquito-michel-codec/pack-test-tool/package.json index 82b61cb322..4f0964fb70 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": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", + "@taquito/rpc": "^17.5.0", "yargs": "^17.7.2" } } diff --git a/packages/taquito-michel-codec/package.json b/packages/taquito-michel-codec/package.json index 7368394bb0..355ec74aa5 100644 --- a/packages/taquito-michel-codec/package.json +++ b/packages/taquito-michel-codec/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michel-codec", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Michelson parser/validator/formatter", "keywords": [ "tezos", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-michel-codec/src/version.ts b/packages/taquito-michel-codec/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-michel-codec/src/version.ts +++ b/packages/taquito-michel-codec/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-michelson-encoder/package.json b/packages/taquito-michelson-encoder/package.json index 9bdbfa3d9e..394d4ef360 100644 --- a/packages/taquito-michelson-encoder/package.json +++ b/packages/taquito-michelson-encoder/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michelson-encoder", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -67,9 +67,9 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-michelson-encoder/src/version.ts +++ b/packages/taquito-michelson-encoder/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-remote-signer/package.json b/packages/taquito-remote-signer/package.json index 520ca67abe..3b2aff6413 100644 --- a/packages/taquito-remote-signer/package.json +++ b/packages/taquito-remote-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/remote-signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Remote signer provider", "keywords": [ "tezos", @@ -62,10 +62,10 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-remote-signer/src/version.ts +++ b/packages/taquito-remote-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-rpc/package.json b/packages/taquito-rpc/package.json index 3521183f73..6319d772e7 100644 --- a/packages/taquito-rpc/package.json +++ b/packages/taquito-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/rpc", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-rpc/src/version.ts b/packages/taquito-rpc/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-rpc/src/version.ts +++ b/packages/taquito-rpc/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-sapling/package.json b/packages/taquito-sapling/package.json index c5137a286b..25627fbf35 100644 --- a/packages/taquito-sapling/package.json +++ b/packages/taquito-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/sapling", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-sapling/src/version.ts +++ b/packages/taquito-sapling/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-signer/package.json b/packages/taquito-signer/package.json index c784f77134..d5ef98fba4 100644 --- a/packages/taquito-signer/package.json +++ b/packages/taquito-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/signer", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", diff --git a/packages/taquito-signer/src/version.ts b/packages/taquito-signer/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-signer/src/version.ts +++ b/packages/taquito-signer/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-tzip12/package.json b/packages/taquito-tzip12/package.json index 5525c7f1d0..c29266b5cc 100644 --- a/packages/taquito-tzip12/package.json +++ b/packages/taquito-tzip12/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip12", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Tzip12", "keywords": [ "tezos", @@ -62,10 +62,10 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/tzip16": "^17.5.0-beta-RC.1" + "@taquito/core": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip16": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", diff --git a/packages/taquito-tzip12/src/version.ts b/packages/taquito-tzip12/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-tzip12/src/version.ts +++ b/packages/taquito-tzip12/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-tzip16/package.json b/packages/taquito-tzip16/package.json index 30e8331007..07870e2591 100644 --- a/packages/taquito-tzip16/package.json +++ b/packages/taquito-tzip16/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip16", - "version": "17.5.0-beta-RC.1", + "version": "17.5.0", "description": "Tzip16", "keywords": [ "tezos", @@ -61,12 +61,12 @@ ] }, "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/taquito": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-tzip16/src/version.ts +++ b/packages/taquito-tzip16/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito-utils/package.json b/packages/taquito-utils/package.json index 7d3b0a8082..1b89bc98f4 100644 --- a/packages/taquito-utils/package.json +++ b/packages/taquito-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/utils", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/packages/taquito-utils/src/version.ts b/packages/taquito-utils/src/version.ts index fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito-utils/src/version.ts +++ b/packages/taquito-utils/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/packages/taquito/README.md b/packages/taquito/README.md index fcb01fb20c..40764b02b0 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 64ea993eef..e4a39be4d3 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-LXejb7BKNKKmxx+3pMu9YIqJE3xzHoZtrWIM38WIR8M= sha384-bsQh8kBjRWP0hRSzrBmZS/Lly83VKHinX9G0cFBWAz4bM3r7N8iQjUXTYbZKuEcs sha512-v/QHiGObcQXAAiTwtyxPJQpu0lUJh3hZW9s0wFxsNMD5oGpPiWtbtWlABkL9beMjWa/AAr3zf7Xf8n+pPmmoXA==" + "integrity": "sha256-2W03+8as7Lz1yW78Zzyp76agKIQlqQrvpD0JCc30sTM= sha384-m2hGm1DwrEmOxm2QGENPeSWzUXePL1k5F/qqKHe3/GD9ET5k4c8rQdyCDzsR3SF7 sha512-gY0fvtx6H3CZIwxuEifUsPtRXNhgIHy/kvwLXoMZp3+7fZmJ6HAgybL+UwJK8VlanTHvQ2A+6yOL7x1j8dd17w==" } } \ No newline at end of file diff --git a/packages/taquito/package.json b/packages/taquito/package.json index fc04e180dd..0c0836cf92 100644 --- a/packages/taquito/package.json +++ b/packages/taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/taquito", - "version": "17.5.0-beta-RC.1", + "version": "17.5.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": "^17.5.0-beta-RC.1", - "@taquito/http-utils": "^17.5.0-beta-RC.1", - "@taquito/local-forging": "^17.5.0-beta-RC.1", - "@taquito/michel-codec": "^17.5.0-beta-RC.1", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.1", - "@taquito/rpc": "^17.5.0-beta-RC.1", - "@taquito/utils": "^17.5.0-beta-RC.1", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.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 fa3c9f7158..eeabaf0b5e 100644 --- a/packages/taquito/src/version.ts +++ b/packages/taquito/src/version.ts @@ -1,5 +1,5 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - commitHash: 'd3bc5021c4b46ca659441501b30bda17d32219e2', - version: '17.5.0-beta-RC.1', + commitHash: 'ff6c3b619e314a09bb0aa65d711ef9eaf81a0ee9', + version: '17.5.0', }; diff --git a/website/package-lock.json b/website/package-lock.json index 48eab7c032..013b9d93c8 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,12 +1,12 @@ { "name": "@taquito/website", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@taquito/website", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "dependencies": { "@docusaurus/core": "2.4.3", "@docusaurus/plugin-google-gtag": "2.4.3", @@ -69,17 +69,17 @@ }, "../packages/taquito": { "name": "@taquito/taquito", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/http-utils": "^17.5.0-beta-RC.0", - "@taquito/local-forging": "^17.5.0-beta-RC.0", - "@taquito/michel-codec": "^17.5.0-beta-RC.0", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.0", - "@taquito/rpc": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/local-forging": "^17.5.0", + "@taquito/michel-codec": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -127,12 +127,12 @@ }, "../packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "4.0.12", - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0" + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -169,7 +169,7 @@ }, "../packages/taquito-core": { "name": "@taquito/core", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -185,10 +185,10 @@ }, "../packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -226,14 +226,14 @@ }, "../packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.28.8", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -270,10 +270,10 @@ }, "../packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "MIT", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0" + "@taquito/core": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -303,12 +303,12 @@ }, "../packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/rpc": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -345,15 +345,15 @@ }, "../packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/http-utils": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -390,12 +390,12 @@ }, "../packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/http-utils": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -431,17 +431,17 @@ }, "../packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "17.5.0-beta-RC.0", + "version": "17.5.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": "^17.5.0-beta-RC.0", - "@taquito/rpc": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -482,7 +482,7 @@ }, "../packages/taquito-signer": { "name": "@taquito/signer", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -491,9 +491,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "@types/bn.js": "^5.1.2", "bip39": "3.1.0", "elliptic": "^6.5.4", @@ -536,13 +536,13 @@ }, "../packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/tzip16": "^17.5.0-beta-RC.0" + "@taquito/core": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/tzip16": "^17.5.0" }, "devDependencies": { "@types/bluebird": "^3.5.40", @@ -578,15 +578,15 @@ }, "../packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^17.5.0-beta-RC.0", - "@taquito/http-utils": "^17.5.0-beta-RC.0", - "@taquito/michelson-encoder": "^17.5.0-beta-RC.0", - "@taquito/rpc": "^17.5.0-beta-RC.0", - "@taquito/taquito": "^17.5.0-beta-RC.0", - "@taquito/utils": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", + "@taquito/http-utils": "^17.5.0", + "@taquito/michelson-encoder": "^17.5.0", + "@taquito/rpc": "^17.5.0", + "@taquito/taquito": "^17.5.0", + "@taquito/utils": "^17.5.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -625,12 +625,12 @@ }, "../packages/taquito-utils": { "name": "@taquito/utils", - "version": "17.5.0-beta-RC.0", + "version": "17.5.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^17.5.0-beta-RC.0", + "@taquito/core": "^17.5.0", "@types/bs58check": "^2.1.0", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/website/package.json b/website/package.json index 3c625a7e87..8bc72d73e0 100644 --- a/website/package.json +++ b/website/package.json @@ -87,5 +87,5 @@ "last 1 safari version" ] }, - "version": "17.5.0-beta-RC.0" + "version": "17.5.0" } \ No newline at end of file diff --git a/website/versioned_docs/version-17.0.0/local_forger.md b/website/versioned_docs/version-17.0.0/local_forger.md deleted file mode 100644 index 829103dfd7..0000000000 --- a/website/versioned_docs/version-17.0.0/local_forger.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Local Forging Package -id: local_forger -author: Michael Kernaghan ---- - -# How to Use the Taquito Local Forging Package - -One of the tools offered by Taquito is the local forging package, which allows you to forge transactions locally without interacting with a node. Here is a step-by-step guide on how to use the Taquito local forging package: - -## Step 1: Import the Local Forger - -You will need to import the LocalForger class from Taquito to use the local forging package. You can do this by adding the following line to your code: - -``` -import { LocalForger } from '@taquito/local-forging'; - -``` - -## Step 2: Create a Transaction - -Next, you must create a transaction you want to forge. You can do this using the Taquito library as you normally would. Here is an example of creating a transaction to transfer 1 XTZ from one address to another: - -``` -import { TezosToolkit } from '@taquito/taquito'; - -const tezos = new TezosToolkit(''); -const from = 'tz1abc...xyz'; -const to = 'tz1def...uvw'; -const amount = 1; - -const transferOperation = await tezos.contract.transfer({ to, amount }).send({ from }); - -``` - -## Step 3: Forge the Transaction - -Once you have created your transaction, you can use the LocalForger class. Here is an example of how to do this: - -``` -const forger = new LocalForger(); -const forgedBytes = await forger.forge(transferOperation); - -``` - -## Step 4: Sign the Transaction - -After the transaction has been forged, you can sign it using your private key. Here is an example of how to sign the transaction: - -``` -const { bytes: signatureBytes } = await tezos.signer.sign(forgedBytes, from); - -``` - -## Step 5: Broadcast the Transaction - -Finally, you can broadcast the signed transaction to the blockchain. Here is an example of how to do this using the Taquito library: - -``` -const operation = await tezos.rpc.sendOperation({ operation: signatureBytes }); - -``` - -That's it! You have now successfully used the Taquito local forging package to simulate the forging and signing of a transaction locally. This can be useful for testing and development, as it allows you to experiment with the transaction process without interacting with the blockchain. \ No newline at end of file diff --git a/website/versioned_docs/version-17.0.0/react-template.md b/website/versioned_docs/version-17.0.0/react-template.md deleted file mode 100644 index 1dbc9c8c53..0000000000 --- a/website/versioned_docs/version-17.0.0/react-template.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: React dapp template -author: Maksym Bykovskyy ---- - -The React dapp template is a starter kit for developing front-end applications running on the Tezos network with the React framework. - -To get started with the React template, please refer to the [Getting Started][get-started] section in the README found in the [React template][repo] repository on Github. - -[get-started]: https://github.com/ecadlabs/taquito-react-template#getting-started -[repo]: https://github.com/ecadlabs/taquito-react-template \ No newline at end of file diff --git a/website/versioned_docs/version-17.0.0/taquito_utils.md b/website/versioned_docs/version-17.0.0/taquito_utils.md deleted file mode 100644 index aed26f3137..0000000000 --- a/website/versioned_docs/version-17.0.0/taquito_utils.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Taquito Utils -author: Davis Sawali ---- - -## Description -The `@taquito/utils` package provides developers with utility functions in Taquito. - -You can find a full list of available utility functions in Taquito [here](https://tezostaquito.io/typedoc/modules/_taquito_utils.html) - -## Usage Example -To use the functions, simply import the function you need as such: - -```js -import { getPkhfromPk, b58cencode, b58cdecode } from '@taquito/utils'; - -const publicKeyHash = getPkhfromPk('replace_with_publickey'); -const encoded = b58cencode('replace_with_publickey'); -``` - diff --git a/website/versioned_docs/version-17.0.0/upgrading_guide.md b/website/versioned_docs/version-17.0.0/upgrading_guide.md deleted file mode 100644 index a5cf782d10..0000000000 --- a/website/versioned_docs/version-17.0.0/upgrading_guide.md +++ /dev/null @@ -1,281 +0,0 @@ ---- -title: Upgrading Guide -author: Roxane Letourneau ---- - -# Upgrading to version 12 - -:::note Breaking changes -With this major number update to support the `ithaca` Tezos protocol, we have also implemented some breaking changes to the Taquito API. The following sections explain how to update your projects. -::: - -## The operation confirmations are now done using the `SubscribeProvider` set on the `TezosToolkit` - -The change to the `confirmation` methods includes a breaking change. The polling interval for the confirmation (`confirmationPollingIntervalSecond`) and the streamer configuration (`ConfigStreamer`) have been moved from the `TezosToolkit` to the `PollingSubscribeProvider` class, where they belong logically. - -We previously had two polling interval configurations on the TezosToolkit, one for the confirmation methods and one for the `PollingSubscribeProvider`. These two have been removed from the TezosToolkit. - -**Before version 12:** -```ts -// config to change the polling interval for the confirmations -Tezos.setProvider({ config: { confirmationPollingIntervalSecond: 5 }}); -// config to change the polling interval for the streamer -Tezos.setProvider({ config: { streamerPollingIntervalMilliseconds: 5000 }}); -``` - -**Since version 12:** -```ts -// The polling interval is calculated by default based on the block time -// A different polling interval can be passed in the constructor of the PollingSubscribeProvider if needed -Tezos.setStreamProvider(Tezos.getFactory(PollingSubscribeProvider)({ pollingIntervalMilliseconds:5000 })); -``` - -The configuration regarding the retry strategy for the `PollingSubscribeProvider` has also been moved to its constructor. - -**Before version 12:** -```ts -Tezos.setProvider({ config: { - shouldObservableSubscriptionRetry: true, - observableSubscriptionRetryFunction: retry() - }}); -``` - -**Since version 12:** -```ts -Tezos.setStreamProvider(Tezos.getFactory(PollingSubscribeProvider)({ - shouldObservableSubscriptionRetry: true, - observableSubscriptionRetryFunction: retry() - })); -``` - -## Lambda views (tzip-4 views) - -Since the Hangzhou protocol, the RPC exposes an endpoint (`helpers/scripts/run_view`), allowing us to run the lambda views. In version 12, we changed the implementation to use this endpoint and are not relying on a lambda contract anymore. - -**Breaking change** (primarily for sandbox users): There is no need to deploy a lambda contract anymore. The `read` method of the `ContractView` class no longer takes an optional lambda contract address as a parameter. - - -# Upgrading to version 9 - -Please take note of the two following breaking changes: -- Breaking change introduced for the method `getMultipleValues` of the `BigMapAbstraction` class and the method `getBigMapKeysByID` of the `RpcContractProvider` class: they now return a MichelsonMap instead of an object. This is meant to support keys of type object that are encountered when the Michelson type of the big map key is a `pair`. - -- To give more flexibility to the user on the retry strategy used in the `ObservableSubscription` class, we removed the parameters `observableSubscriptionRetryDelay` and `observableSubscriptionRetries` introduced in version `8.1.1-beta` and replaced them to accept an `OperatorFunction`. When users configure the `ObservableSubscription` to retry on error, we use the `retry` operators from `rxjs` by default. An example showing how to set a custom retry strategy is available [here](https://github.com/ecadlabs/taquito/blob/master/example/example-streamer-custom-retry-logic.ts). - - -# Upgrading to version 8 - -## Breaking change - Typescript upgrade - -We decided to update the Typescript version that we are using to take advantage of the newer features it brings in our Michel-Codec package. - -You might get the following error if a Typescript upgrade is needed in your project: -``` -Error: node_modules/@taquito/michel-codec/dist/types/michelson-types.d.ts:122:34 - error TS1110: Type expected. -export declare type ProtocolID = `${Protocol}`; -``` - -# Upgrading to version 7 - -:::note Breaking changes -With this major number update to support the `delphi` Tezos protocol, we have also implemented some breaking changes to the Taquito API. The following sections explains how to update your projects. -::: - -The following sections explain each breaking change, including: - -- the reasons that motivated it, -- code examples that demonstrate how to update your code (how it was in prior versions versus how it needs to be using v7), and -- potential errors you might get when updating to v7 without making the fixes. - -## Removed the default RPC Node URL - -Before version 7, Taquito shipped with a default RPC node URL. We have removed the default URL, forcing developers to specify the RPC node they wish to use. See [RPC Nodes](rpc_nodes.md) for a list of public and private nodes options. - -The previous default was set in the constructor of the `RpcClient` class. We took this approach so that users can get started quickly, and Taquito should "just work" with minimal fiddling. Users could import a ready-to-use Tezos singleton, an instance of the `TezosToolkit` class using the default RPC URL. - -However, in version 7 of Taquito, we decided to remove the default RPC node URL. The reason behind this choice is to encourage developers to make their own informed choice on which Tezos RPC node (public or private) is best for them. This change also helps avoid dApps using Taquito from centralizing on one public RPC node. Decentralization is an essential part of Tezos, including the node infrastructure level. - -This change impacts the following classes, where it is now required to specify an RPC node in their constructor: - -- `RpcClient` -- `Context` -- `TezosToolkit` - -When creating an instance of the `TezosToolkit`, one must specify the RPC node. It can be a `string` or a [`RpcClient`](rpc_package.md) object. A list of community-run nodes can be accessed [here](rpc_nodes.md#list-of-community-run-nodes). **The `Tezos` singleton, a ready-to-use instance of the `TezosToolkit` class, is no longer supported.** - -### Change required in your code: - -**Before version 7:** - -```js -import { TezosToolkit } from '@taquito/taquito'; -const tezos = new TezosToolkit(); -// or -import { Tezos } from '@taquito/taquito'; -// ready-to-use Tezos singleton -``` - -**Since version 7:** - -```js -import { TezosToolkit } from '@taquito/taquito'; -const tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL_NOW_REQUIRED'); -// or -// Those who were using the Tezos singleton may consider naming the variable like the singleton to avoid renaming it everywhere in their code: -const Tezos = new TezosToolkit('https://YOUR_PREFERRED_RPC_URL_NOW_REQUIRED'); -``` - -### Example Errors if you were using the Tezos singleton - -Here is an example of the compilation error you would get when updating Taquito to version 7, if you do not replace the Tezos singleton with an instance of the TezosToolkit: - -`Module '"../../node_modules/@taquito/taquito/dist/types/taquito"' has no exported member 'Tezos'.` - -### Example Errors when the URL is not set: - -Here are examples of the compilation error you would get when updating Taquito to version 7, if the RPC URL is not specified: - -`An argument for '_rpc' was not provided. Expected 1-2 arguments, but got 0.` - -`Type '(rpcClient: string | RpcClient) => TezosToolkit' is missing the following properties from type 'TezosToolkit': _rpc, _context, _stream, _options, and 20 more.` - -## Changed the name of the contracts default entrypoint - -Version 7 of Taquito introduces a breaking change for implementations that use the `main` method for calling the default entrypoint of a contract. - -Before version 7, there was a synthetic method called `main` in Taquito to interact with the default entrypoint. The `main` name was confusing because it referred to the [default](http://tezos.gitlab.io/whitedoc/michelson.html#the-default-entrypoint) entrypoint in Michelson. - -In version 7, this synthetic entrypoint name has been renamed from `main` to `default.` - -### Changes required in your code: - -This change applies to you if you use the default `main` entrypoint in your code when calling a Tezos smart contract. - -For example, the contract [KT1Jsf33Eh4Mt9zvx1xqW2JQpZGyo4fjW7y9](https://better-call.dev/delphinet/KT1Jsf33Eh4Mt9zvx1xqW2JQpZGyo4fjW7y9/operations) (deployed on Delphinet) has a single entrypoint (default). - -**Before version 7:** - -```js -const contract = await tezos.contract.at('KT1Jsf33Eh4Mt9zvx1xqW2JQpZGyo4fjW7y9'); -const opMethod = await contract.methods.main('2').send(); -``` - -**Since version 7:** - -```js -const contract = await tezos.contract.at('KT1Jsf33Eh4Mt9zvx1xqW2JQpZGyo4fjW7y9'); -const opMethod = await contract.methods.default('2').send(); -``` - -### Error when not replacing main with default: - -If you update to version 7 without replacing main with default in your code, you might get the following error at runtime: -`contract.methods.main is not a function` - -## Removed the `importKey` method from TezosToolkit class - -This method was marked as deprecated in March 2020 and recommended to use the signer provider: `@taquito/signer importKey`. -The purpose of this change was to remove the `@taquito/signer` dependency from `@taquito/taquito` because it increased the bundle size by ~1.1mb while not being necessary for most browser-based use-cases. - -### Change required in your code: - -**Before version 7:** - -```js -import { TezosToolkit } from '@taquito/taquito'; - -const tezos = new TezosToolkit('your_rpc_node'); -tezos.importKey(email, password, mnemonic, secret); -``` - -**Since version 7:** - -```js -import { TezosToolkit } from '@taquito/taquito'; -import { importKey } from '@taquito/signer'; - -const tezos = new TezosToolkit('your_rpc_node'); -importKey(tezos, email, password, mnemonic, secret); -``` - -### Error when the `importKey` function is not replaced - -If you update to version 7 without replacing the `importKey` method in your code, you might get the following compilation error: -`Property 'importKey' does not exist on type 'TezosToolkit'.` - -or this error at runtime: -`importKey is not a function`. - -## Fetching `constants` from the RPC - -Taquito now uses a type union that is composed of specific types for each protocol's economic constants. - -Each protocol can add, change or remove constants. Before v7, Taquito used a single type with optional parameters. We now implement specific types for each protocol's constants for the correctness and avoid bloat over time. - -The `ConstantsResponse` interface in the Taquito RPC package is used when querying the RPC for constants with the `getConstants` method of the `RpcClient` class. Changes made to the interface `ConstantsResponse` are in the table below. Note that not all of them are breaking changes; some new or missing properties are added. - -| Property | Type | Proto | Details | -| ---------------------------------- | ------------------------ | ------- | ----------------------------------------------------------------------- | -| max_anon_ops_per_block? | number | 7 | New in Delphinet, optional in Taquito because not in previous protocols | -| **max_revelations_per_block?** | number | 1 to 6 | **Changed to optional because not in proto 7** | -| **block_reward?** | BigNumber | 1 to 5 | **Changed to optional because not in proto 6 and 7** | -| **initial_endorsers?** | number | 5 to 7 | **type correction, string[ ] changed to number** | -| **delay_per_missing_endorsement?** | BigNumber | 5 to 7 | **type correction, number changed to BigNumber** | -| **endorsement_reward** | BigNumber or BigNumber[] | 1 to 7 | **Added BigNumber[ ] for proto 6 and 7, BigNumber before** | -| baking_reward_per_endorsement? | BigNumber[] | 6 and 7 | Was missing in Taquito | -| test_chain_duration? | BigNumber | 4 to 7 | Was missing in Taquito | -| origination_size? | number | 3 to 7 | Was missing in Taquito | -| **origination_burn?** | string | 1 and 2 | **Changed to optional because only in proto 1 and 2** | -| max_proposals_per_delegate? | number | 3 to 7 | Was missing in Taquito | - -### Example of breaking change: - -The constant `max_revelations_per_block` is part of protocols 1 to 6, but not 7. Thus, we have changed it to an optional property in Taquito. Projects which use `max_revelations_per_block` property in their code need to add a check to ensure that the property is defined. - -**Before version 7:** - -```js -const client = new RpcClient('your_rpc'); -const response = await client.getConstants(); - -const maxRevPerBlock = response.max_revelations_per_block; -``` - -**Since version 7:** - -```js -const client = new RpcClient('your_rpc'); -const response = await client.getConstants(); - -if (response.max_revelations_per_block) { - const maxRevelatioknsPerBlock = response.max_revelations_per_block; -} -``` - -## DerivationType renamed in the LedgerSigner - -:::info Early Adopters of the Taquito Ledger Signer -Ledger support was pre-released in September. Taquito never officially released this package until v7, but some teams adopted the pre-release package early, and this section is relevant only to those early adopters. -::: - -This breaking change can impact the users of the pre-released `ledger-signer` package. - -We have renamed the enum `DerivationType` members to use the curve name. Now `tz1`, `tz2`, and `tz3` become `ED25519`, `SECP256K1`, and `P256`. This enum is used in the optional `derivationType` parameter of the constructor of the `LedgerSigner` class. - -There is another derivation type (`BIPS32_ED25519`), which also uses the tz1 prefix. It is used by the `tezos-client` CLI when paired with a ledger device but is not implemented so far in the `ledger-signer` package. The derivation types being named `tz1`, `tz2`, and `tz3` were potentially an area of confusion in the future, whereas different derivation types use the same signature scheme. - -### Change required in your code: - -No change is required if you are using the default `derivationType` parameter. - -**In early version 7 pre-released:** - -```js -const ledgerSigner = new LedgerSigner(transport, "44'/1729'/0'/0'", true, DerivationType.tz2); -``` - -**Since version 7:** - -```js -const ledgerSigner = new LedgerSigner(transport, "44'/1729'/0'/0'", true, DerivationType.SECP256K1); -``` diff --git a/website/versioned_docs/version-17.0.0/ballot.md b/website/versioned_docs/version-17.5.0/ballot.md similarity index 100% rename from website/versioned_docs/version-17.0.0/ballot.md rename to website/versioned_docs/version-17.5.0/ballot.md diff --git a/website/versioned_docs/version-17.0.0/batch-api.md b/website/versioned_docs/version-17.5.0/batch-api.md similarity index 95% rename from website/versioned_docs/version-17.0.0/batch-api.md rename to website/versioned_docs/version-17.5.0/batch-api.md index e031e70a02..8e8162624c 100644 --- a/website/versioned_docs/version-17.0.0/batch-api.md +++ b/website/versioned_docs/version-17.5.0/batch-api.md @@ -31,7 +31,6 @@ await op2.confirmation(); */ ``` -Tracking the confirmation of transactions and the update of the transaction counter can be very frustrating and cumbersome, this is why Taquito provides the Batch API. The Batch API allows you to group all your transactions together and emit them at once under the same transaction counter value and the same transaction hash. ## How does it work? diff --git a/website/versioned_docs/version-17.0.0/beaconwallet-singleton.md b/website/versioned_docs/version-17.5.0/beaconwallet-singleton.md similarity index 100% rename from website/versioned_docs/version-17.0.0/beaconwallet-singleton.md rename to website/versioned_docs/version-17.5.0/beaconwallet-singleton.md diff --git a/website/versioned_docs/version-17.0.0/cancel_http_requests.md b/website/versioned_docs/version-17.5.0/cancel_http_requests.md similarity index 74% rename from website/versioned_docs/version-17.0.0/cancel_http_requests.md rename to website/versioned_docs/version-17.5.0/cancel_http_requests.md index 93856b1f02..78b9187bf0 100644 --- a/website/versioned_docs/version-17.0.0/cancel_http_requests.md +++ b/website/versioned_docs/version-17.5.0/cancel_http_requests.md @@ -3,6 +3,10 @@ title: Cancel HTTP requests author: Roxane Letourneau --- +:::warning +This document was recently modified to reflect the switch from Axios to Fetch +::: + Having Taquito implemented in composable modules is a design choice to allow users to customize the modules to meet some of their specific needs. One of these needs might be the ability to **cancel** HTTP requests to optimize the network. Indeed, Taquito has heavy methods that make a lot of requests to the RPC. For example, in some cases, users might want to cancel almost immediately a call when using it in user interfaces. It is possible to incorporate some logic into the `HttpBackend` and `RpcClient` classes to fulfill this need. @@ -11,7 +15,11 @@ Here is one example to override `HttpBackend` and/or `RpcClient`: #### **Create a custom** `HttpBackend` -Create a class called `CancellableHttpBackend` which extends the `HttpBackend` class. Override the `createRequest` method to utilize an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to handle and capture abort signals. We also use [Axios](https://github.com/axios/axios) to send HTTP requests. For more information on cancelling Axios requests, refer to [this documentation](https://github.com/axios/axios#cancellation) +Create a class called `CancellableHttpBackend` which extends the `HttpBackend` class. Override the `createRequest` method to utilize an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) to handle and capture abort signals. + +:::warning +We currently use the `AbortController` to timeout requests in the `HttpBackend` class. Plase note that this example will override the timeout functionality. If you want to keep the timeout functionality, you can add a custom timeout to call the cancelRequest method after a certain amount of time. +::: ``` ts class CancellableHttpBackend extends HttpBackend { @@ -32,25 +40,36 @@ class CancellableHttpBackend extends HttpBackend { async createRequest( [...] let response; + try { - response = await axios.request({ - url: url + this.serialize(query), - method: method ?? 'GET', - headers: headers, - responseType: resType, + const response = await fetch(urlWithQuery, { + method, + headers, + body: JSON.stringify(data), signal: this.abortController.signal, - transformResponse, - timeout: timeout, - data: data, }); - } catch (err: any) { - throw new HttpResponseError( - `Http error response: (${err.response.status}) ${JSON.stringify(err.response.data)}`, - err.response.status as STATUS_CODE, - err.response.statusText, - JSON.stringify(err.response.data), - url + this.serialize(query) - ) + + if (typeof response === 'undefined') { + throw new Error('Response is undefined'); + } + + // Handle responses with status code >= 400 + if (response.status >= 400) { + const errorData = await response.text(); + throw new HttpResponseError( + ... + ); + } + + if (json) { + return response.json() as T; + } else { + return response.text() as unknown as T; + } + } catch (e: unknown) { + ... + } finally { + clearTimeout(t); } return response.data diff --git a/website/versioned_docs/version-17.5.0/chatbot.md b/website/versioned_docs/version-17.5.0/chatbot.md new file mode 100644 index 0000000000..1a5facbac7 --- /dev/null +++ b/website/versioned_docs/version-17.5.0/chatbot.md @@ -0,0 +1,10 @@ +--- +title: 💬 Support Chatbot +author: Alireza Haghshenas +--- + \ No newline at end of file diff --git a/website/versioned_docs/version-17.0.0/complex_parameters.md b/website/versioned_docs/version-17.5.0/complex_parameters.md similarity index 100% rename from website/versioned_docs/version-17.0.0/complex_parameters.md rename to website/versioned_docs/version-17.5.0/complex_parameters.md diff --git a/website/versioned_docs/version-17.0.0/confirmation_event_stream.md b/website/versioned_docs/version-17.5.0/confirmation_event_stream.md similarity index 100% rename from website/versioned_docs/version-17.0.0/confirmation_event_stream.md rename to website/versioned_docs/version-17.5.0/confirmation_event_stream.md diff --git a/website/versioned_docs/version-17.0.0/consensus_key.md b/website/versioned_docs/version-17.5.0/consensus_key.md similarity index 100% rename from website/versioned_docs/version-17.0.0/consensus_key.md rename to website/versioned_docs/version-17.5.0/consensus_key.md diff --git a/website/versioned_docs/version-17.0.0/contract-test-collection.md b/website/versioned_docs/version-17.5.0/contract-test-collection.md similarity index 100% rename from website/versioned_docs/version-17.0.0/contract-test-collection.md rename to website/versioned_docs/version-17.5.0/contract-test-collection.md diff --git a/website/versioned_docs/version-17.0.0/contract_call_parameters.md b/website/versioned_docs/version-17.5.0/contract_call_parameters.md similarity index 100% rename from website/versioned_docs/version-17.0.0/contract_call_parameters.md rename to website/versioned_docs/version-17.5.0/contract_call_parameters.md diff --git a/website/versioned_docs/version-17.0.0/contracts-library.md b/website/versioned_docs/version-17.5.0/contracts-library.md similarity index 100% rename from website/versioned_docs/version-17.0.0/contracts-library.md rename to website/versioned_docs/version-17.5.0/contracts-library.md diff --git a/website/versioned_docs/version-17.0.0/dapp_prelaunch.md b/website/versioned_docs/version-17.5.0/dapp_prelaunch.md similarity index 100% rename from website/versioned_docs/version-17.0.0/dapp_prelaunch.md rename to website/versioned_docs/version-17.5.0/dapp_prelaunch.md diff --git a/website/versioned_docs/version-17.5.0/dapp_template.md b/website/versioned_docs/version-17.5.0/dapp_template.md new file mode 100644 index 0000000000..c6a6ccefc6 --- /dev/null +++ b/website/versioned_docs/version-17.5.0/dapp_template.md @@ -0,0 +1,10 @@ +--- +title: Dapp Templates +author: Maksym Bykovskyy +--- + +We've provided a few dapp templates as a starter kit for developing front-end application running on the Tezos network. Here are the links to the templates: + +- [React template](https://github.com/ecadlabs/taquito-react-template) +- [Svelte template](https://github.com/ecadlabs/taquito-svelte-template) + diff --git a/website/versioned_docs/version-17.0.0/drain_account.md b/website/versioned_docs/version-17.5.0/drain_account.md similarity index 100% rename from website/versioned_docs/version-17.0.0/drain_account.md rename to website/versioned_docs/version-17.5.0/drain_account.md diff --git a/website/versioned_docs/version-17.0.0/estimate.md b/website/versioned_docs/version-17.5.0/estimate.md similarity index 98% rename from website/versioned_docs/version-17.0.0/estimate.md rename to website/versioned_docs/version-17.5.0/estimate.md index adb12c4c89..75b385e305 100644 --- a/website/versioned_docs/version-17.0.0/estimate.md +++ b/website/versioned_docs/version-17.5.0/estimate.md @@ -1,5 +1,5 @@ --- -title: Estimate Operations +title: Estimate Provider author: Edmond Lee & Roxane Letourneau --- import Tabs from '@theme/Tabs'; @@ -7,7 +7,9 @@ import TabItem from '@theme/TabItem'; Taquito's estimate method can be used to estimate fees, gas, and storage associated with an operation. -## Estimate Values +## The `Estimate` object + +The `Estimate` object has the following properties: [`burnFeeMutez`]: The number of Mutez that will be burned for the storage of the operation. Returns a number. diff --git a/website/versioned_docs/version-17.0.0/events.md b/website/versioned_docs/version-17.5.0/events.md similarity index 100% rename from website/versioned_docs/version-17.0.0/events.md rename to website/versioned_docs/version-17.5.0/events.md diff --git a/website/versioned_docs/version-17.0.0/fa2_parameters.md b/website/versioned_docs/version-17.5.0/fa2_parameters.md similarity index 82% rename from website/versioned_docs/version-17.0.0/fa2_parameters.md rename to website/versioned_docs/version-17.5.0/fa2_parameters.md index ce39f02ca5..a272e85078 100644 --- a/website/versioned_docs/version-17.0.0/fa2_parameters.md +++ b/website/versioned_docs/version-17.5.0/fa2_parameters.md @@ -10,14 +10,14 @@ Based on the [TZIP-12 standard](https://gitlab.com/tezos/tzip/-/blob/master/prop In order to be compliant with the standard, a contract (among other requirements) must implement 3 main entrypoints: - **transfer**: an entrypoint to be called to transfer one or multiple tokens from one address to the other -- **update_operators**: a list of parameters to give or withdraw access to users' tokens from third-parties - **balance_of**: an entrypoint meant to be called on-chain in order to get the balance of a specific account +- **update_operators**: a list of parameters to give or withdraw access to users' tokens from third-parties Because the *transfer* and *update_operators* entrypoints require complex Michelson data, it can sometimes be complicated to find the right formatting for the parameters in JavaScript using Taquito. ## Reminder: calling the entrypoint of an FA2 contract -Once you have the address of the contract you want to update, calling the *transfer* or the *update_operators* entrypoint follows the same steps as with any other contract: +Once you have the address of the contract you want to update, calling the `transfer` or the `update_operators` entrypoint follows the same steps as with any other contract: ```typescript import { TezosToolkit } from "@taquito/taquito"; @@ -30,7 +30,7 @@ await op.confirmation(); ## The transfer entrypoint Here is the type signature for the entrypoint parameter in Michelson: -``` +``` (list %transfer (pair (address %from_) @@ -46,7 +46,7 @@ Here is the type signature for the entrypoint parameter in Michelson: ) ) ``` -This means that the entrypoint takes a list of pairs annotated with *%transfer*. Each pair is made on the left side of the account the tokens must be deducted from and on the right side of a second list of transactions holding the recipient of the transfer, the id of the token in question (in case the contract holds multiple tokens with different ids) and the amount to be deducted. +This means that the entrypoint takes a list of pairs annotated with `%transfer`. Each pair is made on the left side of the account the tokens must be deducted from and on the right side of a second list of transactions holding the recipient of the transfer, the id of the token in question (in case the contract holds multiple tokens with different ids) and the amount to be deducted. > Note: Incidentally, this means that the contract can process multiple transfers at the same time, with one spender sending transfers to multiple recipients for one or different token ids. @@ -99,6 +99,42 @@ You can then add as many transactions as you like to be processed by the contrac > Note: the properties holding the addresses of the spender and the recipient both end with an underscore: **from_** and **to_**. +## The balance_of entrypoint +Here is the type signature for the entrypoint parameter in Michelson: +``` +(pair %balance_of + (list %requests + (pair + (address %owner) + (nat %token_id) + ) + ) + (contract %callback + (list + (pair + (pair %request + (address %owner) + (nat %token_id) + ) + (nat %balance) + ) + ) + ) +) +``` +This means that the entrypoint takes a pair annotated as `%balance_of`. On the left side of `%balance_of` pair takes a list of `%requests` structured as a pair of address as `%owner` and nat as `%token_id`. On the right side of `%balance_of` pair takes a contract annotated as `%callback` which the contract entrypoint type signature will be a list of pairs on the left side of the pair as `%request` that constructs with an address as `%owner` and nat as `%token_id` and on the right side as nat as `%balance` + +```typescript +const balance_params = { + request: [ + { + owner: 'tz1XTyqBn4xi9tkRDutpRyQwHxfF8ar4i4Wq', + token_id: '0' + } + ], + callback: 'KT1B9bXnsuqZkxbk2fBJbuhRRf1VpcFz2VV7' +} +``` ## The update_operators entrypoint Here is the type signature for the entrypoint parameter in Michelson: @@ -123,8 +159,8 @@ Here is the type signature for the entrypoint parameter in Michelson: ) ``` -As mentioned above, Michelson lists are represented as arrays in Taquito. -A union value inside a list is represented as an object with one property: the annotation of the left or right side. The value is then represented as usual in Taquito. In the case of the *update_operators* entrypoint, the value is an object whose properties are the annotations of the right-combed pair: +As mentioned above, Michelson lists are represented as arrays in Taquito. +A union value inside a list is represented as an object with one property: the annotation of the left or right side. The value is then represented as usual in Taquito. In the case of the `update_operators` entrypoint, the value is an object whose properties are the annotations of the right-combed pair: ```typescript const operator_params = [ @@ -172,5 +208,4 @@ await batchOp.confirmation(); ``` In the first contract call (to the token contract), the user authorizes the dapp contract to transfer his tokens on his behalf. -In the second contract call (to the dapp contract), the user calls a hypothetical *mint* entrypoint that sends a transaction under the hood to transfer the user's tokens to the contract account. - +In the second contract call (to the dapp contract), the user calls a hypothetical `mint` entrypoint that sends a transaction under the hood to transfer the user's tokens to the contract account. diff --git a/website/versioned_docs/version-17.5.0/failing_noop.md b/website/versioned_docs/version-17.5.0/failing_noop.md new file mode 100644 index 0000000000..a0619e08de --- /dev/null +++ b/website/versioned_docs/version-17.5.0/failing_noop.md @@ -0,0 +1,63 @@ +--- +title: Failing Noop +id: failing_noop +author: Alireza Haghshenas +--- + +## Introduction + +There are use cases for allowing users to sign arbitrary data. It is important to ensure that data cannot be injected into the blockchain. The failing_noop operation can wrap arbitrary data and is guaranteed to fail. + +### Signing a failing_noop using the contract api + +```typescript +const signed = await Tezos.contract.failingNoop({ + arbitrary: "48656C6C6F20576F726C64", // Hex for: Hello World + basedOnBlock: 'head', // Can also be 0, to be based on the genesis block +}); +``` + +The `params.arbitrary` is a `bytes` string, with the hex representation of the payload to be signed. +The field `basedOnBlock` is a `BlockIdentifier`: + +```typescript +type BlockIdentifier = 'head' | `head~${number}` | `B${string}` | number; +``` + +The payload can be signed on `head`, or a specified number of blocks before `head`, or a block referenced by hash, or a block referenced by level. + +### Signing a failing_noop using the wallet api + +```typescript +const signed = await Tezos.wallet.signFailingNoop({ + arbitrary: "48656C6C6F20576F726C64", // Hex for: Hello World + basedOnBlock: 0, +}); + +``` + +Both APIs should return a signed object of the form: + +```json +{ + "signature": "spsig1QVVCiQ6aN2zmut2wKTg4zWLoP9ia4qUY2hBo21odA7P25gqfieFWJMyntaJWmyrd6v3mgjKF5n4d2wcaB3LxkLmd1MoJQ", + "bytes": "df2788eed43ab680c8a2b79969ce4de93b9768cd2786a85ebdfba90ca7612638110000000b48656c6c6f20576f726c64", + "signedContent": { + "branch": "BMQZWtQjSpyJZBVHbABEmVP9VG8yEZPZ3wNftwZdXt6A33ZYatj", + "contents": [ + { + "kind": "failing_noop", + "arbitrary": "48656C6C6F20576F726C64" + } + ] + } +} +``` + +You can verify the signature: + +```typescript +//import { verifySignature } from "@taquito/utils"; + +verifySignature(signed.bytes, await Tezos.signer.publicKey(), signed.prefixSig, new Uint8Array([3])) +``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.0.0/failwith_errors.md b/website/versioned_docs/version-17.5.0/failwith_errors.md similarity index 100% rename from website/versioned_docs/version-17.0.0/failwith_errors.md rename to website/versioned_docs/version-17.5.0/failwith_errors.md diff --git a/website/versioned_docs/version-17.0.0/forger.md b/website/versioned_docs/version-17.5.0/forger.md similarity index 100% rename from website/versioned_docs/version-17.0.0/forger.md rename to website/versioned_docs/version-17.5.0/forger.md diff --git a/website/versioned_docs/version-17.0.0/global_constant.md b/website/versioned_docs/version-17.5.0/global_constant.md similarity index 100% rename from website/versioned_docs/version-17.0.0/global_constant.md rename to website/versioned_docs/version-17.5.0/global_constant.md diff --git a/website/versioned_docs/version-17.0.0/images/Tzip16ExecuteView.png b/website/versioned_docs/version-17.5.0/images/Tzip16ExecuteView.png similarity index 100% rename from website/versioned_docs/version-17.0.0/images/Tzip16ExecuteView.png rename to website/versioned_docs/version-17.5.0/images/Tzip16ExecuteView.png diff --git a/website/versioned_docs/version-17.0.0/images/diagramTzip16Metadata.png b/website/versioned_docs/version-17.5.0/images/diagramTzip16Metadata.png similarity index 100% rename from website/versioned_docs/version-17.0.0/images/diagramTzip16Metadata.png rename to website/versioned_docs/version-17.5.0/images/diagramTzip16Metadata.png diff --git a/website/versioned_docs/version-17.0.0/images/github.png b/website/versioned_docs/version-17.5.0/images/github.png similarity index 100% rename from website/versioned_docs/version-17.0.0/images/github.png rename to website/versioned_docs/version-17.5.0/images/github.png diff --git a/website/versioned_docs/version-17.0.0/images/gitlab.png b/website/versioned_docs/version-17.5.0/images/gitlab.png similarity index 100% rename from website/versioned_docs/version-17.0.0/images/gitlab.png rename to website/versioned_docs/version-17.5.0/images/gitlab.png diff --git a/website/versioned_docs/version-17.0.0/increase_paid_storage.md b/website/versioned_docs/version-17.5.0/increase_paid_storage.md similarity index 100% rename from website/versioned_docs/version-17.0.0/increase_paid_storage.md rename to website/versioned_docs/version-17.5.0/increase_paid_storage.md diff --git a/website/versioned_docs/version-17.0.0/inmemory_signer.md b/website/versioned_docs/version-17.5.0/inmemory_signer.md similarity index 100% rename from website/versioned_docs/version-17.0.0/inmemory_signer.md rename to website/versioned_docs/version-17.5.0/inmemory_signer.md diff --git a/website/versioned_docs/version-17.0.0/lambda_view.md b/website/versioned_docs/version-17.5.0/lambda_view.md similarity index 100% rename from website/versioned_docs/version-17.0.0/lambda_view.md rename to website/versioned_docs/version-17.5.0/lambda_view.md diff --git a/website/versioned_docs/version-17.0.0/ledger_integration_test.md b/website/versioned_docs/version-17.5.0/ledger_integration_test.md similarity index 95% rename from website/versioned_docs/version-17.0.0/ledger_integration_test.md rename to website/versioned_docs/version-17.5.0/ledger_integration_test.md index 00b72a59df..fb84b95a54 100644 --- a/website/versioned_docs/version-17.0.0/ledger_integration_test.md +++ b/website/versioned_docs/version-17.5.0/ledger_integration_test.md @@ -1,5 +1,5 @@ --- -title: Ledger +title: Ledger tests author: Roxane Letourneau --- diff --git a/website/versioned_docs/version-17.0.0/ledger_signer.md b/website/versioned_docs/version-17.5.0/ledger_signer.md similarity index 100% rename from website/versioned_docs/version-17.0.0/ledger_signer.md rename to website/versioned_docs/version-17.5.0/ledger_signer.md diff --git a/website/versioned_docs/version-17.0.0/liquidity_baking.md b/website/versioned_docs/version-17.5.0/liquidity_baking.md similarity index 100% rename from website/versioned_docs/version-17.0.0/liquidity_baking.md rename to website/versioned_docs/version-17.5.0/liquidity_baking.md diff --git a/website/versioned_docs/version-17.0.0/making_transfers.md b/website/versioned_docs/version-17.5.0/making_transfers.md similarity index 99% rename from website/versioned_docs/version-17.0.0/making_transfers.md rename to website/versioned_docs/version-17.5.0/making_transfers.md index 1ea6de0dc9..fdfbcf071e 100644 --- a/website/versioned_docs/version-17.0.0/making_transfers.md +++ b/website/versioned_docs/version-17.5.0/making_transfers.md @@ -1,5 +1,5 @@ --- -title: Transfers +title: Transfers (Transaction) author: Simon Boissonneault-Robert --- diff --git a/website/versioned_docs/version-17.0.0/manager_lambda.md b/website/versioned_docs/version-17.5.0/manager_lambda.md similarity index 100% rename from website/versioned_docs/version-17.0.0/manager_lambda.md rename to website/versioned_docs/version-17.5.0/manager_lambda.md diff --git a/website/versioned_docs/version-17.0.0/maps_bigmaps.md b/website/versioned_docs/version-17.5.0/maps_bigmaps.md similarity index 100% rename from website/versioned_docs/version-17.0.0/maps_bigmaps.md rename to website/versioned_docs/version-17.5.0/maps_bigmaps.md diff --git a/website/versioned_docs/version-17.0.0/metadata-tzip16.md b/website/versioned_docs/version-17.5.0/metadata-tzip16.md similarity index 100% rename from website/versioned_docs/version-17.0.0/metadata-tzip16.md rename to website/versioned_docs/version-17.5.0/metadata-tzip16.md diff --git a/website/versioned_docs/version-17.0.0/michelson_encoder.md b/website/versioned_docs/version-17.5.0/michelson_encoder.md similarity index 75% rename from website/versioned_docs/version-17.0.0/michelson_encoder.md rename to website/versioned_docs/version-17.5.0/michelson_encoder.md index ece4f4419b..bf64c5d3c3 100644 --- a/website/versioned_docs/version-17.0.0/michelson_encoder.md +++ b/website/versioned_docs/version-17.5.0/michelson_encoder.md @@ -3,7 +3,7 @@ title: Michelson Encoder author: Roxane Letourneau --- -The purpose of the `Michelson-Encoder` package is to create an abstraction over the Michelson Language. It allows converting Michelson data into javascript-looking objects which are easier to use and reason about. +The purpose of the `Michelson-Encoder` package is to create an abstraction over the Michelson Language. It allows converting Michelson data into javascript-looking objects which are easier to use and reason about. 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. @@ -20,7 +20,8 @@ A specific token class in the package represents each different Michelson type ( - `Execute`: To convert Michelson data into familiar-looking javascript data - `Encode`: To convert javascript array data to JSON Michelson - `EncodeObject`: To convert javascript object data to JSON Michelson -- `ExtractSchema`: To show how the data should be structured in the javascript format +- `GenerateSchema`: To show how the data should be structured in the javascript object format +- `ExtractSchema`: [deprecated] To show how the data should be structured in the javascript array format We can reason about Michelson types and data as tree structures. Thus, the methods of the `Token` class use recursion to iterate over a Michelson parameter and create a specific token for each Michelson type encountered (i.e., each node and leaf of the tree). @@ -32,7 +33,7 @@ In this section, we will use the schema class to represent the storage of a smar ### Create a Schema instance -We can create an instance of `Schema` representing a contract's storage using the constructor and passing the storage type in Michelson JSON format or using the `fromRPCResponse` method. This second way allows creating the `Schema` instance with the script of the contract obtained from the `getScript` method of the `RpcClient` class. +We can create an instance of `Schema` representing a contract's storage using the constructor and passing the storage type in Michelson JSON format or using the `fromRPCResponse` method. This second way allows creating the `Schema` instance with the script of the contract obtained from the `getScript` method of the `RpcClient` class. Here are examples: @@ -52,21 +53,19 @@ const storageType = { }; const storageSchema = new Schema(storageType); ``` - -or - +--- +or ```js const script = await Tezos.rpc.getScript('KT1MTFjUeqBeZoFeW1NLSrzJdcS5apFiUXoB'); const storageSchema = Schema.fromRPCResponse({ script }); ``` +### The GenerateSchema method -### The ExtractSchema method - -We can use this method to obtain indications on how to write the storage when deploying a contract. +We can use this method to obtain indications on how to write the storage when deploying a contract. Here is an example with a contract storage having annotations and a `pair` at its root. The `ExtractSchema` method returns an object where the keys are the annotations, and the values show the corresponding type. -```js live noInline +```js live noInline const storageType = { prim: 'pair', args: [ @@ -81,13 +80,12 @@ const storageType = { ] }; const storageSchema = new Schema(storageType); -const extractSchema = storageSchema.ExtractSchema(); +const extractSchema = storageSchema.generateSchema(); println(JSON.stringify(extractSchema, null, 2)); ``` - +--- When there is no annotation, the keys of the object are indexes starting from 0. - -```js live noInline +```js live noInline const storageType = { prim: 'pair', args: [ @@ -102,14 +100,13 @@ const storageType = { ] }; const storageSchema = new Schema(storageType); -const extractSchema = storageSchema.ExtractSchema(); +const extractSchema = storageSchema.generateSchema(); println(JSON.stringify(extractSchema, null, 2)); ``` - +--- Here is another example using a complex storage: - -```js live noInline -const storageType = +```js live noInline +const storageType = { prim: 'pair', args: [ @@ -244,7 +241,7 @@ const storageType = ] }; const storageSchema = new Schema(storageType); -const extractSchema = storageSchema.ExtractSchema(); +const extractSchema = storageSchema.generateSchema(); println(JSON.stringify(extractSchema, null, 2)); ``` @@ -252,7 +249,7 @@ println(JSON.stringify(extractSchema, null, 2)); We can use the `Typecheck` method to validate the storage object. The method takes the storage object as a parameter and returns `true` if the storage object is compliant with the schema type or `false`. Validation of the properties is done. For example, the key used in the following code snippet is invalid, so the returned value of the `Typecheck` method is false. -```js live noInline +```js live noInline const storageType = { prim: 'pair', args: [ @@ -280,7 +277,7 @@ println(typecheck); We use the `Encode` method to transform data from a javascript object to Michelson data. Here is an example: -```js live noInline +```js live noInline const storageType = { prim: 'pair', args: [ @@ -308,7 +305,7 @@ println(JSON.stringify(michelsonData, null, 2)); We use the `Execute` method to transform data from Michelson to a javascript object. Here is an example: -```js live noInline +```js live noInline const storageType = { prim: 'pair', args: [ @@ -353,11 +350,11 @@ println(JSON.stringify(data, null, 2)); The `Execute` method takes an optional parameter of type `Semantic`. It allows overriding the default representation returned by the Michelson Encoder for specific types. -Here is an example for the `big_map` type: -If we have a contract having a big map in its storage, when we fetch the contract's storage with the RPC, the returned value looks like the following `{ int: big_map_id }`. -In the Taquito main package, the `getStorage` method of the `ContractProvider` class uses the semantic parameter to override the representation of big map in the storage. When we fetch the storage of a contract using `Tezos.contract.getStorage('contractAddress')`, an instance of the `BigMapAbstraction` class is returned for the big map instead of its id. +Here is an example for the `big_map` type: +If we have a contract having a big map in its storage, when we fetch the contract's storage with the RPC, the returned value looks like the following `{ int: big_map_id }`. +In the Taquito main package, the `getStorage` method of the `ContractProvider` class uses the semantic parameter to override the representation of big map in the storage. When we fetch the storage of a contract using `Tezos.contract.getStorage('contractAddress')`, an instance of the `BigMapAbstraction` class is returned for the big map instead of its id. -```js live noInline +```js live noInline const schema = new Schema({ prim: 'big_map', args: [{ prim: 'address' }, { prim: 'int' }] }); const dataMichelson = { int: 123456 } @@ -367,12 +364,12 @@ println(`Default value returned by the Michelson Encoder for big_map: ${JSON.str // instead of returning the big map id, we can override it // we return an object in this case const dataCustom = schema.Execute(dataMichelson, { big_map: (val) => Object({ id: val.int })}) -println(`Customised representation of the big_map value: ${JSON.stringify(dataCustom)}`); +println(`Customized representation of the big_map value: ${JSON.stringify(dataCustom)}`); ``` +--- +Here is an example for the `ticket` type: -Here is an example for the `ticket` type: - -```js live noInline +```js live noInline const schema = new Schema({"prim":"ticket","args":[{"prim":"string"}]}); const dataMichelson = {"prim":"Pair","args":[{"string":"KT1PVuv7af4VkPsZVZ8oZz9GSSdGnGBCbFWw"},{"string":"test"},{"int":"2"}]} @@ -380,7 +377,7 @@ const data = schema.Execute(dataMichelson) println(`Default representation of the ticket value returned by the Michelson Encoder: ${JSON.stringify(data, null, 2)}`); const dataCustom = schema.Execute(dataMichelson, { ticket: (val) => val.args[1].string}) -println(`Customised representation of the ticket value: ${JSON.stringify(dataCustom)}`); +println(`Customized representation of the ticket value: ${JSON.stringify(dataCustom)}`); ``` ### How the Schema class is used inside Taquito @@ -397,11 +394,11 @@ The `Schema` class is internally used in Taquito: ## The ParameterSchema class -The `ParameterSchema` class is used to represent the smart contract methods. This class is similar to the `Schema` class except that the `Encode` method expects flattened parameters instead of a javascript object. +The `ParameterSchema` class is used to represent the smart contract methods. This class is similar to the `Schema` class except that the `Encode` method expects flattened parameters instead of a javascript object where `encodeObject` method expects javascript object. -Here is an example: +Here is an example of `encode`: -```js live noInline +```js live noInline const parameterSchema = new ParameterSchema({"prim":"pair","args":[{"prim":"address","annots":[":spender"]},{"prim":"nat","annots":[":value"]}],"annots":["%approve"]}); const michelsonData = parameterSchema.Encode( 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', @@ -409,9 +406,130 @@ const michelsonData = parameterSchema.Encode( ) println(JSON.stringify(michelsonData, null, 2)); ``` +--- +Here is an example of `encodeObject`: +```js live noInline +const parameterSchema = new ParameterSchema({"prim":"pair","args":[{"prim":"address","annots":[":spender"]},{"prim":"nat","annots":[":value"]}],"annots":["%approve"]}); +const michelsonData = parameterSchema.EncodeObject({ + spender: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', + value: '12' +}) +println(JSON.stringify(michelsonData, null, 2)); +``` ### How the ParameterSchema class is used inside Taquito The `ParameterSchema` class is internally used in Taquito: - When we call a method, or a view of a contract using the `ContractAbstraction` class, the `Encode` method is used to transform the parameters into Michelson data. - In the `tzip16` package, when we execute a Michelson view, the `Encode` method is used to transform the parameters into Michelson data. + +## Flattening nested tokens (pair/union) + +In the Michelson language, we can have nested `pair`s or unions (`or`). For example, the following Michelson type is a nested `pair`: + +```js live noInline +const storageSchema = new Schema({ + prim: 'pair', + args: [ + { prim: 'nat', annots: [ '%stored_counter' ] }, + { + prim: 'pair', + args: [ + { prim: 'nat', annots: [ '%threshold' ] }, + { prim: 'list', args: [ { prim: 'key' } ], annots: [ '%keys' ] } + ] + } + ] +}); +const annotatedSchema = storageSchema.ExtractSchema(); +println(JSON.stringify(annotatedSchema, null, 2)); +``` +--- +We can also have a similar definition without the annotations: +```js live noInline +const storageSchema = new Schema({ + prim: 'pair', + args: [ + { prim: 'nat' }, + { + prim: 'pair', + args: [ + { prim: 'nat' }, + { prim: 'list', args: [ { prim: 'key' } ] } + ] + } + ] +}); +const noAnnotationsSchema = storageSchema.ExtractSchema(); +println(JSON.stringify(noAnnotationsSchema, null, 2)); +``` + +In Taquito, we will flatten these nested `pair`s to make it easier to use them in typescript dApps. Please note how the result of `generateSchema` is different in the annotated vs non-annotated cases: + +```js +//annotatedSchema: +{ + "stored_counter": "nat", + "threshold": "nat", + "keys": { + "list": "key" + } +} + +//noAnnotationsSchema: +{ + "0": "nat", + "1": "nat", + "2": { + "list": "key" + } +} +``` + +Here, Taquito developers have made two decisions: +1. The elements of the nested `pair`s are flattened into a single object. +2. The keys of the object are: + 1. the annotations, if they exist + 1. the index of the element otherwise. + +Formally speaking, the fields are the leaves of the three, ordered by traversing the tree (because we omit inner nodes of the tree, there is no difference between pre-order, in-order, or post-order traversal). +Also, in case you have a mixture of annotated and non-annotated fields, the fields numbers will keep increasing, even though annotated fields are named. + +```js live noInline +const storageSchema = new Schema({ + prim: 'pair', + args: [ + { prim: 'nat' }, + { + prim: 'pair', + args: [ + { prim: 'nat', annots: [ '%threshold' ] }, + { prim: 'list', args: [ { prim: 'key' } ] } + ] + } + ] +}); +const mixedSchema = storageSchema.ExtractSchema(); +println(JSON.stringify(mixedSchema, null, 2)); +``` + +### Unions +For unions (`or`), we flatten them similarly, so instead of having `left` and `right` to refer to fields, you use the field number or annotation. + +```js live noInline +const storageSchema = new Schema({ + prim: 'or', + args: [ + { prim: 'nat' }, + { + prim: 'or', + args: [ + { prim: 'nat', annots: [ '%threshold' ] }, + { prim: 'list', args: [ { prim: 'key' } ] } + ] + } + ] +}); +const mixedSchema = storageSchema.ExtractSchema(); +println(JSON.stringify(mixedSchema, null, 2)); +``` diff --git a/website/versioned_docs/version-17.0.0/michelsonmap.md b/website/versioned_docs/version-17.5.0/michelsonmap.md similarity index 100% rename from website/versioned_docs/version-17.0.0/michelsonmap.md rename to website/versioned_docs/version-17.5.0/michelsonmap.md diff --git a/website/versioned_docs/version-17.0.0/mobile_bundle.md b/website/versioned_docs/version-17.5.0/mobile_bundle.md similarity index 100% rename from website/versioned_docs/version-17.0.0/mobile_bundle.md rename to website/versioned_docs/version-17.5.0/mobile_bundle.md diff --git a/website/versioned_docs/version-17.0.0/multisig_doc.md b/website/versioned_docs/version-17.5.0/multisig_doc.md similarity index 100% rename from website/versioned_docs/version-17.0.0/multisig_doc.md rename to website/versioned_docs/version-17.5.0/multisig_doc.md diff --git a/website/versioned_docs/version-17.0.0/on_chain_views.md b/website/versioned_docs/version-17.5.0/on_chain_views.md similarity index 100% rename from website/versioned_docs/version-17.0.0/on_chain_views.md rename to website/versioned_docs/version-17.5.0/on_chain_views.md diff --git a/website/versioned_docs/version-17.5.0/operation_flow.md b/website/versioned_docs/version-17.5.0/operation_flow.md new file mode 100644 index 0000000000..f691deebf8 --- /dev/null +++ b/website/versioned_docs/version-17.5.0/operation_flow.md @@ -0,0 +1,146 @@ +--- +title: Operation Flow +id: operation_flow +author: Michael Kernaghan +--- + +# Taquito Operation Flow +Taquito makes injecting operations into the Tezos blockchain very simple. This can be accomplished by utilizing the Contract API, Wallet API, or the Batch API. + +## Contract API + +### What is the Contract API? +Taquito Contract API provides a simple way to interact with the Tezos blockchain. It provides methods and abstractions to prepare, forge, sign, and send operations to the Tezos blockchain, as well as interact with smart contracts. + +### Installing the Contract API +The Contract API is part of the `@taquito/taquito` package. To install it, run the following command: + +``` +npm install @taquito/taquito + +``` + +### Using the Contract API +The Contract API is exposed through the `contract` property of the `TezosToolkit` object. The `contract` property exposes methods that allow you to interact with smart contracts. + +Below is a quick example of how to use the `transaction` operation via the Contract API. + +```js +import { TezosToolkit } from '@taquito/taquito'; + +const Tezos = new TezosToolkit('RPC address here'); +const op = await Tezos.contract.transfer({ to: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', amount: 100 }); +await op.confirmation(); +``` + +## Wallet API +Aside from the Contract API, Taquito provides the ability for our users to interact with the Tezos blockchain via the Wallet API. The Wallet API is functionally similar to the Contract API, but it delegates several actions to the wallet (i.e. signing operations). + +### Installing the Wallet API +The Wallet API is part of the `@taquito/taquito` package, so the installation method is the exact same as the Contract API in the section above. + +Once you have installed the `@taquito/taquito` package into your project, however, you will need to install additional packages to use the Wallet API. + +We work closely with the Beacon team to provide a seamless integration with the Beacon wallet. To install the Beacon wallet, run the following command: + +``` +npm install @taquito/beacon-wallet + +``` + +Alternatively, you could also make use of the Temple wallet. To install the Temple wallet, run the following command in your project: + +``` +npm install @temple-wallet/dapp + +``` + +Keep in mind that some wallets may require additional configuration in order to work properly. For example, Temple wallets are accessible via a browser extension. + +### Using the Wallet API + +The Wallet API has a few nuances and can get pretty involved to get started and running. So we've provided a separate document with a more in-depth explanation of the Wallet API. You can find that document [here](./wallet_API.md). + + +## Batch API + +There might come a time where you would want to inject multiple operations at the same time. For example, you would like to transfer funds to multiple accounts at the same time. + +You might think to do something like this: +```typescript +/* + * ONE OF THESE TRANSACTIONS WILL FAIL + * AND YOU WILL GET AN ERROR MESSAGE + */ +const op1 = await contract.methods.interact('tezos').send(); +const op2 = await contract.methods.wait([['unit']]).send(); + +await op1.confirmation(); +await op2.confirmation(); + + +/* + * Error Message returned by the node (since Kathmandu): + * Error while applying operation opHash: + * Only one manager operation per manager per block allowed (found opHash2 with Xtez fee). + * + * Error Message that was returned by the node (before Kathmandu): + * "Error while applying operation opWH2nEcmmzUwK4T6agHg3bn9GDR7fW1ynqWL58AVRAb7aZFciD: + * branch refused (Error: + * Counter 1122148 already used for contract tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb (expected 1122149))" + */ +``` + +Doing something like this will result in an error message. This is because each Tezos account holds a counter that increments every time an operation is included in a block on the network. This feature prevents users from sending two or multiple transactions in a row. + + +Tracking the confirmation of transactions and the update of the transaction counter can be very frustrating and cumbersome, this is why Taquito provides the Batch API. The Batch API allows you to group all your transactions together and emit them at once under the same transaction counter value and the same transaction hash. + + +### Using the Batch API +For a more in-depth explanation of the Batch API, please refer to [this document](./batch-api.md). We provide examples and use cases that you can adopt into your own projects. + +## Customizing the Operation Flow +As developers, there might come a time when you would need to customize the flow of operations to suit your needs. For example, you would like to customize one of the steps in the flow, or you'd like to have just the prepared object and forge them independently. + +We provide a level of independence and customizability if you choose to do so, without using the Contract/Wallet API, the flow of operations would look something like this: + +### Preparing a Transaction Operation +```typescript +import { TezosToolkit } from '@taquito/taquito' +const Tezos = new TezosToolkit(RPC_URL); + +// The PrepareProvider returns a 'PreparedOperation' type object +const prepared = await Tezos.prepare.transaction({ + source: SOURCE_PKH, + to: DESTINATION_PKH, + amount: 5, + fee: +}); + +// The PreparedOperation type object needs to be converted into a forgeable type (ForgeParams) +const forgeable = await Tezos.prepare.toForge(prepared); +``` + +### Forging the Transaction Operation +```typescript +// Import the LocalForger +import { LocalForger } from '@taquito/local-forging'; + + +const forger = new LocalForger(); +const forgedBytes = await forger.forge(forgeable); +``` + +### Signing the Operation +After the transaction operation has been forged, it can be signed as such: +```typescript +const signed = await Tezos.signer.sign(forgedBytes, new Uint8Array([3])) +``` + +### Injecting the Operation +Finally after signing, you can inject your operation to the blockchain. + +```typescript +const op = await Tezos.rpc.injectOperation(signed.sbytes); +``` \ No newline at end of file diff --git a/website/versioned_docs/version-17.5.0/ophash_before_injecting.md b/website/versioned_docs/version-17.5.0/ophash_before_injecting.md new file mode 100644 index 0000000000..6b562bb0ac --- /dev/null +++ b/website/versioned_docs/version-17.5.0/ophash_before_injecting.md @@ -0,0 +1,49 @@ +--- +title: Getting the Operation Hash without Injecting +id: ophash_before_injecting +author: Davis Sawali +--- + +This section serves as a guide to get the operation hash without injecting it into the blockchain. + +## Getting the Operation Hash + +There might come a time when you, the developer, would like to grab the operation hash without injecting it into the blockchain. + +To accomplish that, we have a utility function called `encodeOpHash()` in the `@taquito/utils` package. This function takes in the signed operation bytes in the form of a `string`, and outputs the operation hash of said transaction without injecting it. + +### Usage example + +Here is a simple example on getting the operation hash of a transaction (transfer) operation: + +```js + +// import { TezosToolkit } from '@taquito/taquito'; +// import { encodeOpHash } from '@taquito/utils'; +// import { LocalForger } from '@taquito/local-forging'; + +// const Tezos = new TezosToolkit('RPC_ENDPOINT'); + +const preparedTransfer = await Tezos.prepare.transaction({ + amount: 1, + to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu' +}); + + +// convert prepared operation into a forgeable object +const forgeParams = await Tezos.prepare.toForge(preparedTransfer); + +// forge the transaction operation +const forger = new LocalForger(); +const forgedBytes = await forger.forge(forgeParams); + +// sign the transaction operation +const signedBytes = await Tezos.signer.sign(forgedBytes); + +// get the operation hash using the encodeOpHash() function +const opHash = encodeOpHash(signedBytes.sbytes, new Uint8Array([3])); + +``` + + + diff --git a/website/versioned_docs/version-17.0.0/originate.md b/website/versioned_docs/version-17.5.0/originate.md similarity index 98% rename from website/versioned_docs/version-17.0.0/originate.md rename to website/versioned_docs/version-17.5.0/originate.md index 16becd26cf..f13a942b41 100644 --- a/website/versioned_docs/version-17.0.0/originate.md +++ b/website/versioned_docs/version-17.5.0/originate.md @@ -46,10 +46,9 @@ 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" } +const option = { name: "nameOfWallet", network: { type: 'jakartanet' }} const wallet = new BeaconWallet(option) -const network = { type: "jakartanet" } -await wallet.requestPermissions({ network }) +await wallet.requestPermissions() Tezos.setWalletProvider(wallet) ``` diff --git a/website/versioned_docs/version-17.0.0/prepare.md b/website/versioned_docs/version-17.5.0/prepare.md similarity index 99% rename from website/versioned_docs/version-17.0.0/prepare.md rename to website/versioned_docs/version-17.5.0/prepare.md index 67b8c7014d..cbf20f8ad8 100644 --- a/website/versioned_docs/version-17.0.0/prepare.md +++ b/website/versioned_docs/version-17.5.0/prepare.md @@ -1,5 +1,5 @@ --- -title: Preparing Operations +title: Prepare Provider author: Davis Sawali --- diff --git a/website/versioned_docs/version-17.0.0/amendment_and_voting.md b/website/versioned_docs/version-17.5.0/proposal_and_ballot.md similarity index 97% rename from website/versioned_docs/version-17.0.0/amendment_and_voting.md rename to website/versioned_docs/version-17.5.0/proposal_and_ballot.md index 04ce697a79..7ce16dd751 100644 --- a/website/versioned_docs/version-17.0.0/amendment_and_voting.md +++ b/website/versioned_docs/version-17.5.0/proposal_and_ballot.md @@ -1,6 +1,6 @@ --- -title: Amendment and Voting -id: amendment_and_voting +title: Proposal & Ballot +id: proposal_and_ballot author: Davis Sawali --- diff --git a/website/versioned_docs/version-17.0.0/quick_start.md b/website/versioned_docs/version-17.5.0/quick_start.md similarity index 97% rename from website/versioned_docs/version-17.0.0/quick_start.md rename to website/versioned_docs/version-17.5.0/quick_start.md index 13f119c56f..ed21f1a0d4 100644 --- a/website/versioned_docs/version-17.0.0/quick_start.md +++ b/website/versioned_docs/version-17.5.0/quick_start.md @@ -49,6 +49,8 @@ Tezos.setProvider({ }); ``` +Alternatively, you can use a `WalletProvider` to interact with a wallet. Please refer to the [Wallet API](wallet_API.md) documentation for more information. + ## Examples ### Get the current Tezos balance for an address diff --git a/website/versioned_docs/version-17.0.0/rpc-cache.md b/website/versioned_docs/version-17.5.0/rpc-cache.md similarity index 100% rename from website/versioned_docs/version-17.0.0/rpc-cache.md rename to website/versioned_docs/version-17.5.0/rpc-cache.md diff --git a/website/versioned_docs/version-17.0.0/rpc_nodes.md b/website/versioned_docs/version-17.5.0/rpc_nodes.md similarity index 90% rename from website/versioned_docs/version-17.0.0/rpc_nodes.md rename to website/versioned_docs/version-17.5.0/rpc_nodes.md index a81eef9c0b..764fca96ce 100644 --- a/website/versioned_docs/version-17.0.0/rpc_nodes.md +++ b/website/versioned_docs/version-17.5.0/rpc_nodes.md @@ -23,7 +23,7 @@ values={[ | Provider | Net | URL | Header | |------------------|--------------|------------------------------------------|---------------------------------------------------------------------------------| -| ECAD Labs | Mainnet | https://mainnet.ecadinfra.com | [Check](https://mainnet.ecadinfra.com/chains/main/blocks/head/header) | +| ECAD Labs | Mainnet | https://mainnet.ecadinfra.com | [Check](https://mainnet.ecadinfra.com/chains/main/blocks/head/header) | | ECAD Labs | Ghostnet | https://ghostnet.ecadinfra.com | [Check](https://ghostnet.ecadinfra.com/chains/main/blocks/head/header) | | ECAD Labs | Nairobinet | https://nairobinet.ecadinfra.com | [Check](https://nairobinet.ecadinfra.com/chains/main/blocks/head/header) | | ECAD Labs | Mumbainet | https://mumbainet.ecadinfra.com | [Check](https://mumbainet.ecadinfra.com/chains/main/blocks/head/header) | @@ -34,17 +34,16 @@ values={[ | Marigold | Ghostnet | https://ghostnet.tezos.marigold.dev/ | [Check](https://ghostnet.tezos.marigold.dev/chains/main/blocks/head/header) | | Marigold | Nairobinet | https://nairobinet.tezos.marigold.dev/ | [Check](https://nairobinet.tezos.marigold.dev/chains/main/blocks/head/header) | | Marigold | Mumbainet | https://mumbainet.tezos.marigold.dev/ | [Check](https://mumbainet.tezos.marigold.dev/chains/main/blocks/head/header) | -| TezTools | Mainnet | https://eu01-node.teztools.net/ | [Check](https://eu01-node.teztools.net/chains/main/blocks/head/header) | *If you are aware of a public node missing from our list or our information is inaccurate, please help us by submitting an issue or pull request on our GitHub page.* | Provider | Details | -|------------------|------------------------------------------------------------------------| -| MIDL.dev | https://midl.dev/tezos-rpc/ | -| TezTools.io | https://t.me/teztools (Telegram) | -| Exaion | https://node.exaion.com | +|------------------|---------------------------------------------| +| TzPro | https://tzpro.io/ | +| MIDL.dev | https://midl.dev/tezos-rpc/ | +| Exaion | https://node.exaion.com | *If you are aware of a private 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-17.0.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-17.5.0/rpc_nodes_integration_test.md similarity index 99% rename from website/versioned_docs/version-17.0.0/rpc_nodes_integration_test.md rename to website/versioned_docs/version-17.5.0/rpc_nodes_integration_test.md index edc77b8312..d9bf64803d 100644 --- a/website/versioned_docs/version-17.0.0/rpc_nodes_integration_test.md +++ b/website/versioned_docs/version-17.5.0/rpc_nodes_integration_test.md @@ -1,5 +1,5 @@ --- -title: RPC nodes +title: RPC tests author: Roxane Letourneau --- diff --git a/website/versioned_docs/version-17.0.0/rpc_package.md b/website/versioned_docs/version-17.5.0/rpc_package.md similarity index 96% rename from website/versioned_docs/version-17.0.0/rpc_package.md rename to website/versioned_docs/version-17.5.0/rpc_package.md index fdab4086d4..ef7fca632d 100644 --- a/website/versioned_docs/version-17.0.0/rpc_package.md +++ b/website/versioned_docs/version-17.5.0/rpc_package.md @@ -1,5 +1,5 @@ --- -title: RPC Package +title: RPC author: Claude Barde --- @@ -31,7 +31,7 @@ const balance = await client.getBalance('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'); console.log('-- Balance:', balance.toNumber()); ``` -The balance is returned as a `BigNumber` and must be converted to a number to output it. +The balance is returned as a `BigNumber` and must be converted to a number to output it. Please note that the returned value is in mutez (micro ꜩ), so if you need the balance in ꜩ, you can divide it by 1000000. ```js // gets head block diff --git a/website/versioned_docs/version-17.0.0/sapling.md b/website/versioned_docs/version-17.5.0/sapling.md similarity index 100% rename from website/versioned_docs/version-17.0.0/sapling.md rename to website/versioned_docs/version-17.5.0/sapling.md diff --git a/website/versioned_docs/version-17.0.0/sapling_in_memory_spending_key.md b/website/versioned_docs/version-17.5.0/sapling_in_memory_spending_key.md similarity index 100% rename from website/versioned_docs/version-17.0.0/sapling_in_memory_spending_key.md rename to website/versioned_docs/version-17.5.0/sapling_in_memory_spending_key.md diff --git a/website/versioned_docs/version-17.0.0/sapling_in_memory_viewing_key.md b/website/versioned_docs/version-17.5.0/sapling_in_memory_viewing_key.md similarity index 100% rename from website/versioned_docs/version-17.0.0/sapling_in_memory_viewing_key.md rename to website/versioned_docs/version-17.5.0/sapling_in_memory_viewing_key.md diff --git a/website/versioned_docs/version-17.0.0/set_delegate.md b/website/versioned_docs/version-17.5.0/set_delegate.md similarity index 100% rename from website/versioned_docs/version-17.0.0/set_delegate.md rename to website/versioned_docs/version-17.5.0/set_delegate.md diff --git a/website/versioned_docs/version-17.0.0/signing.md b/website/versioned_docs/version-17.5.0/signing.md similarity index 100% rename from website/versioned_docs/version-17.0.0/signing.md rename to website/versioned_docs/version-17.5.0/signing.md diff --git a/website/versioned_docs/version-17.0.0/smart_rollups.md b/website/versioned_docs/version-17.5.0/smart_rollups.md similarity index 100% rename from website/versioned_docs/version-17.0.0/smart_rollups.md rename to website/versioned_docs/version-17.5.0/smart_rollups.md diff --git a/website/versioned_docs/version-17.0.0/smartcontracts.md b/website/versioned_docs/version-17.5.0/smartcontracts.md similarity index 100% rename from website/versioned_docs/version-17.0.0/smartcontracts.md rename to website/versioned_docs/version-17.5.0/smartcontracts.md diff --git a/website/versioned_docs/version-17.0.0/storage_annotations.md b/website/versioned_docs/version-17.5.0/storage_annotations.md similarity index 100% rename from website/versioned_docs/version-17.0.0/storage_annotations.md rename to website/versioned_docs/version-17.5.0/storage_annotations.md diff --git a/website/versioned_docs/version-17.5.0/taquito_utils.md b/website/versioned_docs/version-17.5.0/taquito_utils.md new file mode 100644 index 0000000000..236ac867ab --- /dev/null +++ b/website/versioned_docs/version-17.5.0/taquito_utils.md @@ -0,0 +1,212 @@ +--- +title: Taquito Utils +author: Davis Sawali & Roxane Letourneau +--- + +## Description +The `@taquito/utils` package provides developers with utility functions in Taquito. + +You can find a full list of available utility functions in Taquito [here](https://tezostaquito.io/typedoc/modules/_taquito_utils.html) + +## Usage Example +To use the functions, simply import the function you need as such: + +```js +import { getPkhfromPk, b58cencode, b58cdecode } from '@taquito/utils'; + +const publicKeyHash = getPkhfromPk('replace_with_publickey'); +const encoded = b58cencode('replace_with_publickey'); +``` + +## Using Validation Functions from `@taquito/utils` + +Taquito provides functions that allow us to see if an address, a chain, a key hash, a contract address, a public key, or a signature is valid. Note that these validations do not rely on a node but are done based on checksums. Thus, they allow us to check if a value is valid and not if it exists on a chain. The `ValidationResult` returned by these functions is an enum that can take the following values: + +``` +0 = NO_PREFIX_MATCHED, +1 = INVALID_CHECKSUM, +2 = INVALID_LENGTH, +3 = VALID +``` + +### Validate an address + +#### The `validateAddress` function + +This function can be used to validate implicit addresses (tz1, tz2, tz3) and originated addresses (KT1). + +In the following example, the function is first called with a valid public key hash (pkh). It is then called with the same pkh where one character differs (e.g. 'p' instead of 'P'), which results in an invalid checksum. + +```js live noInline +import { validateAddress } from '@taquito/utils'; + +//valid +const pkh = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx'; +const validation = validateAddress(pkh); +println(`Calling the validateAddress function with ${pkh} returns ${validation}.`); + +//invalid checksum +const invalidPkh = 'tz1L9r8mWmRpndRhuvMCWESLGSVeFzQ9NAWx'; +const invalidValidation = validateAddress(invalidPkh); +println(`Calling the validateAddress function with ${invalidPkh} returns ${invalidValidation}.`); +``` + +#### The `validateKeyHash` function + +This function is used to validate implicit addresses (tz1, tz2, tz3). + +Here is a valid example with a pkh and an invalid one where the prefix is missing : + +```js live noInline +import { validateKeyHash } from '@taquito/utils'; + +//valid +const keyHash = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx'; +const validation = validateKeyHash(keyHash); +println(`Calling the validateKeyHash function with ${keyHash} returns ${validation}.`); + +//invalid prefix +const keyHashWithoutPrefix = 'L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx'; +const invalidValidation = validateKeyHash(keyHashWithoutPrefix); +println(`Calling the validateKeyHash function with ${keyHash} returns ${invalidValidation}.`); +``` + +#### The `validateContractAddress` function + +This function is used to validate originated addresses (KT1). + +Here is a valid example with the address of an existing contract : + +```js live noInline +import { validateContractAddress } from '@taquito/utils'; + +//valid +const contractAddress = 'KT1AfxAKKLnEg6rQ6kHdvCWwagjSaxEwURSJ'; +const validation = validateContractAddress(contractAddress); +println(`Calling the validateContractAddress function with ${contractAddress} returns ${validation}.`); +``` + +### Validate a chain + +The `validateChain` function is used to validate a chain id. + +The following example shows a valid result when using the mainnet chain id and an invalid result if the prefix is missing : + +```js live noInline +import { validateChain } from '@taquito/utils'; + +//valid +const chainId = 'NetXdQprcVkpaWU'; +const validation = validateChain(chainId); +println(`Calling the validateChain function with ${chainId} returns ${validation}.`); + +//invalid prefix +const chainIdWithoutPrefix = 'XdQprcVkpaWU'; +const invalidValidation = validateChain(chainIdWithoutPrefix); +println(`Calling the validateChain function with ${chainIdWithoutPrefix} returns ${invalidValidation}.`); +``` + +### Validate a public key + +The `validatePublicKey` is used to check if a public key is valid. + +```js live noInline +import { validatePublicKey } from '@taquito/utils'; + +//valid +const publicKey = 'edpkvS5QFv7KRGfa3b87gg9DBpxSm3NpSwnjhUjNBQrRUUR66F7C9g'; +const validation = validatePublicKey(publicKey); +println(`Calling the validatePublicKey function with ${publicKey} returns ${validation}.`); + +//invalid prefix +const value = 'tz1L9r8mWmRPndRhuvMCWESLGSVeFzQ9NAWx'; +const invalidValidation = validatePublicKey(value); +println(`Calling the validatePublicKey function with ${value} returns ${invalidValidation}.`); +``` + +### Validate a signature + +The `validateSignature` function is used to check if a signature is valid. + +```js live noInline +import { validateSignature } from '@taquito/utils'; + +//valid +const signature = 'edsigtkpiSSschcaCt9pUVrpNPf7TTcgvgDEDD6NCEHMy8NNQJCGnMfLZzYoQj74yLjo9wx6MPVV29CvVzgi7qEcEUok3k7AuMg'; +const validation = validateSignature(signature); +println(`Calling the validateSignature function with ${signature} returns ${validation}.`); + +//invalid checksum +const invalidSignature = 'edsigtkpiSSschcaCt9pUVrpNPf7TTcgvgDEDD6NCEHMy8NNQJCGnMfLZzYoQj74yLjo9wx6MPVV29CvVzgi7qEcEUok3k7AuM'; +const invalidValidation = validateSignature(invalidSignature); +println(`Calling the validateSignature function with ${invalidSignature} returns ${invalidValidation}.`); +``` + +### Validate a Block Hash + +The `validateBlock` function is used to check whether a block hash is valid. + +```js live noInline +import { validateBlock } from '@taquito/utils'; + +//valid +const block ='BLJjnzaPtSsxykZ9pLTFLSfsKuiN3z7SjSPDPWwbE4Q68u5EpBw'; +const validation = validateBlock(block); +println(`Calling the validateBlock function with ${block} returns ${validation}.`); + +//invalid checksum +const invalidBlock ='BMEdgRZbJJrtByoA5Jyuvy8mzp8mefbcrno82nQCAEbBCUhog'; +const invalidValidation = validateBlock(invalidBlock); +println(`Calling the validateBlock function with ${invalidBlock} returns ${invalidValidation}.`); +``` +### Validate an Operation Hash + +The `validateOperation` function is used to check whether an operation hash is valid. + +```js live noInline +import { validateOperation } from '@taquito/utils'; + +//valid +const operation ='ood2Y1FLHH9izvYghVcDGGAkvJFo1CgSEjPfWvGsaz3qypCmeUj'; +const validation = validateOperation(operation); +println(`Calling the validateOperation function with ${operation} returns ${validation}.`); + +//invalid checksum +const invalidOperation ='ont3n75kMA2xeoTdxkGM23h5XhWgyP51WEznc4zCDtGNz1TWSz'; +const invalidValidation = validateOperation(invalidOperation); +println(`Calling the validateOperation function with ${invalidOperation} returns ${invalidValidation}.`); +``` +### Validate a Protocol Hash + +The `validateProtocol` function is used to check whether a protocol hash is valid. + +```js live noInline +import { validateProtocol } from '@taquito/utils'; + +//valid +const protocol ='PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx'; +const validation = validateProtocol(protocol); +println(`Calling the validateProtocol function with ${protocol} returns ${validation}.`); + +//invalid checksum +const invalidProtocol ='PsBABY5HQTSkA4297zNHfsZNKtxULfL18y95b3m53QJiXGmrbU'; +const invalidValidation = validateProtocol(invalidProtocol); +println(`Calling the validateProtocol function with ${invalidProtocol} returns ${invalidValidation}.`); +``` + +# Verification of a signature + +Taquito provides a function named `verifySignature` that allows verifying signatures of payloads. The function takes a message, a public key, and a signature as parameters and returns a boolean indicating if the signature matches. + +Here is an example of a successful verification: + +```js live noInline +import { verifySignature } from '@taquito/utils'; + +const message = '03d0c10e3ed11d7c6e3357f6ef335bab9e8f2bd54d0ce20c482e241191a6e4b8ce6c01be917311d9ac46959750e405d57e268e2ed9e174a80794fbd504e12a4a000141eb3781afed2f69679ff2bbe1c5375950b0e40d00ff000000005e05050505050507070100000024747a32526773486e74516b72794670707352466261313652546656503539684b72654a4d07070100000024747a315a6672455263414c42776d4171776f6e525859565142445439426a4e6a42484a750001'; +const pk = 'sppk7c7hkPj47yjYFEHX85q46sFJGw6RBrqoVSHwAJAT4e14KJwzoey'; +const sig = 'spsig1cdLkp1RLgUHAp13aRFkZ6MQDPp7xCnjAExGL3MBSdMDmT6JgQSX8cufyDgJRM3sinFtiCzLbsyP6d365EHoNevxhT47nx' + +const isValid = verifySignature(message, pk, sig); +println(isValid); +``` diff --git a/website/versioned_docs/version-17.0.0/testing_strategies.md b/website/versioned_docs/version-17.5.0/testing_strategies.md similarity index 99% rename from website/versioned_docs/version-17.0.0/testing_strategies.md rename to website/versioned_docs/version-17.5.0/testing_strategies.md index a667b1aa82..a4d1ac6249 100644 --- a/website/versioned_docs/version-17.0.0/testing_strategies.md +++ b/website/versioned_docs/version-17.5.0/testing_strategies.md @@ -44,7 +44,7 @@ Integration Tests look to ensure that multiple software components are working t 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 (done) => { + it('Simple transfers with origination', async () => { const batch = await Tezos.batch() .withTransfer({ to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', amount: 0.02 }) .withTransfer({ to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu', amount: 0.02 }) @@ -58,7 +58,6 @@ Here is a simple example of an integration test. The test sends Taquito instruct const op = await batch.send(); await op.confirmation(); expect(op.status).toEqual('applied') - done(); }) ``` diff --git a/website/versioned_docs/version-17.0.0/tezbridge_signer.md b/website/versioned_docs/version-17.5.0/tezbridge_signer.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tezbridge_signer.md rename to website/versioned_docs/version-17.5.0/tezbridge_signer.md diff --git a/website/versioned_docs/version-17.0.0/tezos_domains.md b/website/versioned_docs/version-17.5.0/tezos_domains.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tezos_domains.md rename to website/versioned_docs/version-17.5.0/tezos_domains.md diff --git a/website/versioned_docs/version-17.0.0/tickets.md b/website/versioned_docs/version-17.5.0/tickets.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tickets.md rename to website/versioned_docs/version-17.5.0/tickets.md diff --git a/website/versioned_docs/version-17.0.0/transaction_limits.md b/website/versioned_docs/version-17.5.0/transaction_limits.md similarity index 100% rename from website/versioned_docs/version-17.0.0/transaction_limits.md rename to website/versioned_docs/version-17.5.0/transaction_limits.md diff --git a/website/versioned_docs/version-17.0.0/tutorial_links.md b/website/versioned_docs/version-17.5.0/tutorial_links.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tutorial_links.md rename to website/versioned_docs/version-17.5.0/tutorial_links.md diff --git a/website/versioned_docs/version-17.0.0/tx_rollups.md b/website/versioned_docs/version-17.5.0/tx_rollups.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tx_rollups.md rename to website/versioned_docs/version-17.5.0/tx_rollups.md diff --git a/website/versioned_docs/version-17.0.0/tzip12.md b/website/versioned_docs/version-17.5.0/tzip12.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tzip12.md rename to website/versioned_docs/version-17.5.0/tzip12.md diff --git a/website/versioned_docs/version-17.0.0/tzip16-sequence-diagram.md b/website/versioned_docs/version-17.5.0/tzip16-sequence-diagram.md similarity index 100% rename from website/versioned_docs/version-17.0.0/tzip16-sequence-diagram.md rename to website/versioned_docs/version-17.5.0/tzip16-sequence-diagram.md diff --git a/website/versioned_docs/version-17.0.0/validators.md b/website/versioned_docs/version-17.5.0/validators.md similarity index 100% rename from website/versioned_docs/version-17.0.0/validators.md rename to website/versioned_docs/version-17.5.0/validators.md diff --git a/website/versioned_docs/version-17.0.0/version.md b/website/versioned_docs/version-17.5.0/version.md similarity index 89% rename from website/versioned_docs/version-17.0.0/version.md rename to website/versioned_docs/version-17.5.0/version.md index d1ba632a85..0956126b8d 100644 --- a/website/versioned_docs/version-17.0.0/version.md +++ b/website/versioned_docs/version-17.5.0/version.md @@ -2,6 +2,355 @@ title: Versions author: Jev Bjorsell --- +# Taquito 17.5.0 + +**Important Note:** +In this version, we replaced instances of `Axios` in favour of `Fetch`. + +We are not expecting any breaking changes, but if there are any issues that you see regarding this, please reach out to the Taquito team. + +## Summary + +### New Features +- `@taquito/taquito` - Expose and publicly `smartContractAbstractionSemantic` #2534 + +### Improvement +- `@taquito/http-utils` - Removed `Axios` as a dependency of Taquito in favour of `fetch`/`node-fetch` #2461 +### Documentation +- Updated RPC nodes on the website [PR#2732](https://github.com/ecadlabs/taquito/pull/2732 +- Updated Michelson encoder documentation to reference `generateSchema` instead of the outdated `extractSchema` #2630 +- Added a Taquito Chatbot assistant for the Taquito website to help answer user questions #2684 + +### Internals +- Removed archive node, and references to it in Taquito [PR#2743](https://github.com/ecadlabs/taquito/pull/2743) +- Updated Sass, Lerna, and Firebase versions [PR#2749](https://github.com/ecadlabs/taquito/pull/2749) +- Updated integration tests to increase speed and reliability #2741 + + +## `@taquito/http-utils` - Removed `Axios` in favour of `fetch` +The `taquito/http-utils` is responsible for handling all HTTP incoming and outgoing HTTP requests in Taquito. It utilized `Axios` as a main dependency to handle requests coming in and out of Taquito. + +Now that browsers and Node have supported `fetch` natively, it makes more sense for us to move towards it. + +Axios came with quite a large dependency tree, as well as multiple workarounds we needed to include for it to work properly (i.e. the `axios-fetch-adapter`) + +With this change we hope for a more stable HTTP handler in Taquito while reducing the package size at the same time. + + +# Taquito v17.4.0 + +**Potential Breaking Changes** : +We have updated various dependencies to the latest version in this release. Please update and test our packages for compatibility. We encourage all users to get in touch with the Taquito team if you encounter any unexpected behaviours and/or side effects. + +## Summary + +### Documentation +- Updated docs on flattening nested Michelson type pairs and unions #2458 #2328 +- Added docs to obtain operation hash before injecting an operation #2550 +- Added details of FA2 contract entrypoint `balance_of` param #2719 +- Updated Wallet API docs to include examples on subscribing to events emitted by Beacon #2707 +- Updated the Taquito test dApp to output events #2707 + +### Internals + - Updated various dependencies [PR#2693](https://github.com/ecadlabs/taquito/pull/2693) [PR#2720](https://github.com/ecadlabs/taquito/pull/2720) + - Added detectOpenHandles argument when running Flextesa integration tests as temporary workaround to Jest throwing circular JSON errors [PR#2721](https://github.com/ecadlabs/taquito/pull/2721) + + +# Taquito v17.3.2 + +## Summary +- Updated Beacon version to v4.0.12 + +## Documentation +- Updated website documentation to group sections by logical order instead of alphabetical #2665 +- Added detail for `getBalance()` method documentation that it returns balances in mutez #2495 + +## Internals +- Minor typo fix on variable name in `RpcEstimateProvider` [PR#2669](https://github.com/ecadlabs/taquito/pull/2669) +- Added `@taquito/core` as an explicit dependency on other packages [PR#2673](https://github.com/ecadlabs/taquito/pull/2673) + +# Taquito v17.3.1 + +## Summary +- This is a patch release to upgrade `@airgap/beacon-sdk` and `@airgap/beacon-dapp` packages to `v4.0.10` [PR#2649](https://github.com/ecadlabs/taquito/pull/2649) +- Updating license to `Apache-2.0` in `package.json` files [PR#2636](https://github.com/ecadlabs/taquito/pull/2636) +- Updated the ledger dependencies [PR#2645](https://github.com/ecadlabs/taquito/pull/2645) +- Applied dependency upgrades in website suggested by dependabot [PR#2645](https://github.com/ecadlabs/taquito/pull/2645) + +# Taquito v17.3.0 + +**A change in Licensing**: +Taquito has moved from `MIT` to `Apache 2.0`. + +**Potential Breaking Changes**: + +- Previously, an `OrToken`'s `EncodeObject` method would accept an object with multiple fields. It now only accepts an object with a single field. +- The `generateSchema` method in an `OrToken` with nested `OrToken`s (as well as `ExtractSchema`) would generate a schema object that was misleading and did not match what `Execute` created or `EncodeObject` accepted. This is now fixed and the behavior is consistent across all methods. +- `OrToken.Execute()` used to throw `OrTokenDecodingError` in case of failure, but now will throw `OrValidationError` + +## Summary + +### New Features + +- `@taquito/michelson-encoder` - The `OrToken`'s `EncodeObject` method now only accepts an object with a single field #2544 + +### Bug Fixes + +- `@taquito/michelson-encoder` - A nested `PairToken` with a mix of fields with `annots` and fields without `annots` could generate the wrong javascript object with `Execute` [#2540](https://github.com/ecadlabs/taquito/issues/2540) +- `@taquito/michelson-encoder` - the `generateSchema` method in a nested `OrToken` now generates a schema that is consistent with `Execute` and `EncodeObject` [#2543](https://github.com/ecadlabs/taquito/issues/2543) + +``` +const schema = { + prim: 'pair', + args: [ + { + prim: 'pair', + args: [ + { + prim: 'pair', + args: [{ prim: 'int' }, { prim: 'int' }], + annots: ['%A3'], + }, + { prim: 'int' }, + ], + }, + { prim: 'bool' }, + ], + }; + + const michelineJson = { + prim: 'Pair', + args: [ + { + prim: 'Pair', + args: [{ prim: 'Pair', args: [{ int: '11' }, { int: '22' }] }, { int: '33' }], + }, + { prim: 'True' }, + ], + }; + const javaScriptObject = new Schema(schema).Execute(michelineJson); +``` + +Previously, this `javaScriptObject` would be equal to: + +``` +{ + 2: true, + A3: { + 0: 11, + 1: 22, + }, +} +``` + +But now it returns: + +``` +{ + 1: 33, + 2: true, + A3: { + 0: 11, + 1: 22, + }, +} +``` +### Internals + * `integration-tests` config improvement [#2163](https://github.com/ecadlabs/taquito/issues/2163) + * update RPC urls to align with the updated infrastructure [PR#2576](https://github.com/ecadlabs/taquito/pull/2576) [#2633](https://github.com/ecadlabs/taquito/pull/2633) + +## `@taquito/michelson-encoder` - Validate that an `OrToken`'s `EncodeObject` method only accepts an object with a single field + +Previously, an `OrToken`'s `EncodeObject` method would accept an object with multiple fields. It now only accepts an object with a single field. + +``` + const token = createToken({ + prim: 'or', + args: [{ prim: 'int' }, { prim: 'string' }], annots: [] + }, 0) as OrToken; + const javascriptObject = token.EncodeObject({ '0': 10, '1': '10' })); +``` + +Previously, this would return work and the result was the same as `token.EncodeObject({ '0': 10, '1': '10' }))`. Now, this throws an error. + +## `@taquito/michelson-encoder` - For an `OrToken` with nested `OrToken`s, `generateSchema` behaved inconsistently with `Execute` and `EncodeObject` + +Previously, `generateSchema` would generate a schema object that was misleading and did not match what `Execute` created or `EncodeObject` accepted. This is now fixed and the behavior is consistent across all methods. + +``` +const token = createToken( + { + prim: 'or', + args: [ + { + prim: 'bytes', + }, + { + prim: 'or', + annots: ['A'], + args: [ + { + prim: 'or', + args: [{ prim: 'int' }, { prim: 'nat' }], + }, + { prim: 'bool' }, + ], + }, + ], + }, + 0 +) as OrToken; +const schema = token.generateSchema(); +``` + +Previously, `schema` would be equal to: + +``` +{ + __michelsonType: "or", + schema: { + "0": { __michelsonType: "bytes", schema: "bytes" }, + "A": { + __michelsonType: "or", + schema: { + "1": { __michelsonType: "int", schema: "int" }, + "2": { __michelsonType: "nat", schema: "nat" }, + "3": { __michelsonType: "bool", schema: "bool" } + } + } + } +} +``` +Which was inconsistent with what `Execute` created and what `EncodeObject` accepted. +Now it is: + +``` +{ + __michelsonType: 'or', + schema: { + 0: { __michelsonType: 'bytes', schema: 'bytes' }, + 1: { __michelsonType: 'int', schema: 'int' }, + 2: { __michelsonType: 'nat', schema: 'nat' }, + 3: { __michelsonType: 'bool', schema: 'bool' }, + }, +} +``` + +# Taquito v17.2.0 + +**Potential Breaking Changes** : +Further improved error classes + - In `@taquito/sapling` `InvalidMerkleRootError` is renamed to `InvalidMerkleTreeError` + - In `@taquito/sapling` `InvalidParameter` is renamed to `SaplingTransactionViewerError` + - In `@taquito/michel-codec` `InvalidContractError` is renamed to `InvalidMichelsonError` + +## Summary + +### New Features + - Added new RPC endpoint `simulateOperation` #2548 + - Added support for signing `failingNoop` operation in `Contract API` and `Wallet API` #952 #2507 + +### Bug Fixes +- Updated sapling live code example contract on website #2542 + +### Improvement + Improved error classes for the following packages: + - `@taquito-sapling` #2568 + - `@taquito-michel-codec` #2568 + +### Documentation + - Updated local forger documentation #2571 + - Adjusted website wallet page design and removed website lambda view page broken link #1652 + +### Internals + - Updated beacon dependency to v4.0.6 #2584 + - Updated estimation process to use `simulateOperation()` instead of `runOperation()` #2548 + - Updated website dependencies [PR#2587](https://github.com/ecadlabs/taquito/pull/2587) + +## `@taquito/taquito` - Add support of failing_noop operation in Contract and Wallet API +Taquito now supports the `failing_noop` operation + +``` +const Tezos = new TezosToolkit(rpcUrl); + +Tezos.setWalletProvider(wallet) +const signedW = await Tezos.wallet.signFailingNoop({ +arbitrary: char2Bytes("Hello World"), +basedOnBlock: 0, +}); + +Tezos.setSignerProvider(signer) +const signedC = await Tezos.contract.signFailingNoop({ +arbitrary: char2Bytes("Hello World"), +basedOnBlock: 'genesis', +}); +``` + +## `@taquito/rpc` - Add support of simulateOperation RPC call + +``` +const Tezos = new TezosToolkit(rpcUrl) +let account ='tz1...' +let counter = Number((await Tezos.rpc.getContract(account, {block: 'head'})).counter) +const op = { + chain_id: await Tezos.rpc.getChainId(), + operation: { + branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX', + contents: [{ + kind: OpKind.TRANSACTION, + counter: (counter + 1).toString(), + source: account, + destination: account, + fee: '0', + gas_limit: '1100', + storage_limit: '600', + amount: '1', + }] + } +}; + +let simulate = await Tezos.rpc.simulateOperation(op)).contents[0] +``` +# Taquito v17.1.1 +## Summary +This is a patch release to fix a potential issue with `verifySignature()` and `hex2buf()` util method. +### Bug Fixes +- Fixed a potentially exploitable behaviour where `verifySignature()` was allowing an appended character to a message payload and still verify the signature correctly. It has now been fixed to validate against odd length characters #2578 + +# Taquito v17.1.0 +**Potential Breaking Changes** +- Updated RxJS version from v6.6.3 to v7.8.1 +- Updated TS version into v4.2.4 +- Please be wary due to the RxJS version upgrade, we've been seeing intermittent timeouts when testing against a Flextesa sandbox. This behaviour is **not** present when using it against a regular node (Mainnet, Nairobinet, etc). We are still investigating what the cause might be. #2261 + +Some other subtle changes that might affect some developers: +- In `@taquito/taquito` - `IntegerError` is renamed to `InvalidBalanceError` +- In `@taquito/taquito` - `PrepareProvider` used to throw `RevealEstimateError` now will throw `PublicKeyNotFoundError` +- In `@taquito/tzip-16` - `MetadataNotFound` is renamed to `ContractMetadataNotFoundError` +- In `@taquito/tzip-16` - `InvalidMetadata` is renamed to `InvalidContractMetadataError` +- In `@taquito/tzip-16` - `InvalidMetadataType` is renamed to `InvalidContractMetadataTypeError` +- In `@taquito/tzip-16` - `BigMapMetadataNotFound` is renamed to `BigMapContractMetadataNotFoundError` +- In `@taquito/tzip-16` - `UriNotFound` is renamed to `UriNotFoundError` +- In `@taquito/tzip-16` - `InvalidUri` is renamed to `InvalidUriError` +- In `@taquito/tzip-16` - `ProtocolNotSupported` is renamed to `ProtocolNotSupportedError` +- In `@taquito/tzip-16` - `UnconfiguredMetadataProviderError` is renamed to `UnconfiguredContractMetadataProviderError` +- In `@taquito/tzip-16` - `ForbiddenInstructionInViewCode` is renamed to `ForbiddenInstructionInViewCodeError` + +## Summary +### New Features +- Exposed the injector to be customizable from the TezosToolkit class #1344 + +### Improvement +- Simplified generated Lambda for `transferToContract` [PR#2404](https://github.com/ecadlabs/taquito/pull/2404) +- Improved error classes for these following packages: + - `@taquito/taquito` [PR#2559](https://github.com/ecadlabs/taquito/pull/2559) + - `@taquito/michelson-encoder` #1995 + - `@taquito/tzip12` [PR#2559](https://github.com/ecadlabs/taquito/pull/2559) + - `@taquito/tzip16` [PR#2559](https://github.com/ecadlabs/taquito/pull/2559) + +### Internals +- Updated version dependencies for `Sass` and `Dotenv` in `/website` [PR#2560](https://github.com/ecadlabs/taquito/pull/2560) + # Taquito v17 ### Potential Breaking Changes Protocol Nairobi comes with a couple potential breaking changes for our users: @@ -19,7 +368,7 @@ Protocol Nairobi comes with a couple potential breaking changes for our users: ### New Features - `@taquito/taquito` & `@taquito/michelson-encoder`- Introduced a new feature called `EventAbstraction` that provides an abstraction to Events, similar to `ContractAbstraction` #2128 -- +- ### Bug Fixes - `@taquito/taquito` - Fixed contract call estimation to check for unrevealed keys #2500 @@ -41,12 +390,21 @@ Protocol Nairobi comes with a couple potential breaking changes for our users: ### Internals - Upgrade `netlify-cli` package to fix CI issues [PR#2496](https://github.com/ecadlabs/taquito/pull/2496) # Taquito v16.2.0 - -**Potential Breaking Changes**: -- Some error classes may have been moved to the `@taquito/core` package. Note to developers if they are exporting any error classes to capture errors, there might be a need to adjust the export path - -**Note**: There are significant (backwards compatible) changes to the `@taquito/taquito` package, largely regarding the flow of preparing, estimating, forging, and injecting operations into a node. No breaking changes are expected, but users are welcomed to reach out to the team if any issues arise. - +## **Potential Breaking Changes**: +- Some error classes may have been moved to the `@taquito/core` package. Note to developers if they are exporting any error classes to capture errors, there might be a need to adjust the export path. +- We have an ongoing error class refactoring which includes ticket #1992 (create an error class hierarchy), #1993 (consolidate duplicate errors in Taquito) and #1994 (improve error classes in individual packages, namely `@taquito/utils`, `@taquito/local-forging` and `@taquito/signer`). Here are a list of notable changes: + 1. `@taquito/sapling` Class SaplingToolkit function prepareUnshieldedTransaction used to throw InvalidKeyError now throw a InvalidAddressError instead + 2. `@taquito/rpc` when validateContractAddress used to throw InvalidAddressError will now throw InvalidContractAddressError. + 3. `@taquito/sapling` prepareUnshieldedTransaction function when validateDestinationImplicitAddress used to throw InvalidAddressError now throw InvalidKeyHashError + 4. `@taquito/local-forging` smartRollupAddressDecoder used to throw InvalidAddressError now throw InvalidSmartRollupAddressError + 5. `@taquito/local-forging` used to have class InvalidSmartRollupContractAddressError now is InvalidSmartRollupCommitmentHashError + 6. `@taquito/local-forging` function smartRollupContractAddressEncoder rename to smartRollupCommitmentHashEncoder + 7. `@taquito/signer` PrivateKeyError is replaced by common error InvalidKeyError from `@taquito/core` + +- In `@taquito/michelson-encoder` we introduced a new semantic `{ Some: null}` to EncodeObject() for nested options type like (option (option nat)). The old semantic still works when making contract calls but will look to deprecated them in the future as table below. And the corresponding `Execute()` will now return new semantic `{ Some: 1 }` as previously return `1` will be deprecated soon. #2344 +![image](https://github.com/ecadlabs/taquito/assets/106410553/455e7f9f-9d6a-4503-bb89-8f337c322063) + +**Note**: There are also significant (backwards compatible) changes to the `@taquito/taquito` package, largely regarding the flow of preparing, estimating, forging, and injecting operations into a node. No breaking changes are expected, but users are welcomed to reach out to the team if any issues arise. ## Summary ### New Features @@ -84,8 +442,8 @@ const Tezos = new TezosToolkit(RPC_URL); Tezos.setStreamProvider( Tezos.getFactory(PollingSubscribeProvider)({ - shouldObservableSubscriptionRetry: true, - pollingIntervalMilliseconds: 1500 + shouldObservableSubscriptionRetry: true, + pollingIntervalMilliseconds: 1500 }) ); @@ -95,9 +453,9 @@ try { address: 'KT1_CONTRACT_ADDRESS', excludeFailedOperations: true }); - + sub.on('data', console.log); - + } catch (e) { console.log(e); } @@ -163,7 +521,7 @@ const op = await Tezos.contract.smartRollupOriginate({ ### `@taquito/taquito` - Added utility functions in prepare provider to accomodate forging and operation pre-apply (dry runs) Provided 2 utility functions to convert results from the `PrepareProvider` (`PreparedOperation` type objects) into `ForgeParams` and `PreapplyParams` ```typescript! -// pre-apply +// pre-apply const prepared = await Tezos.prepare.transaction({ amount: 1, to: 'tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu' @@ -187,8 +545,8 @@ const forgedBytes = await forger.forge(params); - `@taquito/taquito` Support new operation `smart_rollup_add_messages` #2309 - `@taquito/taquito` Updated `transferTicket` operation in the contract API to support ticket transfers between implicit accounts #2320 - `@taquito/local-forging` Support new Mumbai operations #2308 - - `smart_rollup_originate`, - - `smart_rollup_add_messages`, + - `smart_rollup_originate`, + - `smart_rollup_add_messages`, - `smart_rollup_execute_outbox_message` - `@taquito/local-forging` updated validation to allow tz4 addresses #2350 - `@taquito/rpc` support Mumbai operation types in the RPC package #2307 @@ -334,11 +692,11 @@ const op = await Tezos.wallet.increasePaidStorage({ - `@taquito/michelson-encoder` fix MapTypecheck bug triggered by nested maps ending with a big_map #1762 ### Documentation -- Auto hide sticky navbar for mobile view to increase readability on mobile devices. +- Auto hide sticky navbar for mobile view to increase readability on mobile devices. PR: https://github.com/ecadlabs/taquito/pull/2236 ### Internals -- Start running integration tests against testnets for external PRs. +- Start running integration tests against testnets for external PRs. PR: https://github.com/ecadlabs/taquito/pull/2221 ## `@taquito/taquito` drain_delegate operation support @@ -516,9 +874,9 @@ try { tag: 'tagName', address: 'KT1_CONTRACT_ADDRESS' }); - + sub.on('data', console.log); - + } catch (e) { console.log(e); } @@ -541,7 +899,7 @@ VotingInfoResponse = { ## `@taquito/ledger-signer` - Add support for bip25519 curve -We added support for the bip32-ed25519 derivation scheme in the ledger package. It can be used as follows: +We added support for the bip32-ed25519 derivation scheme in the ledger package. It can be used as follows: ```typescript const transport = await TransportNodeHid.create(); @@ -581,7 +939,7 @@ Before version 14.1.0, it was impossible to specify the amount, the fee, the `ga const contract = Tezos.contract.at('contactAddress'); const batch = Tezos.contract.batch() .withContractCall(contract.methods.entrypointName("entrypointParam", { fee: 100, gasLimit: 1000, storageLimit: 10 }) - .withContractCall(...) + .withContractCall(...) const batchOp = await batch.send(); await batchOp.confirmation(); @@ -666,7 +1024,7 @@ const op = await Tezos.contract.increasePaidStorage({ ## `@taquito/local-forger` - Support the `increase_paid_storage` operation and the `Emit` instruction -We added support to forge and parse the new operation kind `increase_paid_storage`. +We added support to forge and parse the new operation kind `increase_paid_storage`. We added support for the new Michelson instruction `Emit`, which can emit contract events when part of a contract script. @@ -676,9 +1034,9 @@ We added support for the new Michelson instruction `Emit`, which can emit contra ## `@taquito/taquito` - Replace `consumed_gas` with `consumed_milligas` -In Kathmandu, the property `consumed_gas` that was previously deprecated in favor of `consumed_milligas` has been removed. +In Kathmandu, the property `consumed_gas` that was previously deprecated in favor of `consumed_milligas` has been removed. -In Taquito (Contract API), the classes that extend the `Operation` class like `BatchOperation`, `DelegateOperation`, `OriginationOperation`, `TransactionOperation`, and so on, have a `consumedGas` getter. We did an internal change to calculate the consumed gas based on the consumed milligas, so there is no breaking change for the users. We also implemented a new `consumedMilligas` getter which returns the consumed milligas. +In Taquito (Contract API), the classes that extend the `Operation` class like `BatchOperation`, `DelegateOperation`, `OriginationOperation`, `TransactionOperation`, and so on, have a `consumedGas` getter. We did an internal change to calculate the consumed gas based on the consumed milligas, so there is no breaking change for the users. We also implemented a new `consumedMilligas` getter which returns the consumed milligas. On the wallet API side, the `WalletOperation` class has a `receipt` method that returns a `Receipt` object containing a `totalGas` property. It is now calculated based on the consumed milligas, and we added an additional `totalMilliGas` property. @@ -714,18 +1072,18 @@ RunScriptViewResult = { }; ``` -## Sapling package +## Sapling package We implemented a package `@taquito/sapling` providing functionality for Sapling. For documentation, please refer to the following link: https://tezostaquito.io/docs/next/sapling We added a post-install script that fetches the z cash parameters required to initialize the sapling state. Excluding the files from the package avoids having an unsustainable bundle size. The files `saplingOutputParams.js` and `saplingSpendParams.js` will be created in the users `node_modules/@taquito/sapling` folder and avoid them having to download and inject those files. -As the next steps for the sapling package, we will provide interfaces for the key providers, making it easier to generate the proof and produced signature from a remote signer or a ledger. We currently offer an `InMemorySpendingKey` that must be used appropriately, given your risk profile. We will be looking for integration with wallets as well. +As the next steps for the sapling package, we will provide interfaces for the key providers, making it easier to generate the proof and produced signature from a remote signer or a ledger. We currently offer an `InMemorySpendingKey` that must be used appropriately, given your risk profile. We will be looking for integration with wallets as well. ## `@taquito/taquito` - Added support for the `transfer_ticket` operation -The `transfer_ticket` operation allows transferring tickets from an implicit account to a smart contract. +The `transfer_ticket` operation allows transferring tickets from an implicit account to a smart contract. ```typescript const Tezos = new TezosToolkit('https://jakartanet.ecadinfra.com'); @@ -747,7 +1105,7 @@ const op = await Tezos.contract.transferTicket({ ## `@taquito/michelson-encoder` - Display contract storage properly when it contains a `ticket` inside a `map` -We fixed a bug in the michelson-encoder package that prevented displaying the contract storage when it contained tickets inside a map. +We fixed a bug in the michelson-encoder package that prevented displaying the contract storage when it contained tickets inside a map. ## `@taquito/michelson-encoder` - `Schema.generateSchema()` fails for `sapling_transaction_deprecated` @@ -779,7 +1137,7 @@ We are now using the beacon-dapp's `getDAppClientInstance` method instead of the ## `@taquito/local-forging` - Pure JS implementation -To accommodate users working in native mobile development, we added a separate pure JS bundle that can be imported. +To accommodate users working in native mobile development, we added a separate pure JS bundle that can be imported. The bundle wraps functions in the `@taquito/local-forging` package into a single variable called `taquito_local_forging`. To use the JS bundle for your project, download the zip file under `Assets` on the [release page](https://github.com/ecadlabs/taquito/releases). @@ -838,7 +1196,7 @@ The `liquidity_baking_escape_vote` property in `BlockFullHeader` is replaced wit The `OperationBalanceUpdatesItem` can now contain a `bond_id` property of type `BondId`. `BondId` has a `tx_rollup` property. -The `OperationResultTxRollupOrigination` can now contain a `ticket_hash` property. +The `OperationResultTxRollupOrigination` can now contain a `ticket_hash` property. The `METADATA_BALANCE_UPDATES_CATEGORY` enum contains an additional `BONDS` category. @@ -854,8 +1212,8 @@ Added support to forge and unforge the new operation kinds `transfer_ticket`, `t ## `@taquito/michelson-encoder` - Added support for the 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. +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. ## `@taquito/michel-codec` - Added support for the new type`tx_rollup_l2_address` and the new instruction `MIN_BLOCK_TIME` @@ -899,7 +1257,7 @@ await op.confirmation(); The `txRollupSubmitBatch` method also takes optional `storageLimit`, `gasLimit` and `fee` as parameters. ## Known Issues -- Version stamp is out of date, resulting in `getVersionInfo()` to return the older version (12.1.0) instead of the current release candidate. This will be fixed in the full release. +- Version stamp is out of date, resulting in `getVersionInfo()` to return the older version (12.1.0) instead of the current release candidate. This will be fixed in the full release. # Taquito v12.1.0-beta @@ -919,10 +1277,10 @@ The `txRollupSubmitBatch` method also takes optional `storageLimit`, `gasLimit` ## Compatibility with the Jakarta protocol -We addressed the Jakarta protocol's breaking changes, making this version of Taquito compatible with the Jakarta protocol. This early integration has been possible by using the Mondaynet testnet. +We addressed the Jakarta protocol's breaking changes, making this version of Taquito compatible with the Jakarta protocol. This early integration has been possible by using the Mondaynet testnet. The Jakarta protocol addresses the [malleability issue](https://tezos.gitlab.io/alpha/sapling.html#preventing-malleability) discovered in Sapling. It introduces changes around the sapling related types and instructions that are now supported in Taquito: -- The encoding of `sapling_transaction` has changed; we added support for it in the `@taquito/local-forging` package and support for `sapling_transaction_deprecated`. +- The encoding of `sapling_transaction` has changed; we added support for it in the `@taquito/local-forging` package and support for `sapling_transaction_deprecated`. - The optional type returned by the `SAPLING_VERIFY_UPDATE` instruction contains an additional property named `bound_data`. We added support for it in the `@taquito/michel-codec` package. @@ -972,10 +1330,10 @@ new RpcClient('url', 'chain', new HttpBackend(50000)); ## Compatibility with the Jakarta protocol -We addressed the Jakarta protocol's breaking changes, making this version of Taquito compatible with the Jakarta protocol. This early integration has been possible by using the Mondaynet testnet. +We addressed the Jakarta protocol's breaking changes, making this version of Taquito compatible with the Jakarta protocol. This early integration has been possible by using the Mondaynet testnet. The Jakarta protocol addresses the [malleability issue](https://tezos.gitlab.io/alpha/sapling.html#preventing-malleability) discovered in Sapling. It introduces changes around the sapling related types and instructions that are now supported in Taquito: -- The encoding of `sapling_transaction` has changed; we added support for it in the `@taquito/local-forging` package and support for `sapling_transaction_deprecated`. +- The encoding of `sapling_transaction` has changed; we added support for it in the `@taquito/local-forging` package and support for `sapling_transaction_deprecated`. - The optional type returned by the `SAPLING_VERIFY_UPDATE` instruction contains an additional property named `bound_data`. We added support for it in the `@taquito/michel-codec` package. @@ -1040,10 +1398,10 @@ new RpcClient('url', 'chain', new HttpBackend(50000)); - @taquito/taquito - Allow estimating operations using a wallet #1387 ### Documentation -- Examples of using the BeaconWallet instance as a singleton #1045: https://tezostaquito.io/docs/beaconwallet-singleton +- Examples of using the BeaconWallet instance as a singleton #1045: https://tezostaquito.io/docs/beaconwallet-singleton - Fixed link to Tezos faucet #1383 - Updated all website examples to show contract and wallet API example variants #493 -- Algolia improvements - Fixed search bar returning dead links and duplicates #1411 +- Algolia improvements - Fixed search bar returning dead links and duplicates #1411 @@ -1072,19 +1430,19 @@ Example of an endorsement before Ithaca: } ``` -## @taquito/local-forging - Support for the new instruction `SUB_MUTEZ` +## @taquito/local-forging - Support for the new instruction `SUB_MUTEZ` We added support to forge and parse operations containing the new `SUB_MUTEZ` instruction in the `Localforger` class. -> [SUB_MUTEZ] is similar to the mutez case of the SUB instruction but its return type is option mutez instead of mutez. This allows subtracting mutez values without failing in case of underflow. +> [SUB_MUTEZ] is similar to the mutez case of the SUB instruction but its return type is option mutez instead of mutez. This allows subtracting mutez values without failing in case of underflow. *source: https://tezos.gitlab.io/protocols/012ithaca.html#michelson* ## @taquito/rpc - Updated the `RpcClient` types based on the changes to the balance updates and the new type of operations -Support has been added to represent the new operations `Preendorsement`, `Double_preendorsement_evidence`, `Set_deposits_limit`, and the new properties in operations result for `Endorsement` operations. +Support has been added to represent the new operations `Preendorsement`, `Double_preendorsement_evidence`, `Set_deposits_limit`, and the new properties in operations result for `Endorsement` operations. -We also support balance updates' new "kinds" and "type". +We also support balance updates' new "kinds" and "type". The new balance update kinds are `accumulator`, `minted`, `burned`, and `commitment`. @@ -1175,7 +1533,7 @@ Another change has been made regarding the confirmation method of the operations The change to the `confirmation` methods includes a breaking change. The polling interval for the confirmation and the streamer configuration has been moved from the `TezosToolkit` to the `PollingSubscribeProvider` class, where they belong logically. -**BREAKING CHANGE:** +**BREAKING CHANGE:** The `confirmationPollingIntervalSecond` and the `ConfigStreamer` are removed from the `TezosToolkit`. Configuration for the PollingSubscribeProvider needs to be specified in its constructor: @@ -1204,12 +1562,12 @@ Reduction of the bundle size: ## @taquito/taquito - Use the RPC `run_view` to execute lambda views -Before version 12, we used a constantly failing lambda contract to execute the tzip4 (lambda) views. The result of the view was retrieved in the returned error. This implementation was a workaround, and since the Hangzhou protocol, the RPC exposes an endpoint (`helpers/scripts/run_view`) allowing us to execute that kind of view. +Before version 12, we used a constantly failing lambda contract to execute the tzip4 (lambda) views. The result of the view was retrieved in the returned error. This implementation was a workaround, and since the Hangzhou protocol, the RPC exposes an endpoint (`helpers/scripts/run_view`) allowing us to execute that kind of view. We implemented a method called `runView` in the `@taquito/rpc` package, and we now use this method to execute the tzip4 views. Before version 12, the lambda view was only enabled on the "contract" and not the "wallet" API as it relied on getting the result from an error. The feature is now enabled on the "wallet" API too. -**Breaking change** (primarily for sandbox users): There is no need to deploy a lambda contract anymore. The `read` method of the `ContractView` class no longer takes an optional lambda contract address as a parameter. +**Breaking change** (primarily for sandbox users): There is no need to deploy a lambda contract anymore. The `read` method of the `ContractView` class no longer takes an optional lambda contract address as a parameter. Before version 12, when calling the `at` method to instantiate a `Contractabstraction`, a call was made to the RPC to fetch the chain id. The chain id was needed to select the right lambda contract to execute the view. As a performance improvement, we removed this call from the `at` method, removing one call to the RPC on each ContractAbstraction instantiation. The chain id can now be passed as a parameter of the `read` method or it will be fetched when calling this method. @@ -1229,7 +1587,7 @@ The Taquito codebase is doing different calls to the RPC to construct the variou ## @taquito/taquito - Use the LocalForger by default instead of the RpcForger -Before version 12, the default forger set on the `TezosToolkit` was the `RpcForger`. It is important to ensure that the node is trusted when forging with the RPC and users can change the forger implementation by calling the `setForgerProvider` method. +Before version 12, the default forger set on the `TezosToolkit` was the `RpcForger`. It is important to ensure that the node is trusted when forging with the RPC and users can change the forger implementation by calling the `setForgerProvider` method. As the Taquito local forging implementation provided in the `@taquito/local-forger` package has been battle-tested in the past month, we decided to change the default forger configured in the `TezosToolkit` in favor of the local one. @@ -1261,7 +1619,7 @@ await contact.methods.methodName().send(); ## @taquito/taquito - Allow estimating operations using a wallet -The estimate API only worked with a configured signer and not a wallet. It has been fixed to allow estimation of operations using a configured wallet. +The estimate API only worked with a configured signer and not a wallet. It has been fixed to allow estimation of operations using a configured wallet. Note that the wallet account needs to be revealed to conduct any estimate as Taquito has no access to the wallet's public key required to simulate a reveal operation. # Taquito v11.2.0-beta @@ -1432,7 +1790,7 @@ Here is an example where a contract contains a view named `myView`, it can be si ```typescript= const contract = Tezos.contract.at('KT1...'); const res = contract.contractViews.myView(param).executeView({ - viewCaller: 'KT1...' + viewCaller: 'KT1...' }); ``` @@ -1457,7 +1815,7 @@ const p = new Parser(parserOptions); In the release note v11.0.0-beta, there was a note about the following limitation: > Only the 'init' property can be used if you want to originate a contract having a global constant in the storage section of its code. Do not use the `storage` property, which depends on the `Michelson-Encoder`. -> +> > Here is an example: > ```typescript= > const op = await Tezos.contract.originate({ @@ -1524,13 +1882,13 @@ We encourage all developers to update their projects to use version Taquito v11 ### New features - Hangzhou protocol - `@taquito/taquito` - Support for the new operation kind `register_global_constant` on the contract, batch and estimate APIs #1075 -- ``@taquito/local-forging` +- ``@taquito/local-forging` - Support the new types and instructions related to operations-on-timelock #1070 - Support the new `constant` primitive #1077 - Support the new operation kind `register_global_constant` #1077 - Support the new high-level section `view` and the `VIEW` instruction #1074 - `@taquito/michelson-encoder` - Support new types related to operations-on-timelock #1071 -- `@taquito/michel-codec` +- `@taquito/michel-codec` - Support the new types and instruction related to operations-on-timelock #1072 - Support the new high-level section `view` and the `VIEW` instruction #1073 @@ -1567,7 +1925,7 @@ const op = await Tezos.contract.originate({ ## `@taquito/taquito` - Support the new operation kind `register_global_constant` on the contract, batch and estimate APIs -The new manager operation `register_global_constant` has been added to the contract, batch, and estimate APIs. This new operation allows users to register Micheline expressions in a global table of constants. +The new manager operation `register_global_constant` has been added to the contract, batch, and estimate APIs. This new operation allows users to register Micheline expressions in a global table of constants. A `registerGlobalConstant` method is available on the `ContractProvider` class. A `value` representing the Micheline expression to register in its JSON format is required as a parameter. The `registerGlobalConstant` method returns an instance of `RegisterGlobalConstantOperation` containing a `globalConstantHash` member that corresponds to the index(hash) of the newly registered constant. @@ -1582,15 +1940,15 @@ await op.confirmation(); const hash = op.globalConstantHash; // expr... ``` -After registering an expression as a global constant, the occurrences of this expression in a smart contract code can be replaced by its corresponding hash, allowing users to originate larger contracts. More details about the new `global constant` feature and examples using the batch API are available on the following documentation page: https://tezostaquito.io/docs/global_constant - +After registering an expression as a global constant, the occurrences of this expression in a smart contract code can be replaced by its corresponding hash, allowing users to originate larger contracts. More details about the new `global constant` feature and examples using the batch API are available on the following documentation page: https://tezostaquito.io/docs/global_constant + ## `@taquito/michelson-encoder` - Support new types related to operations-on-timelock New tokens (ChestToken and ChestKeyToken) have been implemented in the Michelson-encoder package to support the new types `chest` and `chest_key` and allow data conversion between Michelson and js. ## `@taquito/utils` - Provide utility to verify signatures -Taquito provides a function named `verifySignature` that allows verifying signatures of payloads. The function takes a message, a public key, and a signature as parameters and returns a boolean indicating if the signature matches. +Taquito provides a function named `verifySignature` that allows verifying signatures of payloads. The function takes a message, a public key, and a signature as parameters and returns a boolean indicating if the signature matches. The crypto library [stablelib](https://www.npmjs.com/package/@stablelib/ed25519) is used instead of [libsodium](https://www.npmjs.com/package/libsodium) in order not to drastically increase the bundle size of the `@taquito/utils` package. Here is an example of use: @@ -1607,9 +1965,9 @@ await verifySignature(message, pk, sig); ## `@taquito/rpc` - Support for the RPC endpoint`context/contracts/{contract}/script/normalized` -A new method on the RpcClient named `getNormalizedScript` is available. If global constants are present in the code of a smart contract, `getNormalizedScript` returns the expanded script. In contrast, the global constants are not expanded in the response provided by the `getScript` method. +A new method on the RpcClient named `getNormalizedScript` is available. If global constants are present in the code of a smart contract, `getNormalizedScript` returns the expanded script. In contrast, the global constants are not expanded in the response provided by the `getScript` method. -Internally in Taquito, the usage of `getScript` has been replaced by `getNormalizedScript` to ensure that all script passed to the Michelson-Encoder won't contain global constant because the `Michelson-Encoder` does not support the global constant in this current release (11.0.0-beta). +Internally in Taquito, the usage of `getScript` has been replaced by `getNormalizedScript` to ensure that all script passed to the Michelson-Encoder won't contain global constant because the `Michelson-Encoder` does not support the global constant in this current release (11.0.0-beta). ## Preliminary support for Idiazabalnet protocol @@ -1628,7 +1986,7 @@ If you have feature or issue requests, please create an issue on http://github.c # Taquito v10.2.1-beta - Updated beacon-sdk to version 2.3.5: https://github.com/airgap-it/beacon-sdk/releases/tag/v2.3.5 -- RpcClientCache - Store the Promises instead of the resolved values in the cache: +- RpcClientCache - Store the Promises instead of the resolved values in the cache: When requests were done in parallel to the same RPC endpoint, they were not hitting the cache. This is solved by storing the promise in the cache as soon as the first request is made. If another request tries to reach the same URL, during the configured TTL, the cached promise is returned. More details can be found here: https://github.com/ecadlabs/taquito/discussions/916 # Taquito v10.2.0-beta @@ -1647,7 +2005,7 @@ More details can be found here: https://github.com/ecadlabs/taquito/discussions/ ## @taquito/contract-library - Ability to bundle smart-contract scripts and entrypoints for ContractAbstration instantiation -A new package named `@taquito/contract-library` has been added to the Taquito library. +A new package named `@taquito/contract-library` has been added to the Taquito library. To improve (d)App performance, we aim to provide ways to reduce the number of calls made by Taquito to the RPC. The `@taquito/contracts-library` package allows developers to embed the smart-contract scripts into the application, preventing Taquito from loading this data from the RPC for every user. @@ -1820,7 +2178,7 @@ A fix has been made to change the behavior of the `PollingSubscribeProvider`, wh ### Enhancements -- **Breaking changes** - @taquito/michelson-encoder - Improvement to the `Schema.ExtractSchema()` method #960 and #933 +- **Breaking changes** - @taquito/michelson-encoder - Improvement to the `Schema.ExtractSchema()` method #960 and #933 @@ -1837,7 +2195,7 @@ The support for the new `liquidity_baking_escape_ema` and `implicit_operations_r ## @taquito/taquito - Drain an unrevealed account -Since v9.1.0-beta, the fees associated with a reveal operation are estimated using the RPC instead of using the old 1420 default value. When draining an unrevealed account, the fees associated with the reveal operation needs to be subtracted from the initial balance (as well as the fees related to the actual transaction operation). The reveal fee has changed from 1420 to 374 (based on the simulation using the RPC). However, the constants file was still using the 1420 value, leading to a remaining amount of 1046 in the account when trying to empty it. The default value has been adjusted on the constants file to match this change. +Since v9.1.0-beta, the fees associated with a reveal operation are estimated using the RPC instead of using the old 1420 default value. When draining an unrevealed account, the fees associated with the reveal operation needs to be subtracted from the initial balance (as well as the fees related to the actual transaction operation). The reveal fee has changed from 1420 to 374 (based on the simulation using the RPC). However, the constants file was still using the 1420 value, leading to a remaining amount of 1046 in the account when trying to empty it. The default value has been adjusted on the constants file to match this change. ## @taquito/rpc - Type ContractBigMapDiffItem has BigNumber's but values are string's @@ -1947,7 +2305,7 @@ println(JSON.stringify(extractSchema, null, 2)); Based on the information returned by the `ExtractSchema` method, the storage can be writen as follow: ```typescript= const bigMap = new MichelsonMap(); -bigMap.set('tz1...', { // address +bigMap.set('tz1...', { // address 0: 'tz1...', // address 1:10 // nat }); @@ -1992,7 +2350,7 @@ If you have feature or issue requests, please create an issue on http://github.c ## @taquito/michelson-encoder - Accept bytes in Uint8Array -The only format accepted in the Michelson-encoder for the type bytes was the hexadecimal string. We added support for the type Uint8Array. It is now possible to call an entry point or originate a contract using a Uint8Array or a hexadecimal string. +The only format accepted in the Michelson-encoder for the type bytes was the hexadecimal string. We added support for the type Uint8Array. It is now possible to call an entry point or originate a contract using a Uint8Array or a hexadecimal string. ## @taquito/http-utils - Make http requests cancelable @@ -2005,7 +2363,7 @@ The `bls12_381_fr`, `bls12_381_g1`, and `bls12_381_g2` tokens were missing in th ## @taquito/michelson-encoder - Added sapling_state and sapling_transaction tokens -The `sapling_state` and `sapling_transaction` tokens were missing in the Michelson-Encoder since the Edo protocol and have been added. +The `sapling_state` and `sapling_transaction` tokens were missing in the Michelson-Encoder since the Edo protocol and have been added. Note that no additional abstractions or ability to decrypt Sapling transactions have been implemented so far. @@ -2117,7 +2475,7 @@ If you have feature or issue requests, please create an issue on http://github.c ### Enhancements - Florence compatibility support -- Allows fetching big map with a key of type string, number, or object. +- Allows fetching big map with a key of type string, number, or object. - Accept an operator for the retry strategy of the `ObservableSubscription` class - Updated beacon-sdk version to v2.2.5 which includes several performance improvements for p2p pairing. @@ -2129,7 +2487,7 @@ If you have feature or issue requests, please create an issue on http://github.c This version ships with official support for the new Florence protocol which will come into effect on Mainnet in May. -## @taquito/taquito - Allows fetching big map with a key of type string, number, or object. +## @taquito/taquito - Allows fetching big map with a key of type string, number, or object. In the precedent versions, fetching a value in a big map required the parameter to be a string, even in such cases when the key of the big map was a number. The `get` and `getMultipleValues` methods of the `BigMapAbstraction` and `getBigMapKeyByID` and `getBigMapKeysByID` methods of the `RpcContractProvider` class now accept a string, a number or an object for the key we want to fetch. @@ -2220,9 +2578,9 @@ A note on how to use the Kukai wallet for testing on Edonet has been added to th ### Documentation updates -- [Tickets](https://tezostaquito.io/docs/tickets) +- [Tickets](https://tezostaquito.io/docs/tickets) - [Local pack/unpack, including bigmaps.](https://tezostaquito.io/docs/maps_bigmaps#local-packing-for-big-maps) -- Rename Thanos to Temple wallet. +- Rename Thanos to Temple wallet. - Build time pre-requisites for Taquito. - Documentation website examples now uses the edonet testnet @@ -2238,7 +2596,7 @@ This feature is _opt-in_, meaning that the Taquito user must enable it to benefi Developers can now test and evaluate new features and bug fixes as soon as possible without having to clone and locally link Taquito. Preview builds are published to our npm preview registry from all pull requests (except PR's from forks). -IMPORTANT NOTE: Preview builds are not official releases. They are helpful for testing and evaluating new features in Taquito. Preview builds may contain incomplete features or features that have not been fully tested. +IMPORTANT NOTE: Preview builds are not official releases. They are helpful for testing and evaluating new features in Taquito. Preview builds may contain incomplete features or features that have not been fully tested. ## Fetch multiple bigmaps at once. @@ -2258,21 +2616,21 @@ v8.1 supports Florence net. All the Taquito integration tests are run against th ## Documentation Additions and Improvments -Documentation on the Taquito website continues to grow and be refined. Developers can now read docs explaining what tickets are, their use cases, and example code reading tickets with various data values. +Documentation on the Taquito website continues to grow and be refined. Developers can now read docs explaining what tickets are, their use cases, and example code reading tickets with various data values. -Live code examples on the website now use Edonet. +Live code examples on the website now use Edonet. CodeBlock and Playground folders, along with contracts that work with live code, now rely on the Edonet testnet. -For enabling local pack (MichelCodecPacker()) for big map values, there are now instructions and documentation about the benefits of doing so. +For enabling local pack (MichelCodecPacker()) for big map values, there are now instructions and documentation about the benefits of doing so. -Developers can now opt in to use Taquito's local pack implementation when fetching Big Map values. This feature makes fetching Big Map values 50% faster. Big Map keys need to be serialized or PACK'ed, and Taquito relied on the Tezos PACK RPC to PACK the bigmap keys. +Developers can now opt in to use Taquito's local pack implementation when fetching Big Map values. This feature makes fetching Big Map values 50% faster. Big Map keys need to be serialized or PACK'ed, and Taquito relied on the Tezos PACK RPC to PACK the bigmap keys. -By relying on the local pack implementation, we eliminate one RPC roundtrip when fetching Big Map Values. To enable this feature, developers must call the `tezos. setPackerProvider(new MichelCodecPacker());` on the program's TezosToolkit instance. +By relying on the local pack implementation, we eliminate one RPC roundtrip when fetching Big Map Values. To enable this feature, developers must call the `tezos. setPackerProvider(new MichelCodecPacker());` on the program's TezosToolkit instance. -## Website now uses Netlify +## Website now uses Netlify -Netlify provides the deployment/hosting of the Taquito website. The primary motivation is so that we get full preview deployments of the website from PRs. +Netlify provides the deployment/hosting of the Taquito website. The primary motivation is so that we get full preview deployments of the website from PRs. ## More RPC endpoints added to Taquito @@ -2290,7 +2648,7 @@ We will soon be working on integrating Florence, the next Tezos protocol update Developer Experience is our high-priority item, and we have improvements in our backlog that we plan to start work. We are improving the `michelson-encoder implementation to open the door for Type generation from contracts and to provide easier discoverability of what parameters endpoints and initial storage take. Stay tuned! -We have a good practice of Continuous Delivery in Taquito, but we plan to take this to the next level. Stay tuned! +We have a good practice of Continuous Delivery in Taquito, but we plan to take this to the next level. Stay tuned! If you have feature or issue requests, please create an issue on http://github.com/ecadlabs/taquito/issues or join us on the Taquito community support channel on Telegram https://t.me/tezostaquito diff --git a/website/versioned_docs/version-17.0.0/wallet_API.md b/website/versioned_docs/version-17.5.0/wallet_API.md similarity index 86% rename from website/versioned_docs/version-17.0.0/wallet_API.md rename to website/versioned_docs/version-17.5.0/wallet_API.md index 660ac19bb2..8ee9ab6412 100644 --- a/website/versioned_docs/version-17.0.0/wallet_API.md +++ b/website/versioned_docs/version-17.5.0/wallet_API.md @@ -1,40 +1,37 @@ --- title: Wallet API +id: wallet_API author: Claude Barde --- ## What is the Wallet API? -The Tezos blockchain is a fantastic tool, but it is self-contained. Except for the transactions you send to it, it has no interaction with the outside world. However, it would be amazing to interact with it, such as making payments, reading the balance of an account, or recording data in a smart contract. This interaction is what the Wallet API (and Taquito in general) achieves. The Wallet API provides a new yet familiar way to interact with the blockchain and smart contracts by delegating several actions that Taquito previously handled to the wallets. This delegation offers more flexibility for both developers and users and gives the ecosystem more space to evolve. +You have learned how to use Taquito to interact with the Tezos blockchain. Up to this document, we used a signer to sign operations. Interactive dApps (short for "decentralized Apps") commonly use a wallet to sign operations. The Wallet API provides a new yet familiar way to interact with the blockchain and smart contracts by delegating several actions that Taquito previously handled to the wallets. This delegation offers more flexibility for both developers and users and gives the ecosystem more space to evolve. From a user's perspective, the workflow is as follows: -## Installing the Wallet API - -The first thing to do is to use the wallet API is to install it. You just need to install the Taquito package to use the wallet API: +1. The user has a wallet installed and configured on their device. (Or they might be using a web-based wallet) +2. The user visits a dApp. +3. The user takes action to interact with the dApp. +4. The dApp asks the user to connect their wallet. +5. The user selects their wallet. +6. The wallet asks the user to confirm the connection. +7. When the dApp wants to send an operation, it asks the wallet to sign it. This might need additional confirmation from the user. +8. There are two possibilities here: + 1. The wallet signs the operation and sends (injects) it to the blockchain. + 2. The wallet sends the signed operation to the dApp, and the dApp sends it to the network. +9. The dApp can now wait for the operation to be confirmed. -``` -npm install @taquito/taquito +The main benefit of this workflow is that the user does not have to trust a dApp with their private key. The private key never leaves the wallet. -``` - -or - -``` -yarn add @taquito/taquito - -``` - -Make sure you have the latest version (`7.1.0` when this article was written, but the API became available from `6.3.2-beta.0`). +## Installing the Wallet API -Once the package is downloaded, you can install the wallet of your choice. The wallet API supports different kinds of wallets. The _Beacon_ and _Temple_ wallets are available to use at the moment. You can install one or both wallets, depending on your requirements: +The first thing to do is to use the wallet API is to install it. You just need to install the Taquito package to use the wallet API: ``` -npm install @taquito/beacon-wallet - -npm install @temple-wallet/dapp - +npm install @taquito/taquito @taquito/beacon-wallet @temple-wallet/dapp ``` -Remember that some wallets may require an extra step in addition to the package installation. For example, Temple must be used with an extension installed in the browser. We will explain the requirements for the different wallets in detail in the sections below. +A separate step from setting up the wallet in the dApp code as a developer is to set up the wallet as the user. This step is different for each wallet (e.g., Temple needs the user to install a browser extension). Some wallets are browser extensions, while others are mobile apps or web wallets. +We will explain the requirements for the different wallets in detail in the sections below. ## Connecting the wallet @@ -66,7 +63,7 @@ Then, you can start initializing the wallet: const options = { name: 'MyAwesomeDapp', iconUrl: 'https://tezostaquito.io/img/favicon.svg', - preferredNetwork: 'ghostnet', + network: { type: 'ghostnet' }, eventHandlers: { PERMISSION_REQUEST_SUCCESS: { handler: async (data) => { @@ -78,20 +75,23 @@ const options = { 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. 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 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). -> Note: if you want to use the Kukai wallet for testing on ghostnet, you must use the optional property `preferredNetwork` and set it to `ghostnet`, otherwise the mainnet version of the Kukai wallet will open. +> 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: ```js -await wallet.requestPermissions({ - network: { - type: 'mainnet' | 'ghostnet' | 'jakartanet' | 'custom', - }, -}); +// TODO: subscribe to events, more information below +await wallet.requestPermissions(); ``` +:::note Subscribe to Events to be notified of changes in the wallet +Please check out the section [Subscribing to events](#subscribing-to-events) to learn how to subscribe to events and be notified of changes in the wallet. +::: + +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: ```js @@ -120,13 +120,29 @@ Make sure you have the Beacon browser extension installed (the extension offers // const wallet = new BeaconWallet(options); wallet - .requestPermissions({ network: { type: 'ghostnet' } }) + .requestPermissions() .then((_) => wallet.getPKH()) .then((address) => println(`Your address: ${address}`)); Tezos.setWalletProvider(wallet); ``` +### Subscribing to events + +While your dApp is connected to the wallet, different events can happen on the wallet side. A reactive dApp can subscribe to these events and update the UI to create a good user experience. +The different types of events are defined in the type `BeaconEvent` that can be imported from `"@airgap/beacon-sdk"`. Some of the events are: `ACTIVE_ACCOUNT_SET`, `PAIR_SUCCESS`, `SIGN_REQUEST_SUCCESS`. +To see all possible events, please check out the [BeaconEvent in Beacon SDK documentation](https://typedocs.walletbeacon.io/enums/beaconevent.html). + +You can subscribe to any of these events as follows: + +```ts +await wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => { + // logic to update the active account in your dApp's UI + console.log(data.address); +}); +await wallet.requestPermissions(); +``` + ### - Development wallets During the development of your dapp, you may prefer a less "user-friendly" option that gives you more information and details than a more user-friendly wallet. You may also want to install and set up a wallet quickly that requires less boilerplate than the Beacon SDK. In these cases, use the Temple Wallet (for a quick setup using the Temple wallet extension). @@ -197,12 +213,12 @@ Tezos.setProvider({ wallet }); //import { TempleWallet } from '@temple-wallet/dapp'; TempleWallet.isAvailable() .then(() => { - const mywallet = new TempleWallet('MyAwesomeDapp'); - mywallet + const myWallet = new TempleWallet('MyAwesomeDapp'); + myWallet .connect('ghostnet') .then(() => { - Tezos.setWalletProvider(mywallet); - return mywallet.getPKH(); + Tezos.setWalletProvider(myWallet); + return myWallet.getPKH(); }) .then((pkh) => { println(`Your address: ${pkh}`); @@ -257,7 +273,7 @@ Transactions to smart contracts operate in the same fashion as transactions to a ## Calling a smart contract -Sending a transaction to a smart contract to update its storage will be a different type of action as it implies targetting a specific entrypoint and formatting correctly the data to be sent. +Sending a transaction to a smart contract to update its storage will be a different type of action as it implies targeting a specific entrypoint and formatting correctly the data to be sent. Fortunately, Taquito will make this operation go like a breeze! First, you need the contract abstraction created with the address of the smart contract you are targeting: @@ -721,7 +737,7 @@ const op = await Tezos.wallet.transfer({ to: 'tz1...', amount: 2 }).send(); await op.confirmation(); ``` -If you want to send a transaction to a contract, the process is very similar with the addition of the `parameter` property that must point to the entrypoint you are targetting and the value you want to pass: +If you want to send a transaction to a contract, the process is very similar with the addition of the `parameter` property that must point to the entrypoint you are targeting and the value you want to pass: ```js const op = await Tezos.wallet diff --git a/website/versioned_docs/version-17.0.0/wallets.md b/website/versioned_docs/version-17.5.0/wallets.md similarity index 100% rename from website/versioned_docs/version-17.0.0/wallets.md rename to website/versioned_docs/version-17.5.0/wallets.md diff --git a/website/versioned_docs/version-17.0.0/web3js_taquito.md b/website/versioned_docs/version-17.5.0/web3js_taquito.md similarity index 99% rename from website/versioned_docs/version-17.0.0/web3js_taquito.md rename to website/versioned_docs/version-17.5.0/web3js_taquito.md index 607625b365..f875578218 100644 --- a/website/versioned_docs/version-17.0.0/web3js_taquito.md +++ b/website/versioned_docs/version-17.5.0/web3js_taquito.md @@ -1,5 +1,5 @@ --- -title: Web3js/Taquito differences +title: web3js vs Taquito id: web3js_taquito author: Claude Barde --- diff --git a/website/versioned_sidebars/version-17.0.0-sidebars.json b/website/versioned_sidebars/version-17.5.0-sidebars.json similarity index 56% rename from website/versioned_sidebars/version-17.0.0-sidebars.json rename to website/versioned_sidebars/version-17.5.0-sidebars.json index da89ec9910..853cfb78a0 100644 --- a/website/versioned_sidebars/version-17.0.0-sidebars.json +++ b/website/versioned_sidebars/version-17.5.0-sidebars.json @@ -8,58 +8,109 @@ "collapsible": false, "items": [ "quick_start", - "react-template", - "amendment_and_voting", - "batch_API", - "ballot", - "beaconwallet-singleton", - "confirmation_event_stream", + "operation_flow", + "rpc_nodes", + "web3js_taquito", + "chatbot" + ] + }, + { + "type": "category", + "label": "Taquito Providers", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "prepare", + "estimate" + ] + }, + { + "type": "category", + "label": "Operations", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "making_transfers", + "originate", "consensus_key", - "contract_call_parameters", - "set_delegate", - "dapp_prelaunch", - "estimate", - "subscribe_event", - "fa2_parameters", "global_constant", "increase_paid_storage", - "lambda_view", - "liquidity_baking", - "local_forger", + "set_delegate", + "smart_rollups", + "proposal_and_ballot", + "failing_noop" + ] + }, + { + "type": "category", + "label": "Smart Contracts", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "smartcontracts", + "contract_call_parameters", + "fa2_parameters", "manager_lambda", + "multisig_doc" + ] + }, + { + "type": "category", + "label": "Wallets", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "beaconwallet-singleton", + "wallets", + "transaction_limits" + ] + }, + { + "type": "category", + "label": "Michelson", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ "maps_bigmaps", "michelsonmap", - "multisig_doc", - "on_chain_views", - "originate", - "prepare", - "rpc_nodes", - "rpc_package", - "signing", - "smartcontracts", - "contracts_collection", - "tezos_domains", - "tickets", - "transaction_limits", - "making_transfers", - "tutorial_links", + "tickets" + ] + }, + { + "type": "category", + "label": "Views", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "lambda_view", + "on_chain_views" + ] + }, + { + "type": "category", + "label": "Contract and Token Metadata", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ "tzip12", - "metadata-tzip16", - "validators", - "wallet_API", - "wallets", - "web3js_taquito", - "subscribe_event", - "smart_rollups" + "metadata-tzip16" ] }, { "type": "category", - "label": "Signer", + "label": "Signers", "className": "sidebarHeader", "collapsed": false, "collapsible": false, "items": [ + "signing", "inmemory_signer", "ledger_signer" ] @@ -71,14 +122,15 @@ "collapsed": false, "collapsible": false, "items": [ + "rpc_package", "michelson_encoder", "contracts-library", "taquito_utils", { "type": "category", "label": "Sapling", - "collapsed": true, - "collapsible": true, + "collapsed": false, + "collapsible": false, "items": [ "sapling", "sapling_in_memory_spending_key", @@ -89,24 +141,19 @@ }, { "type": "category", - "label": "Optimistic Rollups", - "className": "sidebarHeader", - "collapsed": false, - "collapsible": false, - "items": [ - "tx_rollups" - ] - }, - { - "type": "category", - "label": "Advanced Examples", + "label": "Advanced Scenarios", "className": "sidebarHeader", "collapsed": false, "collapsible": false, "items": [ + "ophash_before_injecting", + "drain_account", "complex_parameters", + "confirmation_event_stream", + "subscribe_event", + "liquidity_baking", "storage_annotations", - "drain_account" + "tezos_domains" ] }, { @@ -134,17 +181,36 @@ }, { "type": "category", - "label": "Native Mobile Development", + "label": "Dapp Development", "className": "sidebarHeader", "collapsed": false, "collapsible": false, "items": [ - "mobile_bundle" + "mobile_bundle", + "dapp_template", + "dapp_prelaunch" ] }, { - "Upgrading Guide": [ - "upgrading_guide" + "type": "category", + "label": "Taquito Public API", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "wallet_API", + "batch_API" + ] + }, + { + "type": "category", + "label": "Misc", + "className": "sidebarHeader", + "collapsed": false, + "collapsible": false, + "items": [ + "tutorial_links", + "contracts_collection" ] }, { diff --git a/website/versions.json b/website/versions.json index 23c77a3dd3..2f7a18ca1b 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,7 +1,7 @@ [ + "17.5.0", "17.4.0", "17.3.0", "17.2.0", - "17.1.0", - "17.0.0" + "17.1.0" ]