From 1b4e1de75132371d1de4a8508c65d43944039010 Mon Sep 17 00:00:00 2001 From: hui-an-yang <106410553+hui-an-yang@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:57:51 -0800 Subject: [PATCH 1/2] Support node18 (#3098) * chore: support node v18 again due to http bug in v19 * chore: fixing ci run fails with package-lock.json * ci: npm audit fix website/package-lock.json * chore: fix some typos in comment (#3094) Signed-off-by: deterclosed * chore(releng) bump version to 20.1.2 --------- Signed-off-by: deterclosed Co-authored-by: deterclosed <164524498+deterclosed@users.noreply.github.com> --- .github/workflows/bundle_webpack.yml | 2 +- .github/workflows/deploy_edge.yml | 2 +- .github/workflows/deploy_test_dapp.yml | 2 +- .github/workflows/main.yml | 7 +- .github/workflows/mondaynet.yml | 2 +- .nvmrc | 2 +- README.md | 2 +- apps/taquito-test-dapp/package.json | 12 +- docs/contract-test-collection.md | 2 +- docs/version.md | 10 + example/package.json | 22 +- integration-tests/data/metadataViews.ts | 2 +- .../data/smartpy-example-contract.ts | 2 +- integration-tests/package.json | 30 +- lerna.json | 2 +- package-lock.json | 320 +++++++++--------- package.json | 2 +- packages/taquito-beacon-wallet/package.json | 10 +- packages/taquito-beacon-wallet/src/errors.ts | 2 +- packages/taquito-beacon-wallet/src/version.ts | 4 +- .../taquito-contracts-library/package.json | 14 +- .../taquito-contracts-library/src/version.ts | 4 +- packages/taquito-core/package.json | 5 +- packages/taquito-core/src/version.ts | 4 +- packages/taquito-http-utils/package.json | 8 +- packages/taquito-http-utils/src/version.ts | 4 +- packages/taquito-ledger-signer/package.json | 12 +- packages/taquito-ledger-signer/src/version.ts | 4 +- packages/taquito-local-forging/package.json | 12 +- packages/taquito-local-forging/src/version.ts | 4 +- .../pack-test-tool/package.json | 4 +- packages/taquito-michel-codec/package.json | 8 +- packages/taquito-michel-codec/src/version.ts | 4 +- .../taquito-michelson-encoder/package.json | 12 +- .../taquito-michelson-encoder/src/version.ts | 4 +- packages/taquito-remote-signer/package.json | 14 +- packages/taquito-remote-signer/src/version.ts | 4 +- packages/taquito-rpc/package.json | 12 +- packages/taquito-rpc/src/version.ts | 4 +- packages/taquito-sapling/package.json | 14 +- packages/taquito-sapling/src/version.ts | 4 +- packages/taquito-signer/package.json | 12 +- packages/taquito-signer/src/version.ts | 4 +- packages/taquito-timelock/package.json | 12 +- packages/taquito-timelock/src/version.ts | 4 +- packages/taquito-tzip12/package.json | 14 +- packages/taquito-tzip12/src/version.ts | 4 +- packages/taquito-tzip16/package.json | 18 +- packages/taquito-tzip16/src/version.ts | 4 +- packages/taquito-utils/package.json | 8 +- packages/taquito-utils/src/version.ts | 4 +- packages/taquito-wallet-connect/package.json | 8 +- .../taquito-wallet-connect/src/version.ts | 4 +- packages/taquito/package.json | 20 +- packages/taquito/src/version.ts | 4 +- website/package-lock.json | 171 +++++----- website/package.json | 2 +- 57 files changed, 459 insertions(+), 428 deletions(-) diff --git a/.github/workflows/bundle_webpack.yml b/.github/workflows/bundle_webpack.yml index db356dea86..fcb196a8b7 100644 --- a/.github/workflows/bundle_webpack.yml +++ b/.github/workflows/bundle_webpack.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: lts/iron + node-version: lts/Hydrogen - run: npm ci - run: npm run build - run: npm -w packages/taquito-local-forging run build-webpack diff --git a/.github/workflows/deploy_edge.yml b/.github/workflows/deploy_edge.yml index e3e6a6d042..519b3ea238 100644 --- a/.github/workflows/deploy_edge.yml +++ b/.github/workflows/deploy_edge.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: lts/iron + node-version: lts/Hydrogen - run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - run: echo "PACKAGE_VERSION=`node -p "require('./packages/taquito/package.json').version"`" >> $GITHUB_ENV - run: echo "BRANCH_NAME=$(git branch --show-current)" >> $GITHUB_ENV diff --git a/.github/workflows/deploy_test_dapp.yml b/.github/workflows/deploy_test_dapp.yml index a5efa81242..5ccd26037d 100644 --- a/.github/workflows/deploy_test_dapp.yml +++ b/.github/workflows/deploy_test_dapp.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: lts/iron + node-version: lts/Hydrogen - run: npm ci - run: npm run build - run: npm -w taquito-test-dapp-vite run build diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f1b8ddde52..a4eb9faefd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,8 +17,9 @@ jobs: fail-fast: false matrix: node: - - 'lts/iron' - - '22' + - 'lts/Hydrogen' + - 'lts/Iron' + - 'lts/Jod' steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -49,7 +50,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: lts/iron + node-version: lts/Hydrogen - run: npm ci - run: npm run build - if: ${{ !github.event.pull_request.head.repo.fork }} diff --git a/.github/workflows/mondaynet.yml b/.github/workflows/mondaynet.yml index e6aa73a46b..65fdc9d0a3 100644 --- a/.github/workflows/mondaynet.yml +++ b/.github/workflows/mondaynet.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: lts/iron + node-version: lts/Hydrogen - run: npm ci - run: npm run build - id: originate-contracts-mondaynet diff --git a/.nvmrc b/.nvmrc index 85aee5a534..0828ab7947 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20 \ No newline at end of file +v18 \ No newline at end of file diff --git a/README.md b/README.md index 925bf2ce0a..41ce326b95 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Taquito currently supports the following versions of Node.js®: | ---------------- | ---------- | | v14 LTS | ❌ | | v16 LTS/Gallium | ❌ | -| v18 LTS/Hydrogen | ❌ | +| v18 LTS/Hydrogen | ✅ | | v20 LTS/Iron | ✅ | | v22 | ✅ | diff --git a/apps/taquito-test-dapp/package.json b/apps/taquito-test-dapp/package.json index 3fc4c2ea32..39954dc2ad 100644 --- a/apps/taquito-test-dapp/package.json +++ b/apps/taquito-test-dapp/package.json @@ -1,7 +1,7 @@ { "name": "taquito-test-dapp-vite", "private": true, - "version": "20.1.1", + "version": "20.1.2", "type": "module", "scripts": { "dev": "vite", @@ -26,11 +26,11 @@ "dependencies": { "@airgap/beacon-sdk": "^4.3.1", "@airgap/beacon-types": "^4.3.1", - "@taquito/beacon-wallet": "^20.1.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", - "@taquito/wallet-connect": "^20.1.1", + "@taquito/beacon-wallet": "^20.1.2", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", + "@taquito/wallet-connect": "^20.1.2", "buffer": "^6.0.3", "svelte-modals": "^2.0.0-beta.2", "svelte-select": "^5.8.3", diff --git a/docs/contract-test-collection.md b/docs/contract-test-collection.md index 2043138481..4a332a12f5 100644 --- a/docs/contract-test-collection.md +++ b/docs/contract-test-collection.md @@ -1367,7 +1367,7 @@ license: MIT Transactions to smart contracts operate in the same fashion as transactions to an implicit account, the only difference being the `KT1...` address. You will also receive a transaction hash and have to wait for the transaction to be confirmed. Once confirmed, it can be the right time to update the user's/contract's balance, for example. -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: diff --git a/docs/version.md b/docs/version.md index cbab28893a..595e8f2224 100644 --- a/docs/version.md +++ b/docs/version.md @@ -3,6 +3,16 @@ title: Versions author: Jev Bjorsell --- +# Taquito v20.1.2 +## Summary + +### Node.js add support of v18 +There is a [node.js confirmed HTTP bug](https://github.com/nodejs/node/issues/47228) from v19 that occasionally causes HTTP requests to fail with a socket hang-up error. +We decided to support node.js v18 again until this issue is resolved in the future node.js release #3098 + +### Documentation +Fixing typo #3094 + # Taquito v20.1.1 ## Summary diff --git a/example/package.json b/example/package.json index e40ab78994..0c852d77f0 100644 --- a/example/package.json +++ b/example/package.json @@ -1,7 +1,7 @@ { "name": "@taquito/example", "private": true, - "version": "20.1.1", + "version": "20.1.2", "scripts": { "example": "node -r ts-node/register --preserve-symlinks example-node.ts", "example:activation": "node -r ts-node/register --preserve-symlinks example-activate.ts", @@ -42,16 +42,16 @@ }, "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.29.5", - "@taquito/ledger-signer": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/sapling": "^20.1.1", - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip16": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/ledger-signer": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/sapling": "^20.1.2", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip16": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/integration-tests/data/metadataViews.ts b/integration-tests/data/metadataViews.ts index 6f084448a8..791061b87a 100644 --- a/integration-tests/data/metadataViews.ts +++ b/integration-tests/data/metadataViews.ts @@ -349,7 +349,7 @@ export const metadataViewsExample2 = { }, code: [ { prim: 'CAR', args: [], annots: [] } ], annotations: [ - { name: '%arg_zero', description: 'This is obvioulsy ignored.' }, + { name: '%arg_zero', description: 'This is obviously ignored.' }, { name: '%arg_one', description: 'This is also ignored, but different.' }, { name: '%arg_one_result', description: 'This is %arg_one on the resulting side.' }, { diff --git a/integration-tests/data/smartpy-example-contract.ts b/integration-tests/data/smartpy-example-contract.ts index 6b4f822cd8..cfed1f6211 100644 --- a/integration-tests/data/smartpy-example-contract.ts +++ b/integration-tests/data/smartpy-example-contract.ts @@ -1,4 +1,4 @@ -// This contract code has storage,parameter,code but the Tezos RPC expects parmeter,code,storage +// This contract code has storage,parameter,code but the Tezos RPC expects parameter,code,storage export const smartpySample = [{"prim":"storage","args":[ {"prim":"nat"}] }, diff --git a/integration-tests/package.json b/integration-tests/package.json index c74519455c..dbe3540fa9 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -13,26 +13,26 @@ "originate-known-contracts": "node -r ts-node/register originate-known-contracts.ts", "originate-known-contracts-and-run-test": "node -r ts-node/register originate-known-contracts.ts && jest" }, - "version": "20.1.1", + "version": "20.1.2", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.1", - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/remote-signer": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/sapling": "^20.1.1", - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip12": "^20.1.1", - "@taquito/tzip16": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/contracts-library": "^20.1.2", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/remote-signer": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/sapling": "^20.1.2", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip12": "^20.1.2", + "@taquito/tzip16": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" diff --git a/lerna.json b/lerna.json index f945f1067e..4c2fc6e966 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "useNx": true, - "version": "20.1.1" + "version": "20.1.2" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 357b53b751..fe1f21cd1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", "@types/mocha": "^10.0.7", - "@types/node": "^22", + "@types/node": "^18", "@types/typedarray-to-buffer": "^4.0.4", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -56,15 +56,15 @@ }, "apps/taquito-test-dapp": { "name": "taquito-test-dapp-vite", - "version": "20.1.1", + "version": "20.1.2", "dependencies": { "@airgap/beacon-sdk": "^4.3.1", "@airgap/beacon-types": "^4.3.1", - "@taquito/beacon-wallet": "^20.1.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", - "@taquito/wallet-connect": "^20.1.1", + "@taquito/beacon-wallet": "^20.1.2", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", + "@taquito/wallet-connect": "^20.1.2", "buffer": "^6.0.3", "svelte-modals": "^2.0.0-beta.2", "svelte-select": "^5.8.3", @@ -111,19 +111,19 @@ }, "example": { "name": "@taquito/example", - "version": "20.1.1", + "version": "20.1.2", "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.29.5", - "@taquito/ledger-signer": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/sapling": "^20.1.1", - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip16": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/ledger-signer": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/sapling": "^20.1.2", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip16": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -132,26 +132,26 @@ } }, "integration-tests": { - "version": "20.1.1", + "version": "20.1.2", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.1", - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/remote-signer": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/sapling": "^20.1.1", - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip12": "^20.1.1", - "@taquito/tzip16": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/contracts-library": "^20.1.2", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/remote-signer": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/sapling": "^20.1.2", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip12": "^20.1.2", + "@taquito/tzip16": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" @@ -172,6 +172,16 @@ "typescript": "~5.5.4" } }, + "integration-tests/node_modules/@types/node": { + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, "node_modules/@airgap/beacon-blockchain-substrate": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.3.1.tgz", @@ -8060,12 +8070,12 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.0.tgz", - "integrity": "sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw==", + "version": "18.19.68", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.68.tgz", + "integrity": "sha512-QGtpFH1vB99ZmTa63K4/FU8twThj4fuVSBkGddTp7uIL/cuoLWIUSL2RcOaigBhfR+hg5pgGkBnkoOxrTVBMKw==", "license": "MIT", "dependencies": { - "undici-types": "~6.11.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/node-fetch": { @@ -8089,6 +8099,12 @@ "@types/node": "*" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", @@ -21339,9 +21355,9 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -27195,9 +27211,10 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, "license": "MIT" }, "node_modules/unenv": { @@ -28494,17 +28511,17 @@ }, "packages/taquito": { "name": "@taquito/taquito", - "version": "20.1.1", + "version": "20.1.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -28513,7 +28530,7 @@ "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "buffer": "^6.0.3", @@ -28547,25 +28564,25 @@ "webpack-subresource-integrity": "^5.1.0" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.3.1", "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", "@testing-library/react": "^16.0.1" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.269", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -28594,7 +28611,7 @@ "webpack-cli": "^5.1.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-beacon-wallet/node_modules/@types/chrome": { @@ -28610,19 +28627,19 @@ }, "packages/taquito-contracts-library": { "name": "@taquito/contracts-library", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/superagent": "^8.1.8", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -28648,37 +28665,38 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-core": { "name": "@taquito/core", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" }, "devDependencies": { "@types/json-stringify-safe": "^5.0.3", + "@types/node": "^18", "rollup": "^4.22.4", "rollup-plugin-typescript2": "^0.36.0" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", + "@taquito/core": "^20.1.2", "node-fetch": "^2.7.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/node-fetch": "^2.6.11", "@types/superagent": "^8.1.8", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -28705,7 +28723,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-http-utils/node_modules/node-fetch": { @@ -28730,20 +28748,20 @@ }, "packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "buffer": "^6.0.3" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -28769,7 +28787,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-ledger-signer/node_modules/buffer": { @@ -28798,19 +28816,19 @@ }, "packages/taquito-local-forging": { "name": "@taquito/local-forging", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.1", + "@taquito/rpc": "^20.1.2", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -28839,20 +28857,20 @@ "webpack-cli": "^5.1.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1" + "@taquito/core": "^20.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", @@ -28872,32 +28890,32 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-michel-codec/pack-test-tool": { - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.1.1", + "@taquito/rpc": "^20.1.2", "yargs": "^17.7.2" } }, "packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -28922,26 +28940,26 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -28967,23 +28985,23 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -29008,22 +29026,22 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "20.1.1", + "version": "20.1.2", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -29034,7 +29052,7 @@ "devDependencies": { "@rollup/plugin-json": "^6.1.0", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pbkdf2": "^3.1.2", "@types/typedarray-to-buffer": "^4.0.4", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -29059,7 +29077,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-sapling/node_modules/node-fetch": { @@ -29084,7 +29102,7 @@ }, "packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -29093,9 +29111,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", @@ -29106,7 +29124,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pbkdf2": "^3.1.2", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -29133,12 +29151,12 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-timelock": { "name": "@taquito/timelock", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -29146,10 +29164,10 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", - "@types/node": "^22.0.0", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", @@ -29174,23 +29192,23 @@ "typescript": "^5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip16": "^20.1.1" + "@taquito/core": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip16": "^20.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -29216,20 +29234,20 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -29237,7 +29255,7 @@ "@types/bluebird": "^3.5.42", "@types/crypto-js": "^4.2.2", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -29263,17 +29281,17 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", + "@taquito/core": "^20.1.2", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", @@ -29286,7 +29304,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -29311,7 +29329,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-utils/node_modules/buffer": { @@ -29340,10 +29358,10 @@ }, "packages/taquito-wallet-connect": { "name": "@taquito/wallet-connect", - "version": "20.1.1", + "version": "20.1.2", "license": "Apache-2.0", "dependencies": { - "@taquito/taquito": "^20.1.1", + "@taquito/taquito": "^20.1.2", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", @@ -29353,7 +29371,7 @@ "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.171", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pino": "^7.0.5", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -29380,7 +29398,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "packages/taquito-wallet-connect-2": { diff --git a/package.json b/package.json index 4a68486eb8..846f5f81dd 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", "@types/mocha": "^10.0.7", - "@types/node": "^22", + "@types/node": "^18", "@types/typedarray-to-buffer": "^4.0.4", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-beacon-wallet/package.json b/packages/taquito-beacon-wallet/package.json index 16a8ee9510..0d837bd6cf 100644 --- a/packages/taquito-beacon-wallet/package.json +++ b/packages/taquito-beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/beacon-wallet", - "version": "20.1.1", + "version": "20.1.2", "description": "Beacon wallet provider", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -69,15 +69,15 @@ "dependencies": { "@airgap/beacon-dapp": "^4.3.1", "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", "@testing-library/react": "^16.0.1" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.269", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-beacon-wallet/src/errors.ts b/packages/taquito-beacon-wallet/src/errors.ts index 471dbbfa2f..ce719f84d5 100644 --- a/packages/taquito-beacon-wallet/src/errors.ts +++ b/packages/taquito-beacon-wallet/src/errors.ts @@ -16,7 +16,7 @@ export class BeaconWalletNotInitialized extends PermissionDeniedError { /** * @category Error - * @description Error that indicates missing required persmission scopes + * @description Error that indicates missing required permission scopes */ export class MissingRequiredScopes extends PermissionDeniedError { constructor(public readonly requiredScopes: PermissionScope[]) { diff --git a/packages/taquito-beacon-wallet/src/version.ts b/packages/taquito-beacon-wallet/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-beacon-wallet/src/version.ts +++ b/packages/taquito-beacon-wallet/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-contracts-library/package.json b/packages/taquito-contracts-library/package.json index 3dc797df6d..690580f974 100644 --- a/packages/taquito-contracts-library/package.json +++ b/packages/taquito-contracts-library/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/contracts-library", - "version": "20.1.1", + "version": "20.1.2", "description": "Can be used as an extension on the TezosToolkit to provide contracts data", "keywords": [ "tezos" @@ -22,7 +22,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -67,16 +67,16 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/superagent": "^8.1.8", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-contracts-library/src/version.ts b/packages/taquito-contracts-library/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-contracts-library/src/version.ts +++ b/packages/taquito-contracts-library/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-core/package.json b/packages/taquito-core/package.json index f9c31e0d51..8b51273fe4 100644 --- a/packages/taquito-core/package.json +++ b/packages/taquito-core/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/core", - "version": "20.1.1", + "version": "20.1.2", "description": "Classes, interfaces, and types shared across Taquito packages", "keywords": [ "tezos", @@ -23,7 +23,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -64,6 +64,7 @@ }, "devDependencies": { "@types/json-stringify-safe": "^5.0.3", + "@types/node": "^18", "rollup": "^4.22.4", "rollup-plugin-typescript2": "^0.36.0" } diff --git a/packages/taquito-core/src/version.ts b/packages/taquito-core/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-core/src/version.ts +++ b/packages/taquito-core/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-http-utils/package.json b/packages/taquito-http-utils/package.json index 4a1cb4e7f5..1e1afc085a 100644 --- a/packages/taquito-http-utils/package.json +++ b/packages/taquito-http-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/http-utils", - "version": "20.1.1", + "version": "20.1.2", "description": "", "keywords": [ "tezos" @@ -22,7 +22,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -58,13 +58,13 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", + "@taquito/core": "^20.1.2", "node-fetch": "^2.7.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/node-fetch": "^2.6.11", "@types/superagent": "^8.1.8", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/packages/taquito-http-utils/src/version.ts b/packages/taquito-http-utils/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-http-utils/src/version.ts +++ b/packages/taquito-http-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-ledger-signer/package.json b/packages/taquito-ledger-signer/package.json index 8af4e6f08a..12f2b5fef7 100644 --- a/packages/taquito-ledger-signer/package.json +++ b/packages/taquito-ledger-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/ledger-signer", - "version": "20.1.1", + "version": "20.1.2", "description": "Ledger signer provider", "keywords": [ "tezos", @@ -20,7 +20,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -59,15 +59,15 @@ "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "buffer": "^6.0.3" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-ledger-signer/src/version.ts b/packages/taquito-ledger-signer/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-ledger-signer/src/version.ts +++ b/packages/taquito-ledger-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-local-forging/package.json b/packages/taquito-local-forging/package.json index c884e3d4f9..5dfc2cd221 100644 --- a/packages/taquito-local-forging/package.json +++ b/packages/taquito-local-forging/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/local-forging", - "version": "20.1.1", + "version": "20.1.2", "description": "Provide local forging functionality to be with taquito", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -67,16 +67,16 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.1", + "@taquito/rpc": "^20.1.2", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", diff --git a/packages/taquito-local-forging/src/version.ts b/packages/taquito-local-forging/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-local-forging/src/version.ts +++ b/packages/taquito-local-forging/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-michel-codec/pack-test-tool/package.json b/packages/taquito-michel-codec/pack-test-tool/package.json index f0532874dd..a8fe4f7a7e 100644 --- a/packages/taquito-michel-codec/pack-test-tool/package.json +++ b/packages/taquito-michel-codec/pack-test-tool/package.json @@ -1,6 +1,6 @@ { "name": "pack-test-tool", - "version": "20.1.1", + "version": "20.1.2", "description": "Generate pack test data via Tezos RPC", "main": "pack-test-tool.js", "private": true, @@ -8,7 +8,7 @@ "author": "Eugene Zagidullin ", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.1.1", + "@taquito/rpc": "^20.1.2", "yargs": "^17.7.2" } } diff --git a/packages/taquito-michel-codec/package.json b/packages/taquito-michel-codec/package.json index 15fc37117f..20afbdd5d6 100644 --- a/packages/taquito-michel-codec/package.json +++ b/packages/taquito-michel-codec/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michel-codec", - "version": "20.1.1", + "version": "20.1.2", "description": "Michelson parser/validator/formatter", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -66,12 +66,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1" + "@taquito/core": "^20.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", diff --git a/packages/taquito-michel-codec/src/version.ts b/packages/taquito-michel-codec/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-michel-codec/src/version.ts +++ b/packages/taquito-michel-codec/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-michelson-encoder/package.json b/packages/taquito-michelson-encoder/package.json index 86cf9799fc..16358adb1f 100644 --- a/packages/taquito-michelson-encoder/package.json +++ b/packages/taquito-michelson-encoder/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michelson-encoder", - "version": "20.1.1", + "version": "20.1.2", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -25,7 +25,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -67,16 +67,16 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", diff --git a/packages/taquito-michelson-encoder/src/version.ts b/packages/taquito-michelson-encoder/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-michelson-encoder/src/version.ts +++ b/packages/taquito-michelson-encoder/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-remote-signer/package.json b/packages/taquito-remote-signer/package.json index bae305714b..e382bed285 100644 --- a/packages/taquito-remote-signer/package.json +++ b/packages/taquito-remote-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/remote-signer", - "version": "20.1.1", + "version": "20.1.2", "description": "Remote signer provider", "keywords": [ "tezos", @@ -23,7 +23,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -62,16 +62,16 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-remote-signer/src/version.ts b/packages/taquito-remote-signer/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-remote-signer/src/version.ts +++ b/packages/taquito-remote-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-rpc/package.json b/packages/taquito-rpc/package.json index fe77f2de09..96408e0660 100644 --- a/packages/taquito-rpc/package.json +++ b/packages/taquito-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/rpc", - "version": "20.1.1", + "version": "20.1.2", "description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -66,15 +66,15 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", diff --git a/packages/taquito-rpc/src/version.ts b/packages/taquito-rpc/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-rpc/src/version.ts +++ b/packages/taquito-rpc/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-sapling/package.json b/packages/taquito-sapling/package.json index 329c12dbad..020e325197 100644 --- a/packages/taquito-sapling/package.json +++ b/packages/taquito-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/sapling", - "version": "20.1.1", + "version": "20.1.2", "description": "Allows reading and preparing sapling transactions", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -68,10 +68,10 @@ "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -82,7 +82,7 @@ "devDependencies": { "@rollup/plugin-json": "^6.1.0", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pbkdf2": "^3.1.2", "@types/typedarray-to-buffer": "^4.0.4", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/packages/taquito-sapling/src/version.ts b/packages/taquito-sapling/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-sapling/src/version.ts +++ b/packages/taquito-sapling/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-signer/package.json b/packages/taquito-signer/package.json index 717d381d3e..3a876af928 100644 --- a/packages/taquito-signer/package.json +++ b/packages/taquito-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/signer", - "version": "20.1.1", + "version": "20.1.2", "description": "Provide signing functionality to be with taquito", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -72,9 +72,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", @@ -85,7 +85,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pbkdf2": "^3.1.2", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-signer/src/version.ts b/packages/taquito-signer/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-signer/src/version.ts +++ b/packages/taquito-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-timelock/package.json b/packages/taquito-timelock/package.json index 3a3c2e55eb..bfa5aa8537 100644 --- a/packages/taquito-timelock/package.json +++ b/packages/taquito-timelock/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/timelock", - "version": "20.1.1", + "version": "20.1.2", "description": "TypeScript implementation of the Timelock feature in Tezos", "main": "./dist/taquito-timelock.umd.js", "module": "./dist/taquito-timelock.es6.js", @@ -19,7 +19,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -68,10 +68,10 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", - "@types/node": "^22.0.0", + "@taquito/signer": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", diff --git a/packages/taquito-timelock/src/version.ts b/packages/taquito-timelock/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-timelock/src/version.ts +++ b/packages/taquito-timelock/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-tzip12/package.json b/packages/taquito-tzip12/package.json index b26724cc32..365ddeacdc 100644 --- a/packages/taquito-tzip12/package.json +++ b/packages/taquito-tzip12/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip12", - "version": "20.1.1", + "version": "20.1.2", "description": "Tzip12", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -62,15 +62,15 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip16": "^20.1.1" + "@taquito/core": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/tzip16": "^20.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-tzip12/src/version.ts b/packages/taquito-tzip12/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-tzip12/src/version.ts +++ b/packages/taquito-tzip12/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-tzip16/package.json b/packages/taquito-tzip16/package.json index 6c8e6100fd..b365cd3ed6 100644 --- a/packages/taquito-tzip16/package.json +++ b/packages/taquito-tzip16/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip16", - "version": "20.1.1", + "version": "20.1.2", "description": "Tzip16", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -61,12 +61,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/taquito": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -74,7 +74,7 @@ "@types/bluebird": "^3.5.42", "@types/crypto-js": "^4.2.2", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-tzip16/src/version.ts b/packages/taquito-tzip16/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-tzip16/src/version.ts +++ b/packages/taquito-tzip16/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-utils/package.json b/packages/taquito-utils/package.json index 1177275d68..06f0dc9b85 100644 --- a/packages/taquito-utils/package.json +++ b/packages/taquito-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/utils", - "version": "20.1.1", + "version": "20.1.2", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -25,7 +25,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "lint": "eslint --ext .js,.ts .", @@ -64,7 +64,7 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", + "@taquito/core": "^20.1.2", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", @@ -77,7 +77,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", diff --git a/packages/taquito-utils/src/version.ts b/packages/taquito-utils/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-utils/src/version.ts +++ b/packages/taquito-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito-wallet-connect/package.json b/packages/taquito-wallet-connect/package.json index e350b6c7ed..ab6bbd2dce 100644 --- a/packages/taquito-wallet-connect/package.json +++ b/packages/taquito-wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/wallet-connect", - "version": "20.1.1", + "version": "20.1.2", "description": "Walletconnect provider", "keywords": [ "tezos", @@ -24,7 +24,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/taquito": "^20.1.1", + "@taquito/taquito": "^20.1.2", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", @@ -76,7 +76,7 @@ "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.171", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pino": "^7.0.5", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", diff --git a/packages/taquito-wallet-connect/src/version.ts b/packages/taquito-wallet-connect/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito-wallet-connect/src/version.ts +++ b/packages/taquito-wallet-connect/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/packages/taquito/package.json b/packages/taquito/package.json index 8cc41abfd9..548a439acc 100644 --- a/packages/taquito/package.json +++ b/packages/taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/taquito", - "version": "20.1.1", + "version": "20.1.2", "description": "High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.", "keywords": [ "tezos", @@ -28,7 +28,7 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=20" + "node": ">=18" }, "scripts": { "test": "jest --coverage", @@ -77,13 +77,13 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^20.1.2", + "@taquito/http-utils": "^20.1.2", + "@taquito/local-forging": "^20.1.2", + "@taquito/michel-codec": "^20.1.2", + "@taquito/michelson-encoder": "^20.1.2", + "@taquito/rpc": "^20.1.2", + "@taquito/utils": "^20.1.2", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -92,7 +92,7 @@ "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "buffer": "^6.0.3", diff --git a/packages/taquito/src/version.ts b/packages/taquito/src/version.ts index 1401014e3c..c63185deea 100644 --- a/packages/taquito/src/version.ts +++ b/packages/taquito/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "8e5abdf5eeee32ce44023c703ebc1bf68d7851f0", - "version": "20.1.1" + "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", + "version": "20.1.2" }; diff --git a/website/package-lock.json b/website/package-lock.json index ee57a281a1..6b9770a949 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,12 +1,12 @@ { "name": "@taquito/website", - "version": "20.1.0", + "version": "20.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@taquito/website", - "version": "20.1.0", + "version": "20.1.1", "dependencies": { "@docusaurus/core": "2.4.3", "@docusaurus/plugin-google-gtag": "2.4.3", @@ -70,17 +70,17 @@ }, "../packages/taquito": { "name": "@taquito/taquito", - "version": "20.1.0", + "version": "20.1.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", - "@taquito/http-utils": "^20.1.0", - "@taquito/local-forging": "^20.1.0", - "@taquito/michel-codec": "^20.1.0", - "@taquito/michelson-encoder": "^20.1.0", - "@taquito/rpc": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/http-utils": "^20.1.1", + "@taquito/local-forging": "^20.1.1", + "@taquito/michel-codec": "^20.1.1", + "@taquito/michelson-encoder": "^20.1.1", + "@taquito/rpc": "^20.1.1", + "@taquito/utils": "^20.1.1", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -89,7 +89,7 @@ "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "buffer": "^6.0.3", @@ -123,25 +123,25 @@ "webpack-subresource-integrity": "^5.1.0" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "@airgap/beacon-dapp": "^4.3.1", "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.0", - "@taquito/taquito": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/taquito": "^20.1.1", "@testing-library/react": "^16.0.1" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.269", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -170,37 +170,38 @@ "webpack-cli": "^5.1.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-core": { "name": "@taquito/core", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" }, "devDependencies": { "@types/json-stringify-safe": "^5.0.3", + "@types/node": "^18", "rollup": "^4.22.4", "rollup-plugin-typescript2": "^0.36.0" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", + "@taquito/core": "^20.1.1", "node-fetch": "^2.7.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/node-fetch": "^2.6.11", "@types/superagent": "^8.1.8", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -227,25 +228,25 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.0", - "@taquito/taquito": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/taquito": "^20.1.1", + "@taquito/utils": "^20.1.1", "buffer": "^6.0.3" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -271,20 +272,20 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0" + "@taquito/core": "^20.1.1" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "eslint": "^8.57.0", @@ -304,24 +305,24 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", - "@taquito/rpc": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/rpc": "^20.1.1", + "@taquito/utils": "^20.1.1", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -346,26 +347,26 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.0", - "@taquito/http-utils": "^20.1.0", - "@taquito/taquito": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/http-utils": "^20.1.1", + "@taquito/taquito": "^20.1.1", + "@taquito/utils": "^20.1.1", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -391,23 +392,23 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", - "@taquito/http-utils": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/http-utils": "^20.1.1", + "@taquito/utils": "^20.1.1", "bignumber.js": "^9.1.2" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -432,12 +433,12 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -446,9 +447,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.0", - "@taquito/taquito": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/taquito": "^20.1.1", + "@taquito/utils": "^20.1.1", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", @@ -459,7 +460,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pbkdf2": "^3.1.2", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -486,23 +487,23 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", - "@taquito/michelson-encoder": "^20.1.0", - "@taquito/taquito": "^20.1.0", - "@taquito/tzip16": "^20.1.0" + "@taquito/core": "^20.1.1", + "@taquito/michelson-encoder": "^20.1.1", + "@taquito/taquito": "^20.1.1", + "@taquito/tzip16": "^20.1.1" }, "devDependencies": { "@types/bluebird": "^3.5.42", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -528,20 +529,20 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.0", - "@taquito/http-utils": "^20.1.0", - "@taquito/michelson-encoder": "^20.1.0", - "@taquito/rpc": "^20.1.0", - "@taquito/taquito": "^20.1.0", - "@taquito/utils": "^20.1.0", + "@taquito/core": "^20.1.1", + "@taquito/http-utils": "^20.1.1", + "@taquito/michelson-encoder": "^20.1.1", + "@taquito/rpc": "^20.1.1", + "@taquito/taquito": "^20.1.1", + "@taquito/utils": "^20.1.1", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -549,7 +550,7 @@ "@types/bluebird": "^3.5.42", "@types/crypto-js": "^4.2.2", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -575,17 +576,17 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.0", + "@taquito/core": "^20.1.1", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", @@ -598,7 +599,7 @@ "@types/bluebird": "^3.5.42", "@types/elliptic": "^6.4.18", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "colors": "^1.4.0", @@ -623,15 +624,15 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-wallet-connect": { "name": "@taquito/wallet-connect", - "version": "20.1.0", + "version": "20.1.1", "license": "Apache-2.0", "dependencies": { - "@taquito/taquito": "^20.0.1", + "@taquito/taquito": "^20.1.1", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", @@ -641,7 +642,7 @@ "@types/bluebird": "^3.5.42", "@types/chrome": "0.0.171", "@types/jest": "^29.5.12", - "@types/node": "^22", + "@types/node": "^18", "@types/pino": "^7.0.5", "@types/ws": "^8.5.12", "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -668,7 +669,7 @@ "typescript": "~5.5.4" }, "engines": { - "node": ">=20" + "node": ">=18" } }, "../packages/taquito-wallet-connect-2": { @@ -17651,9 +17652,9 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", diff --git a/website/package.json b/website/package.json index 0eb3b4ef01..f1d32dec4f 100644 --- a/website/package.json +++ b/website/package.json @@ -86,5 +86,5 @@ "last 1 safari version" ] }, - "version": "20.1.1" + "version": "20.1.2" } From fa8b6f0a1a80d0623bdb55a0a8a4964fadb35702 Mon Sep 17 00:00:00 2001 From: hui-an-yang <106410553+hui-an-yang@users.noreply.github.com> Date: Tue, 7 Jan 2025 12:57:54 -0800 Subject: [PATCH 2/2] Quebec (#3068) * add betanet0829 protocol hash and chainID * test: configured integration test run on betanet0829 * test: update integration-test files for betanet * ci: update betanet script name * feat: add ConstantsResponseProto021 to ConstantsResponse fix #3037 * feat: removed endorsement compatiblity but kept rpc types and readProvider for user query old block BREAKING CHANGE: PollingSubscribeProvider doesn't filter endorsement anymore and removed rpc entrypoints using param version 0 re #3036 * feat: getPendingOperations add param source and operationHash and removed type PendingOperationsV1 BREAKING CHANGE: PendingOperationsQueryArguments.version used to accept 1 is removed for protocol q re #3034 * test: update estimation-tests assertion * test: improve failing-noop and staking tests * feat: add getSpendable rpc endpoint re #3023 * feat: add getBalanceAndFrozenBonds and getSpendableAndFrozenBonds rpc endpoint re #3023 * docs: update rpc nodes doc * test: update estimation-tests assertion * test: update estimation-tests assertion * ci: updated ci script with rpc_url * test: updated testing for weeklynet * feat: configured quebec protocol and chainId * test: configured quebec integration tests and ci runs * docs: updated places with quebec * test: improved staking tests * test: imporved staking tests * test: configured to run tests on new quebec testnet * feat: updated quebec new chainId * chore: fixed dependency vulnerabilities * test: correct ghostnet protocol config * test: updated estimation assertions * test: updated private rpc url for ci * test: adjusted estimation assertions, improve staking test and test config for beta release * docs: updated rpc nodes urls * chore(releng) bump version to 21.0.0-beta.1 * ci: update quebecnet rpc urls * fix: adding PendingOperationsV1 support to smooth migration from paris to quebec on mainnet * test: updated quebecnet and weeklynet rpc url * test: updated estimate assertions * feat: updated beacon to 4.3.2-beta.0 and enable test-dapp with quebecnet * chore(releng) bump version to 21.0.0-RC.0 * chore: updated dependencies suggested by snyk * test: updated test assertion and improvet nodes.spec also fix live code example bugs * ci: updated ci to run bundle_webpack.yml workflow every pr * chore(releng) bump version to 21.0.0 * docs: updated website versioned_docs to be latest 5 versions --- .github/workflows/bundle_webpack.yml | 1 + .github/workflows/main.yml | 9 +- apps/taquito-test-dapp/package.json | 18 +- apps/taquito-test-dapp/src/App.svelte | 4 + apps/taquito-test-dapp/src/config.ts | 7 +- cspell.json | 2 + docs/consensus_key.md | 2 +- docs/maps_bigmaps.md | 12 +- docs/rpc_nodes.md | 15 +- docs/rpc_nodes_integration_test.md | 214 +- docs/staking.md | 8 +- docs/version.md | 21 + docs/wallet_API.md | 4 +- docs/walletconnect.md | 2 +- example/deploy-test-dapp-contract.ts | 7 +- .../example-streamer-custom-retry-logic.ts | 6 +- example/example-streamer.ts | 6 +- example/package.json | 22 +- integration-tests/README.md | 10 +- .../contract/estimation-tests.spec.ts | 82 +- .../contract/operations/failing-noop.spec.ts | 10 +- .../contract/operations/staking.spec.ts | 43 +- .../pseudo-entrypoints-forging.spec.ts | 4 +- .../rpc/get-protocol-constants.spec.ts | 279 +- integration-tests/__tests__/rpc/nodes.spec.ts | 28 +- .../__tests__/wallet/failing-noop.spec.ts | 10 +- .../wallet/staking-pseudo-operations.spec.ts | 62 +- integration-tests/config.ts | 35 +- .../known-contracts-ProtoALph.ts | 10 +- .../known-contracts-PsQuebecn.ts | 8 + .../known-contracts-PtNairobi.ts | 8 - .../originate-known-contracts.ts | 2 +- integration-tests/package.json | 33 +- lerna.json | 2 +- package-lock.json | 383 +- packages/taquito-beacon-wallet/package.json | 9 +- packages/taquito-beacon-wallet/src/version.ts | 4 +- .../taquito-contracts-library/package.json | 10 +- .../src/read-provider-wrapper.ts | 3 + .../src/rpc-wrapper.ts | 18 + .../taquito-contracts-library/src/version.ts | 4 +- packages/taquito-core/package.json | 2 +- packages/taquito-core/src/version.ts | 4 +- packages/taquito-http-utils/package.json | 4 +- packages/taquito-http-utils/src/version.ts | 4 +- packages/taquito-ledger-signer/package.json | 8 +- packages/taquito-ledger-signer/src/version.ts | 4 +- packages/taquito-local-forging/package.json | 8 +- .../taquito-local-forging/src/protocols.ts | 4 +- .../src/taquito-local-forging.ts | 2 +- packages/taquito-local-forging/src/version.ts | 4 +- .../pack-test-tool/package.json | 4 +- packages/taquito-michel-codec/package.json | 4 +- .../src/michelson-types.ts | 4 +- packages/taquito-michel-codec/src/version.ts | 4 +- .../taquito-michelson-encoder/package.json | 8 +- .../taquito-michelson-encoder/src/version.ts | 4 +- packages/taquito-remote-signer/package.json | 10 +- packages/taquito-remote-signer/src/version.ts | 4 +- packages/taquito-rpc/package.json | 8 +- .../taquito-rpc/src/rpc-client-interface.ts | 8 +- .../src/rpc-client-modules/rpc-cache.ts | 107 +- packages/taquito-rpc/src/taquito-rpc.ts | 95 +- packages/taquito-rpc/src/types.ts | 11 +- packages/taquito-rpc/src/version.ts | 4 +- .../taquito-rpc/test/data/rpc-responses.ts | 3987 +++-------------- packages/taquito-rpc/test/rpc-cache.spec.ts | 35 +- packages/taquito-rpc/test/taquito-rpc.spec.ts | 69 +- packages/taquito-sapling/package.json | 10 +- packages/taquito-sapling/src/version.ts | 4 +- packages/taquito-signer/package.json | 8 +- packages/taquito-signer/src/version.ts | 4 +- packages/taquito-timelock/package.json | 8 +- packages/taquito-timelock/src/version.ts | 4 +- packages/taquito-tzip12/package.json | 10 +- packages/taquito-tzip12/src/version.ts | 4 +- packages/taquito-tzip16/package.json | 14 +- packages/taquito-tzip16/src/version.ts | 4 +- packages/taquito-utils/package.json | 4 +- .../taquito-utils/src/verify-signature.ts | 2 +- packages/taquito-utils/src/version.ts | 4 +- packages/taquito-wallet-connect/package.json | 4 +- packages/taquito-wallet-connect/src/types.ts | 2 +- .../taquito-wallet-connect/src/version.ts | 4 +- packages/taquito/README.md | 2 +- packages/taquito/assets-manifest.json | 2 +- packages/taquito/package.json | 16 +- packages/taquito/src/constants.ts | 5 +- .../taquito/src/read-provider/interface.ts | 12 +- .../src/read-provider/rpc-read-adapter.ts | 14 +- packages/taquito/src/signer/interface.ts | 2 +- packages/taquito/src/subscribe/filters.ts | 2 - .../subscribe/polling-subcribe-provider.ts | 11 +- packages/taquito/src/tz/interface.ts | 6 +- packages/taquito/src/tz/rpc-tz-provider.ts | 8 + packages/taquito/src/version.ts | 4 +- .../test/batch/rpc-batch-provider.spec.ts | 2 + .../contract/rpc-contract-provider.spec.ts | 2 + .../estimate/rpc-estimate-provider.spec.ts | 4 + .../test/prepare/prepare-provider.spec.ts | 2 + .../read-provider/rpc-read-adapter.spec.ts | 15 + .../polling-subscribe-provider.spec.ts | 18 +- .../taquito/test/tz/rpc-tz-provider.spec.ts | 18 + website/package-lock.json | 161 +- website/package.json | 8 +- .../version-19.0.0/mobile_bundle.md | 26 - .../rpc_nodes_integration_test.md | 113 - .../version-19.1.0/maps_bigmaps.md | 12 +- .../version-19.2.0/maps_bigmaps.md | 12 +- .../version-20.0.0/maps_bigmaps.md | 12 +- .../version-20.1.0/maps_bigmaps.md | 12 +- .../ballot.md | 0 .../batch-api.md | 2 +- .../beaconwallet-singleton.md | 0 .../cancel_http_requests.md | 1 + .../chatbot.md | 0 .../complex_parameters.md | 0 .../confirmation_event_stream.md | 0 .../consensus_key.md | 2 +- .../contract-test-collection.md | 34 +- .../contract_call_parameters.md | 0 .../contracts-library.md | 0 .../dapp_prelaunch.md | 2 +- .../dapp_template.md | 0 .../drain_account.md | 0 .../estimate.md | 4 + .../events.md | 0 .../fa2_parameters.md | 0 .../failing_noop.md | 0 .../failwith_errors.md | 0 .../forger.md | 0 .../global_constant.md | 0 .../images/Tzip16ExecuteView.png | Bin .../images/diagramTzip16Metadata.png | Bin .../images/github.png | Bin .../images/gitlab.png | Bin .../increase_paid_storage.md | 4 +- .../inmemory_signer.md | 0 .../lambda_view.md | 2 +- .../ledger_integration_test.md | 0 .../ledger_signer.md | 0 .../liquidity_baking.md | 0 .../making_transfers.md | 0 .../manager_lambda.md | 0 .../maps_bigmaps.md | 12 +- .../metadata-tzip16.md | 8 +- .../version-21.0.0/michel_codec.md | 123 + .../michelson_encoder.md | 124 +- .../michelsonmap.md | 0 .../multisig_doc.md | 0 .../on_chain_views.md | 0 .../operation_flow.md | 0 .../ophash_before_injecting.md | 0 .../originate.md | 16 +- .../version-21.0.0/package_bundle.md | 36 + .../prepare.md | 0 .../proposal_and_ballot.md | 0 .../quick_start.md | 2 +- .../rpc-cache.md | 0 .../rpc_nodes.md | 19 +- .../rpc_nodes_integration_test.md | 129 + .../rpc_package.md | 4 +- .../sapling.md | 0 .../sapling_in_memory_spending_key.md | 0 .../sapling_in_memory_viewing_key.md | 0 .../set_delegate.md | 0 .../signing.md | 96 +- .../smart_rollups.md | 39 +- .../smartcontracts.md | 0 .../versioned_docs/version-21.0.0/staking.md | 164 + .../storage_annotations.md | 0 .../taquito_utils.md | 0 .../testing_strategies.md | 0 .../tezbridge_signer.md | 0 .../tezos_domains.md | 14 +- .../tickets.md | 0 .../versioned_docs/version-21.0.0/timelock.md | 221 + .../transaction_limits.md | 0 .../tutorial.md | 50 +- .../tutorial_links.md | 0 .../tzip12.md | 20 +- .../tzip16-sequence-diagram.md | 0 .../validators.md | 0 .../version.md | 273 +- .../wallet_API.md | 16 +- .../version-21.0.0/walletconnect.md | 125 + .../wallets.md | 0 .../web3js_taquito.md | 2 +- ...bars.json => version-21.0.0-sidebars.json} | 8 +- website/versions.json | 4 +- 190 files changed, 3487 insertions(+), 4487 deletions(-) create mode 100644 integration-tests/known-contracts-PsQuebecn.ts delete mode 100644 integration-tests/known-contracts-PtNairobi.ts delete mode 100644 website/versioned_docs/version-19.0.0/mobile_bundle.md delete mode 100644 website/versioned_docs/version-19.0.0/rpc_nodes_integration_test.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/ballot.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/batch-api.md (99%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/beaconwallet-singleton.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/cancel_http_requests.md (98%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/chatbot.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/complex_parameters.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/confirmation_event_stream.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/consensus_key.md (88%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/contract-test-collection.md (97%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/contract_call_parameters.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/contracts-library.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/dapp_prelaunch.md (93%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/dapp_template.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/drain_account.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/estimate.md (95%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/events.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/fa2_parameters.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/failing_noop.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/failwith_errors.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/forger.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/global_constant.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/images/Tzip16ExecuteView.png (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/images/diagramTzip16Metadata.png (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/images/github.png (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/images/gitlab.png (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/increase_paid_storage.md (97%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/inmemory_signer.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/lambda_view.md (98%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/ledger_integration_test.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/ledger_signer.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/liquidity_baking.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/making_transfers.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/manager_lambda.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/maps_bigmaps.md (98%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/metadata-tzip16.md (95%) create mode 100644 website/versioned_docs/version-21.0.0/michel_codec.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/michelson_encoder.md (80%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/michelsonmap.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/multisig_doc.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/on_chain_views.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/operation_flow.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/ophash_before_injecting.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/originate.md (96%) create mode 100644 website/versioned_docs/version-21.0.0/package_bundle.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/prepare.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/proposal_and_ballot.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/quick_start.md (99%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/rpc-cache.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/rpc_nodes.md (74%) create mode 100644 website/versioned_docs/version-21.0.0/rpc_nodes_integration_test.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/rpc_package.md (95%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/sapling.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/sapling_in_memory_spending_key.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/sapling_in_memory_viewing_key.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/set_delegate.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/signing.md (68%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/smart_rollups.md (52%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/smartcontracts.md (100%) create mode 100644 website/versioned_docs/version-21.0.0/staking.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/storage_annotations.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/taquito_utils.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/testing_strategies.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tezbridge_signer.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tezos_domains.md (89%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tickets.md (100%) create mode 100644 website/versioned_docs/version-21.0.0/timelock.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/transaction_limits.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tutorial.md (96%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tutorial_links.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tzip12.md (92%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/tzip16-sequence-diagram.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/validators.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/version.md (92%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/wallet_API.md (98%) create mode 100644 website/versioned_docs/version-21.0.0/walletconnect.md rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/wallets.md (100%) rename website/versioned_docs/{version-19.0.0 => version-21.0.0}/web3js_taquito.md (98%) rename website/versioned_sidebars/{version-19.0.0-sidebars.json => version-21.0.0-sidebars.json} (97%) diff --git a/.github/workflows/bundle_webpack.yml b/.github/workflows/bundle_webpack.yml index fcb196a8b7..9b6ebd0763 100644 --- a/.github/workflows/bundle_webpack.yml +++ b/.github/workflows/bundle_webpack.yml @@ -1,6 +1,7 @@ name: Bundle Webpack on: + pull_request: push: branches: - master diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4eb9faefd..c841305157 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,6 +46,10 @@ jobs: include: - testnet: parisnet testnet_uppercase: PARISNET + rpc_url: https://rpc.pariscnet.teztnets.com/ + - testnet: quebecnet + testnet_uppercase: QUEBECNET + rpc_url: https://rpc.quebecnet.teztnets.com/ steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -59,7 +63,8 @@ jobs: with: authkey: ${{ secrets.TAILSCALE_AUTHKEY }} version: 1.32.2 - - run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4 + - id: run-tests + run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4 env: # Ternary operator workaround - TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && format('https://{0}.ecadinfra.com', matrix.testnet) || null }} + TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && matrix.rpc_url || null }} \ No newline at end of file diff --git a/apps/taquito-test-dapp/package.json b/apps/taquito-test-dapp/package.json index 39954dc2ad..e08c5ef006 100644 --- a/apps/taquito-test-dapp/package.json +++ b/apps/taquito-test-dapp/package.json @@ -1,7 +1,7 @@ { "name": "taquito-test-dapp-vite", "private": true, - "version": "20.1.2", + "version": "21.0.0", "type": "module", "scripts": { "dev": "vite", @@ -15,7 +15,7 @@ "events": "^3.3.0", "lerna": "^8.1.7", "prettier-plugin-svelte": "^3.2.6", - "sass": "^1.80.1", + "sass": "^1.81.0", "svelte": "^4.2.19", "svelte-check": "^3.8.5", "svelte-preprocess": "^6.0.2", @@ -24,13 +24,13 @@ "vite": "^5.3.5" }, "dependencies": { - "@airgap/beacon-sdk": "^4.3.1", - "@airgap/beacon-types": "^4.3.1", - "@taquito/beacon-wallet": "^20.1.2", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", - "@taquito/wallet-connect": "^20.1.2", + "@airgap/beacon-sdk": "^4.3.2-beta.0", + "@airgap/beacon-types": "^4.3.2-beta.0", + "@taquito/beacon-wallet": "^21.0.0", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", + "@taquito/wallet-connect": "^21.0.0", "buffer": "^6.0.3", "svelte-modals": "^2.0.0-beta.2", "svelte-select": "^5.8.3", diff --git a/apps/taquito-test-dapp/src/App.svelte b/apps/taquito-test-dapp/src/App.svelte index f1e75b5ab6..5b4d8f3ad5 100644 --- a/apps/taquito-test-dapp/src/App.svelte +++ b/apps/taquito-test-dapp/src/App.svelte @@ -14,6 +14,7 @@ let availableNetworks = [ { value: "ghostnet", label: "Ghostnet", group: "current testnets" }, { value: "parisnet", label: "Parisnet", group: "current testnets" }, + { value: "quebecnet", label: "Quebecnet", group: "current testnets" }, { value: "mainnet", label: "Mainnet", group: "mainnet" }, { value: "dailynet", label: "Dailynet", group: "other testnets" }, { value: "weeklynet", label: "Weeklynet", group: "other testnets" }, @@ -42,6 +43,9 @@ case "parisnet": store.updateNetworkType(NetworkType.PARISNET); break; + case "quebecnet": + store.updateNetworkType(NetworkType.QUEBECNET); + break; case "custom": //TODO: input custom RPC URL showCustomNetworkInput = true; diff --git a/apps/taquito-test-dapp/src/config.ts b/apps/taquito-test-dapp/src/config.ts index 90e39f34c9..a5b44248fa 100644 --- a/apps/taquito-test-dapp/src/config.ts +++ b/apps/taquito-test-dapp/src/config.ts @@ -1,12 +1,13 @@ import { NetworkType as NetworkTypeBeacon } from "@airgap/beacon-sdk"; import { NetworkType as NetworkTypeWc } from "@taquito/wallet-connect"; -export type SupportedNetworks = NetworkTypeBeacon.MAINNET | NetworkTypeBeacon.GHOSTNET | NetworkTypeBeacon.PARISNET | NetworkTypeWc.MAINNET | NetworkTypeWc.GHOSTNET | NetworkTypeWc.PARISNET | NetworkTypeBeacon.CUSTOM; +export type SupportedNetworks = NetworkTypeBeacon.MAINNET | NetworkTypeBeacon.GHOSTNET | NetworkTypeBeacon.PARISNET | NetworkTypeBeacon.QUEBECNET | NetworkTypeWc.MAINNET | NetworkTypeWc.GHOSTNET | NetworkTypeWc.PARISNET | NetworkTypeWc.QUEBECNET | NetworkTypeBeacon.CUSTOM; const rpcUrls: Record = { [NetworkTypeBeacon.MAINNET]: "https://mainnet.tezos.ecadinfra.com", [NetworkTypeBeacon.GHOSTNET]: "https://ghostnet.tezos.ecadinfra.com/", [NetworkTypeBeacon.PARISNET]: "https://rpc.pariscnet.teztnets.com/", + [NetworkTypeBeacon.QUEBECNET]: "https://rpc.quebecnet.teztnets.com", [NetworkTypeBeacon.CUSTOM]: "https://ghostnet.tezos.ecadinfra.com/", }; @@ -25,6 +26,9 @@ export const getTzKtUrl = (networkType: SupportedNetworks): string | undefined = case NetworkTypeBeacon.PARISNET: case NetworkTypeWc.PARISNET: return "https://parisnet.tzkt.io"; + case NetworkTypeBeacon.QUEBECNET: + case NetworkTypeWc.QUEBECNET: + return "https://quebecnet.tzkt.io"; case NetworkTypeBeacon.CUSTOM: return undefined; } @@ -40,4 +44,5 @@ export const contractAddress = { ghostnet: "KT1QKmcNBcfzVTXG2kBcE6XqXtEuYYUzMcT5", oxfordnet: "KT1GYx1KDhMQt2GJEztRh8EyYxJUPM6fnAMM", parisnet: "KT1E43cQefjM8fq7B5pEJFJoGbRmuNibDoBC", + quebecnet: "KT1JZ3H8zMn6GXoftLpRzGUwRD4fP7mmxKqW" }; diff --git a/cspell.json b/cspell.json index 4d32d01c48..5a0b6599cc 100644 --- a/cspell.json +++ b/cspell.json @@ -8,6 +8,7 @@ "b58cdecode", "b58cencode", "beaconwallet", + "BETANET", "bigmap", "BIGMAPCONTRACT", "bigmaps", @@ -84,6 +85,7 @@ "Protofire", "ProxfordY", "PtNairobi", + "Quebecnet", "refetched", "riscv", "rollups", diff --git a/docs/consensus_key.md b/docs/consensus_key.md index bda600b95d..af9989bef8 100644 --- a/docs/consensus_key.md +++ b/docs/consensus_key.md @@ -3,7 +3,7 @@ title: Consensus Keys author: Davis Sawali & Hui-An Yang --- -The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation/preendorsements and attestation/endorsements). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) +The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation and attestation). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) Starting from Lima protocol, these 2 new operations will be available: diff --git a/docs/maps_bigmaps.md b/docs/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/docs/maps_bigmaps.md +++ b/docs/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/docs/rpc_nodes.md b/docs/rpc_nodes.md index d8b5def352..343ac4fa70 100644 --- a/docs/rpc_nodes.md +++ b/docs/rpc_nodes.md @@ -23,21 +23,26 @@ values={[ | Provider | Net | URL | Header | |------------------|--------------|------------------------------------------|---------------------------------------------------------------------------------| -| ECAD Labs | Mainnet | https://mainnet.tezos.ecadinfra.com | [Check](https://mainnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | -| ECAD Labs | Ghostnet | https://ghostnet.tezos.ecadinfra.com | [Check](https://ghostnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | +| ECAD Labs | Mainnet | https://mainnet.tezos.ecadinfra.com | [Check](https://mainnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | +| ECAD Labs | Ghostnet | https://ghostnet.tezos.ecadinfra.com | [Check](https://ghostnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | | SmartPy | Mainnet | https://mainnet.smartpy.io | [Check](https://mainnet.smartpy.io/chains/main/blocks/head/header) | | SmartPy | Ghostnet | https://ghostnet.smartpy.io | [Check](https://ghostnet.smartpy.io/chains/main/blocks/head/header) | | Tezos Foundation | Mainnet | https://rpc.tzbeta.net/ | [Check](https://rpc.tzbeta.net/chains/main/blocks/head/header) | | Tezos Foundation | Ghostnet | https://rpc.ghostnet.teztnets.com/ | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) | -| Tezos Foundation | Parisnet | https://rpc.pariscnet.teztnets.com/ | [Check](https://rpc.pariscnet.teztnets.com/chains/main/blocks/head/header) | - +| Tezos Foundation | Parisnet | https://rpc.pariscnet.teztnets.com/ | [Check](https://rpc.pariscnet.teztnets.com/chains/main/blocks/head/header) | +| Tezos Foundation | Quebecnet | https://rpc.quebecnet.teztnets.com/ | [Check](https://rpc.quebecnet.teztnets.com/chains/main/blocks/head/header) | +| Tzkt | Mainnet | https://rpc.tzkt.io/mainnet/ | [Check](https://rpc.tzkt.io/mainnet/chains/main/blocks/head/header) | +| Tzkt | Ghostnet | https://rpc.tzkt.io/ghostnet | [Check](https://rpc.tzkt.io/ghostnet/chains/main/blocks/head/header) | +| Tzkt | Parisnet | https://rpc.tzkt.io/parisnet | [Check](https://rpc.tzkt.io/parisnet/chains/main/blocks/head/header) | +| Tzkt | Quebecnet | https://rpc.tzkt.io/quebecnet | [Check](https://rpc.tzkt.io/quebecnet/chains/main/blocks/head/header) | + +https://api.mainnet.tzkt.io/ *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 | |------------------|---------------------------------------------| -| TzPro | https://tzpro.io/ | | MIDL.dev | https://midl.dev/tezos-rpc/ | | Exaion | https://node.exaion.com | diff --git a/docs/rpc_nodes_integration_test.md b/docs/rpc_nodes_integration_test.md index 76416813ac..ca05174dfc 100644 --- a/docs/rpc_nodes_integration_test.md +++ b/docs/rpc_nodes_integration_test.md @@ -8,120 +8,122 @@ author: Roxane Letourneau 1. The RPC nodes' integration tests are disabled by default. Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json. - **parisnet**: `npm run test:parisnet rpc-nodes.spec.ts` + **quebecnet**: `npm run test:quebecnet-secret-key integration-tests/__tests__/rpc/nodes.spec.ts` **When all endpoints are accessible for a node, you will obtain:** ``` - Test calling all methods from RPC node: http://parisnet.i.ecadinfra.com:8732/ - ✓ Verify that rpcClient.getBlockHash returns the head block hash (37 ms) - ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (53 ms) - ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (32 ms) - ✓ Verify that rpcClient.getFullBalance for knownBaker returns the spendable balance excluding frozen bonds (37 ms) - ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the spendable balance excluding frozen bonds (34 ms) - ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the spendable balance excluding frozen bonds (37 ms) - ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the spendable balance excluding frozen bonds (33 ms) - ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the spendable balance excluding frozen bonds (29 ms) - ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (35 ms) - ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (33 ms) - ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (30 ms) - ✓ Verify that rpcClient.getContract returns the complete status of a contract (30 ms) - ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (30 ms) - ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (30 ms) - ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (151 ms) - ✓ Verify that rpcClient.getAllDelegates returns all delegates from RPC (132 ms) - ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (32 ms) - ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (30 ms) - ✓ Verify that rpcClient.getConstants returns all constants from RPC (33 ms) - ✓ Verify that rpcClient.getBlock returns all the information about a block (46 ms) - ✓ Verify that rpcClient.getBlockHeader returns whole block header (34 ms) - ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (33 ms) - ✓ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (38 ms) - ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (41 ms) - ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (30 ms) - ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (29 ms) - ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (30 ms) - ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (32 ms) - ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (34 ms) - ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (32 ms) - ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (34 ms) - ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (38 ms) - ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (28 ms) - ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (104 ms) - ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (28 ms) - ✓ Verify that rpcClient.getChainId returns chain ID (44 ms) - ✓ Verify that rpcClient.runOperation runs an operation without signature checks (33 ms) - ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (35 ms) - ✓ Verify that rpcClient.runView executes tzip4 views (64 ms) - ✓ Verify that rpcClient.runScriptView executes michelson view (60 ms) - ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (29 ms) - ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (64 ms) - ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (33 ms) - ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (32 ms) - ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (30 ms) - ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (29 ms) - ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (28 ms) - ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (39 ms) - ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for http://parisnet.i.ecadinfra.com:8732/ (29 ms) - ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (397 ms) - ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (470 ms) - ○ skipped Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle null for http://parisnet.i.ecadinfra.com:8732/ + Test calling all methods from RPC node: https://rpc.quebecnet.teztnets.com + ✓ Verify that rpcClient.getBlockHash returns the head block hash (61 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (61 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (57 ms) + ✓ Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds (83 ms) + ✓ Verify that rpcClient.getBalanceAndFrozenBonds for knownBaker returns the full balance (58 ms) + ✓ Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (55 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (55 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (57 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (62 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (61 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (62 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (57 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (56 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (307 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (57 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (60 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (60 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (60 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (56 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (57 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (57 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (54 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (54 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (84 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (52 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (53 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (54 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (66 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (57 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (124 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (58 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (56 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (62 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (79 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (113 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (108 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (62 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (118 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (55 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (64 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (56 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (63 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (55 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (56 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.quebecnet.teztnets.com (56 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (280 ms) + ○ skipped Verify that rpcClient.getAllDelegates returns all delegates from RPC + ○ skipped Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block + ○ skipped Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block ``` **Otherwise, you will see which endpoints do not work for a specific node:** ``` Test calling all methods from RPC node: http://localhost:20000 - ✓ Verify that rpcClient.getBlockHash returns the head block hash (13 ms) - ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (18 ms) - ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (13 ms) - ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (8 ms) - ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (10 ms) - ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (11 ms) - ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (7 ms) - ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (8 ms) - ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (10 ms) - ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (11 ms) - ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (15 ms) - ✓ Verify that rpcClient.getContract returns the complete status of a contract (12 ms) - ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (11 ms) - ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (8 ms) - ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (93 ms) - ✓ Verify that rpcClient.getAllDelegates returns all delegates from RPC (132 ms) - ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (10 ms) - ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (7 ms) - ✓ Verify that rpcClient.getConstants returns all constants from RPC (10 ms) - ✓ Verify that rpcClient.getBlock returns all the information about a block (10 ms) - ✓ Verify that rpcClient.getBlockHeader returns whole block header (9 ms) - ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (6 ms) - ✓ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (12 ms) - ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (11 ms) - ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (6 ms) - ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (5 ms) - ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (6 ms) - ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (7 ms) - ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (8 ms) - ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (7 ms) - ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (6 ms) - ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (13 ms) - ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (7 ms) - ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (29 ms) - ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (21 ms) - ✓ Verify that rpcClient.getChainId returns chain ID (6 ms) - ✓ Verify that rpcClient.runOperation runs an operation without signature checks (13 ms) - ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (13 ms) - ✓ Verify that rpcClient.runView executes tzip4 views (27 ms) - ✓ Verify that rpcClient.runScriptView executes michelson view (22 ms) - ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (7 ms) - ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (17 ms) - ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (9 ms) - ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (6 ms) - ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (8 ms) - ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (7 ms) - ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (7 ms) - ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (10 ms) - ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle null for http://localhost:20000 (6 ms) - ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (313 ms) - ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (323 ms) - ○ skipped Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for http://localhost:20000 + ✓ Verify that rpcClient.getBlockHash returns the head block hash (61 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (61 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (57 ms) + ✓ Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds (83 ms) + ✓ Verify that rpcClient.getBalanceAndFrozenBonds for knownBaker returns the full balance (58 ms) + ✓ Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (55 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (55 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (57 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (62 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (61 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (62 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (57 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (56 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (307 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (57 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (60 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (60 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (60 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (56 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (57 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (57 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (54 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (54 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (84 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (52 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (53 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (54 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (66 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (57 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (124 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (58 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (56 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (62 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (79 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (113 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (108 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (62 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (118 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (55 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (64 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (56 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (63 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (55 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (56 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.quebecnet.teztnets.com (56 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (280 ms) + ○ skipped Verify that rpcClient.getAllDelegates returns all delegates from RPC + ○ skipped Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block + ○ skipped Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block ``` \ No newline at end of file diff --git a/docs/staking.md b/docs/staking.md index 64343e3940..bd3eae83fc 100644 --- a/docs/staking.md +++ b/docs/staking.md @@ -18,10 +18,6 @@ Users can control their staked funds using the `stake`, `unstake`, and `finalize To accept staked funds, a delegate needs to have opted in to staking. This is done by `set_delegate_parameters`. This part is not supported by Taquito, as it is not a dApp operation. More information [here](https://tezos.gitlab.io/paris/adaptive_issuance.html#staking-policy-configuration). -:::info -After protocol Paris is activated, the adaptive issuance will still be disabled for about two weeks. During this period, staking operations will result in this error: `proto.019-PtParisB.operation.manual_staking_forbidden`. -::: - # Staking Funds To stake your funds, you need to call the `stake` operation. Before you can stake your funds, two conditions should be met: @@ -137,7 +133,7 @@ const op = await Tezos.wallet.finalizeUnstake().send(); # Additional Info and Some Notes ## Cycle -At the time of this writing, a cycle is ~~16384~~ blocks (with Paris protocol will be 24576), and ~~15~~ (10) seconds per block. This means a cycle is about 2.8 days (and will stay the same after Paris). This might change with the activation of newer protocols. +A cycle is 24576 blocks in Paris protocol (will be 30720 in Quebec), and 10 seconds per block in Paris (will be 8 in Quebec). This means a cycle is about 2.8 days (and will stay the same after Quebec). This might change with the activation of newer protocols. ## Overstaking A delegate can set the maximum amount of staking they can accept, as a multiply of their own balance. If a delegate's limit is exceeded, the exceeding stake is automatically considered as delegation for the delegate's baking and voting power calculation, but it does remain slashable. That means it's your responsibility to make sure you're not overstaking. Remember that overstaking can even happen after you have staked successfully, because your delegate changes their own balance, or their staking parameter. @@ -150,7 +146,7 @@ When you change your delegate, your funds will be automatically unstaked. You wi The `stake` and `unstake` operations will automatically finalize all currently finalizable funds. ## Adaptive Issuance -A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/paris/adaptive_issuance.html#adaptive-issuance). +A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/quebec/adaptive_issuance.html#adaptive-issuance). ## Staking Rewards In delegation, rewards were given to the baker, and it was the baker's responsibility to distribute the rewards to the delegators. In staking, the rewards are given directly to the staker. However, rewards are not given immediately, but are distributed through staked (frozen) balance, and the user can spend the reward along with their initial stake when they `unstake` and `finalize_unstake`. diff --git a/docs/version.md b/docs/version.md index 595e8f2224..efed468441 100644 --- a/docs/version.md +++ b/docs/version.md @@ -3,6 +3,27 @@ title: Versions author: Jev Bjorsell --- +# Taquito v21.0.0 +## Summary + +### Quebec Protocol Support + +### New Features +`@taquito/rpc` - Added `getSpendable`, `getBalanceAndFrozenBonds` and `getSpendableAndFrozenBonds` rpc endpoint #3023 + +### Improvement +`@taquito/rpc` - Updated `getPendingOperations` with param `source` and `operationHash` #3034 +`@taquito/rpc` - Added Quebec protocol constant, `ConstantsResponseProto021`, to `ConstantsResponse` #3037 +`@taquito/rpc` - Removed endorsement compatibility (still kept rpc types and readProvider for user querying old blocks) #3036 + +### Documentation +Updated documentation with Quebec support #3068 +Fixed maps_bigmaps live code example bugs #3068 + +### Internals +Updated dependencies #3068 +Updated Taquito test dapp with Quebec support #3068 + # Taquito v20.1.2 ## Summary diff --git a/docs/wallet_API.md b/docs/wallet_API.md index ece08fb493..843c4cc0dd 100644 --- a/docs/wallet_API.md +++ b/docs/wallet_API.md @@ -88,7 +88,7 @@ Please check out the section [Subscribing to events](#subscribing-to-events) to In previous versions of Beacon, you were able to set the `network` property when doing `requestPermissions()`. This behavior was removed from Beacon, and you must now set the network when instantiating the wallet. -You can choose among `mainnet`, `parisnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: +You can choose among `mainnet`, `quebecnet`, `parisnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: ```js const userAddress = await wallet.getPKH(); @@ -175,7 +175,7 @@ const wallet = new TempleWallet('MyAwesomeDapp'); The class constructor takes one parameter, the name of your dapp (this will be used later in the transaction confirmation pop-up). After the instantiation, we can connect the wallet by calling the `connect` method: ```js -await wallet.connect('mainnet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox'); +await wallet.connect('mainnet' | 'quebecnet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox'); ``` (Temple used to be called Thanos and some Taquito code still uses the name Thanos.) diff --git a/docs/walletconnect.md b/docs/walletconnect.md index ca68e1d72d..6e5cfea953 100644 --- a/docs/walletconnect.md +++ b/docs/walletconnect.md @@ -96,7 +96,7 @@ WalletConnect.init({ console.log(`Waiting for ${op.opHash} to be confirmed...`); return op.confirmation().then(() => op.opHash); }) - .then((hash) => console.log(`https://ghostnet.tzkt.io/${hash}`)); + .then((hash) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)); }); }) .catch((err) => console.log(err)); diff --git a/example/deploy-test-dapp-contract.ts b/example/deploy-test-dapp-contract.ts index 99462d5e3b..ad7434983d 100644 --- a/example/deploy-test-dapp-contract.ts +++ b/example/deploy-test-dapp-contract.ts @@ -3,14 +3,13 @@ import { InMemorySigner } from '@taquito/signer' import { code, storage } from './data/test-dapp-contract'; // update the targeted rpc url before running -const rpcUrl = 'http://parisnet.i.ecadinfra.com:8732' - +const rpcUrl = 'https://rpc.quebecnet.teztnets.com' originate(rpcUrl) async function originate(url: string) { const Tezos = new TezosToolkit(url) - // if it's a new protocol might need to fund alice's address tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb - Tezos.setSignerProvider(new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq')) + // if it's a new protocol might need to fund address tz2RqxsYQyFuP9amsmrr25x9bUcBMWXGvjuD + Tezos.setSignerProvider(new InMemorySigner('spsk21y52Cp943kGnqPBSjXMC2xf1hz8QDGGih7AJdFqhxPcm1ihRN')) let contract = await Tezos.contract.originate({ diff --git a/example/example-streamer-custom-retry-logic.ts b/example/example-streamer-custom-retry-logic.ts index b8ad51c1ab..a595c36ffb 100644 --- a/example/example-streamer-custom-retry-logic.ts +++ b/example/example-streamer-custom-retry-logic.ts @@ -24,16 +24,12 @@ async function example() { and: [{ source: 'tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m' }, { kind: 'attestation' }] } - const bakerEndorsementFilter = { - and: [{ source: 'tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m' }, { kind: 'endorsement' }] - } - const bakerDelegation = { and: [{ destination: 'tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m' }, { kind: 'delegation' }] } tezos.stream.subscribeOperation({ - or: [bakerAttestationFilter, bakerEndorsementFilter, bakerDelegation] + or: [bakerAttestationFilter, bakerDelegation] }) } diff --git a/example/example-streamer.ts b/example/example-streamer.ts index e7702ae2d2..79d28d5319 100644 --- a/example/example-streamer.ts +++ b/example/example-streamer.ts @@ -10,16 +10,12 @@ async function example() { and: [{ source: 'tz1bQMn5xYFbX6geRxqvuAiTywsCtNywawxH' }, { kind: 'attestation' }] } - const bakerEndorsementFilter = { - and: [{ source: 'tz1bQMn5xYFbX6geRxqvuAiTywsCtNywawxH' }, { kind: 'endorsement' }] - } - const bakerDelegation = { and: [{ destination: 'tz1bQMn5xYFbX6geRxqvuAiTywsCtNywawxH' }, { kind: 'delegation' }] } const sub = tezos.stream.subscribeOperation({ - or: [bakerAttestationFilter, bakerEndorsementFilter, bakerDelegation] + or: [bakerAttestationFilter, bakerDelegation] }) sub.on('data', console.log) diff --git a/example/package.json b/example/package.json index 0c852d77f0..20a878d842 100644 --- a/example/package.json +++ b/example/package.json @@ -1,7 +1,7 @@ { "name": "@taquito/example", "private": true, - "version": "20.1.2", + "version": "21.0.0", "scripts": { "example": "node -r ts-node/register --preserve-symlinks example-node.ts", "example:activation": "node -r ts-node/register --preserve-symlinks example-activate.ts", @@ -42,16 +42,16 @@ }, "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.29.5", - "@taquito/ledger-signer": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/sapling": "^20.1.2", - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip16": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/ledger-signer": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/sapling": "^21.0.0", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip16": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/integration-tests/README.md b/integration-tests/README.md index d76fc14dc9..6b5ac9353a 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -37,7 +37,7 @@ Depending on the current Tezos upgrade cycle, multiple testnet networks may be c ``` -PARISNET=true npm run test +QUEBECNET=true npm run test ``` ## Configuration @@ -52,7 +52,7 @@ If different testnets are configured in the `config.ts` file, you can run tests ``` -npm run test:parisnet contract-with-bigmap-init.spec.ts +npm run test:quebecnet contract-with-bigmap-init.spec.ts ``` @@ -60,7 +60,7 @@ Or for a specific test within a test file: ``` -npm run test:parisnet -- -t "Verify contract.originate for a contract and call deposit method with unit param" +npm run test:quebecnet -- -t "Verify contract.originate for a contract and call deposit method with unit param" ``` @@ -70,7 +70,7 @@ npm run test:parisnet -- -t "Verify contract.originate for a contract and call d To run tests against a node that is not pre-configured in Taquito, use: -`export TEZOS_RPC_PARISNET='http://localhost:8732'`. +`export TEZOS_RPC_QUEBECNET='http://localhost:8732'`. ## Using a Secret Key Instead of the Keygen API @@ -79,7 +79,7 @@ By default, the integration tests use an ephemeral key managed by the Keygen API ``` -npm run test:parisnet-secret-key contract-with-bigmap-init.spec.ts +npm run test:quebecnet-secret-key contract-with-bigmap-init.spec.ts ``` diff --git a/integration-tests/__tests__/contract/estimation-tests.spec.ts b/integration-tests/__tests__/contract/estimation-tests.spec.ts index 60284943d7..d167dc228e 100644 --- a/integration-tests/__tests__/contract/estimation-tests.spec.ts +++ b/integration-tests/__tests__/contract/estimation-tests.spec.ts @@ -41,11 +41,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer({ to: await Tezos.signer.publicKeyHash(), amount: 0.019 }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(190); + expect(estimate.suggestedFeeMutez).toEqual(188); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(170); - expect(estimate.totalCost).toEqual(170); - expect(estimate.usingBaseFeeMutez).toEqual(170); + expect(estimate.minimalFeeMutez).toEqual(168); + expect(estimate.totalCost).toEqual(168); + expect(estimate.usingBaseFeeMutez).toEqual(168); expect(estimate.consumedMilligas).toEqual(100040); }); @@ -53,11 +53,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer({ to: await (await createAddress()).signer.publicKeyHash(), amount: 0.017 }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(277); - expect(estimate.suggestedFeeMutez).toEqual(190); + expect(estimate.suggestedFeeMutez).toEqual(188); expect(estimate.burnFeeMutez).toEqual(69250); - expect(estimate.minimalFeeMutez).toEqual(170); - expect(estimate.totalCost).toEqual(69420); - expect(estimate.usingBaseFeeMutez).toEqual(170); + expect(estimate.minimalFeeMutez).toEqual(168); + expect(estimate.totalCost).toEqual(69418); + expect(estimate.usingBaseFeeMutez).toEqual(168); expect(estimate.consumedMilligas).toEqual(100040); }); @@ -69,11 +69,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { }); expect(estimate.gasLimit).toEqual(677); expect(estimate.storageLimit).toEqual(591); - expect(estimate.suggestedFeeMutez).toEqual(539); + expect(estimate.suggestedFeeMutez).toEqual(537); expect(estimate.burnFeeMutez).toEqual(147750); - expect(estimate.minimalFeeMutez).toEqual(519); - expect(estimate.totalCost).toEqual(148269); - expect(estimate.usingBaseFeeMutez).toEqual(519); + expect(estimate.minimalFeeMutez).toEqual(517); + expect(estimate.totalCost).toEqual(148267); + expect(estimate.usingBaseFeeMutez).toEqual(517); expect(estimate.consumedMilligas).toEqual(676402); }); @@ -84,11 +84,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { }); expect(estimate.gasLimit).toEqual(100); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(185); + expect(estimate.suggestedFeeMutez).toEqual(183); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(165); - expect(estimate.totalCost).toEqual(165); - expect(estimate.usingBaseFeeMutez).toEqual(165); + expect(estimate.minimalFeeMutez).toEqual(163); + expect(estimate.totalCost).toEqual(163); + expect(estimate.usingBaseFeeMutez).toEqual(163); expect(estimate.consumedMilligas).toEqual(100000); }); @@ -97,12 +97,12 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(1457); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(398); + expect(estimate.suggestedFeeMutez).toEqual(396); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(378); - expect(estimate.totalCost).toEqual(378); - expect(estimate.usingBaseFeeMutez).toEqual(378); - expect(estimate.consumedMilligas).toEqual(1456228); + expect(estimate.minimalFeeMutez).toEqual(376); + expect(estimate.totalCost).toEqual(376); + expect(estimate.usingBaseFeeMutez).toEqual(376); + expect(estimate.consumedMilligas).toEqual(1456142); }); it('Verify .estimate.transfer for multiple internal transfers to unallocated account', async () => { @@ -114,12 +114,12 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(1571); expect(estimate.storageLimit).toEqual(534); - expect(estimate.suggestedFeeMutez).toEqual(469); + expect(estimate.suggestedFeeMutez).toEqual(467); expect(estimate.burnFeeMutez).toEqual(133500); - expect(estimate.minimalFeeMutez).toEqual(449); - expect(estimate.totalCost).toEqual(133949); - expect(estimate.usingBaseFeeMutez).toEqual(449); - expect(estimate.consumedMilligas).toEqual(1570757); + expect(estimate.minimalFeeMutez).toEqual(447); + expect(estimate.totalCost).toEqual(133947); + expect(estimate.usingBaseFeeMutez).toEqual(447); + expect(estimate.consumedMilligas).toEqual(1570671); }); it('Verify .estimate.transfer for internal origination', async () => { @@ -127,25 +127,25 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(1867); expect(estimate.storageLimit).toEqual(337); - expect(estimate.suggestedFeeMutez).toEqual(445); + expect(estimate.suggestedFeeMutez).toEqual(443); expect(estimate.burnFeeMutez).toEqual(84250); - expect(estimate.minimalFeeMutez).toEqual(425); - expect(estimate.totalCost).toEqual(84675); - expect(estimate.usingBaseFeeMutez).toEqual(425); - expect(estimate.consumedMilligas).toEqual(1866852); + expect(estimate.minimalFeeMutez).toEqual(423); + expect(estimate.totalCost).toEqual(84673); + expect(estimate.usingBaseFeeMutez).toEqual(423); + expect(estimate.consumedMilligas).toEqual(1866766); }); it('Verify .estimate.transfer for multiple internal originations', async () => { const tx = contract.methods.do(originate2()).toTransferParams(); const estimate = await LowAmountTez.estimate.transfer(tx); - expect(estimate.gasLimit).toEqual(2393); + expect(estimate.gasLimit).toEqual(2392); expect(estimate.storageLimit).toEqual(654); - expect(estimate.suggestedFeeMutez).toEqual(563); + expect(estimate.suggestedFeeMutez).toEqual(561); expect(estimate.burnFeeMutez).toEqual(163500); - expect(estimate.minimalFeeMutez).toEqual(543); - expect(estimate.totalCost).toEqual(164043); - expect(estimate.usingBaseFeeMutez).toEqual(543); - expect(estimate.consumedMilligas).toEqual(2392005); + expect(estimate.minimalFeeMutez).toEqual(541); + expect(estimate.totalCost).toEqual(164041); + expect(estimate.usingBaseFeeMutez).toEqual(541); + expect(estimate.consumedMilligas).toEqual(2391919); // Do the actual operation const op2 = await contract.methods.do(originate2()).send(); await op2.confirmation(); @@ -176,11 +176,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { let estimate = await LowAmountTez.estimate.transfer({ to: await Tezos.signer.publicKeyHash(), mutez: true, amount: amt - (1382 + getRevealFee(await LowAmountTez.signer.publicKeyHash())) }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(189); + expect(estimate.suggestedFeeMutez).toEqual(187); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(169); - expect(estimate.totalCost).toEqual(169); - expect(estimate.usingBaseFeeMutez).toEqual(169); + expect(estimate.minimalFeeMutez).toEqual(167); + expect(estimate.totalCost).toEqual(167); + expect(estimate.usingBaseFeeMutez).toEqual(167); expect(estimate.consumedMilligas).toEqual(100040); }); diff --git a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts index 93fdcef958..8eb825cd7e 100644 --- a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts +++ b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts @@ -3,19 +3,17 @@ import { OpKind, TezosToolkit } from "@taquito/taquito"; import { InMemorySigner } from "@taquito/signer"; import { verifySignature } from "@taquito/utils"; -CONFIGS().forEach(({ setup, rpc }) => { +CONFIGS().forEach(({ setup, rpc, lib }) => { let signerAlice = new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq') describe(`Test failing_noop through wallet api using: ${rpc}`, () => { - let Tezos: TezosToolkit; + const Tezos = lib beforeAll(async () => { setup(true) if (rpc.includes('paris')) { - Tezos = new TezosToolkit('https://rpc.tzkt.io/parisnet'); // public archive node to fetch genesis block - Tezos.setSignerProvider(signerAlice); // alice's secret key + Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/parisnet'}) } else if (rpc.includes('ghost')) { - Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); // public archive node to fetch genesis block - Tezos.setSignerProvider(signerAlice); // alice's secret key + Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/ghostnet'}) } }); diff --git a/integration-tests/__tests__/contract/operations/staking.spec.ts b/integration-tests/__tests__/contract/operations/staking.spec.ts index f1cebad17d..3a73aa3561 100644 --- a/integration-tests/__tests__/contract/operations/staking.spec.ts +++ b/integration-tests/__tests__/contract/operations/staking.spec.ts @@ -1,30 +1,37 @@ import { CONFIGS } from "../../../config"; +import { InvalidStakingAddressError, InvalidFinalizeUnstakeAmountError } from '@taquito/core'; -CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { +CONFIGS().forEach(({ lib, rpc, setup }) => { const Tezos = lib; describe(`Staking pseudo operations: ${rpc}`, () => { - beforeAll(async () => { await setup(true); - // There is no baker accept staking in betanet and weeklylnet hence tests will fail - // Currently TF is a baker that allows staking on parisnet. - if (rpc.includes('pariscnet')) { - knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF - } - const delegateOp = await Tezos.contract.setDelegate({ - delegate: knownBaker, - source: await Tezos.signer.publicKeyHash() - }); - await delegateOp.confirmation(); + try{ + const address = await Tezos.signer.publicKeyHash() + if(!await Tezos.rpc.getDelegate(address)){ + const delegateOp = await Tezos.contract.registerDelegate({}); + await delegateOp.confirmation(); + } + }catch(e){console.log} }); - it('should throw an error when the destination specified is not the same as source', async () => { + it('should throw error when param is against pseudo operation', async () => { + expect(async () => { + const op = await Tezos.contract.stake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); + expect(async () => { + const op = await Tezos.contract.unstake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); + expect(async () => { + const op = await Tezos.contract.finalizeUnstake({ to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); expect(async () => { - const op = await Tezos.contract.stake({ - amount: 0.1, - to: knownBaker - }); - }).rejects.toThrow(); + const op = await Tezos.contract.finalizeUnstake({ amount: 1 }); + await op.confirmation() + }).rejects.toThrow(InvalidFinalizeUnstakeAmountError); }); it('should be able to stake funds to a designated delegate', async () => { diff --git a/integration-tests/__tests__/pseudo-entrypoints-forging.spec.ts b/integration-tests/__tests__/pseudo-entrypoints-forging.spec.ts index d32c05525c..08d514c5a7 100644 --- a/integration-tests/__tests__/pseudo-entrypoints-forging.spec.ts +++ b/integration-tests/__tests__/pseudo-entrypoints-forging.spec.ts @@ -8,7 +8,7 @@ CONFIGS().forEach(({ rpc, protocol, setup, lib }) => { describe(`Test forging pseudo entrypoints: ${rpc}`, () => { let contract: DefaultContractType // for every new protocol need to check https://tezos.gitlab.io/shell/p2p_api.html#alpha-entrypoint-determined-from-data-8-bit-tag for the latest entrypoints and corresponding tag - let parisEntrypoint = { 0: 'default', 1: 'root', 2: 'do', 3: 'set_delegate', 4: 'remove_delegate', 5: 'deposit', 6: 'stake', 7: 'unstake', 8: 'finalize_unstake', 9: 'set_delegate_parameters' } + let quebecEntrypoint = { 0: 'default', 1: 'root', 2: 'do', 3: 'set_delegate', 4: 'remove_delegate', 5: 'deposit', 6: 'stake', 7: 'unstake', 8: 'finalize_unstake', 9: 'set_delegate_parameters' } beforeAll(async () => { await setup(); @@ -23,7 +23,7 @@ CONFIGS().forEach(({ rpc, protocol, setup, lib }) => { } catch(e) {console.log(e)} }) - Object.values(parisEntrypoint).forEach(name => { + Object.values(quebecEntrypoint).forEach(name => { it(`Verify that local forge will return same result as for rpc forge for entrypoints name ${name}`, async () => { const localForger = new LocalForger(protocol as unknown as ProtocolsHash); const methodObject = await contract.methodsObject[name](UnitValue) diff --git a/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts b/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts index 7b2ed9e818..b705cb2cd3 100644 --- a/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts +++ b/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts @@ -1,11 +1,12 @@ import { Protocols } from "@taquito/taquito"; import { CONFIGS, NetworkType } from "../../config"; import BigNumber from 'bignumber.js'; -import { ConstantsResponseProto019, ConstantsResponseProto020 } from '@taquito/rpc'; +import { ConstantsResponseProto020, ConstantsResponseProto021 } from '@taquito/rpc'; CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { const Tezos = lib; const parisnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsParisCZ) ? test : test.skip; + const quebecnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsQuebecn) ? test : test.skip; const weeklynet = (networkType == NetworkType.TESTNET && protocol === Protocols.ProtoALpha) ? test : test.skip; describe('Test fetching constants for all protocols on Mainnet', () => { const rpcUrl = 'https://mainnet.tezos.ecadinfra.com/'; @@ -303,122 +304,294 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { }); }); + quebecnet(`should successfully fetch all constants for Quebecnet + using ${rpc}`, async () => { + Tezos.setRpcProvider(rpc); + const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants(); + expect(constants).toEqual({ + adaptive_issuance_activation_vote_enable: true, + adaptive_issuance_force_activation: false, + adaptive_issuance_launch_ema_threshold: 0, + adaptive_rewards_params: { + center_dz: { + denominator: "2", + numerator: "1", + }, + growth_rate: { + denominator: "100", + numerator: "1", + }, + issuance_ratio_final_max: { + denominator: "10", + numerator: "1", + }, + issuance_ratio_final_min: { + denominator: "400", + numerator: "1", + }, + issuance_ratio_initial_max: { + denominator: "200", + numerator: "11", + }, + issuance_ratio_initial_min: { + denominator: "200", + numerator: "9" + }, + max_bonus: "50000000000000", + radius_dz: { + denominator: "50", + numerator: "1", + }, + initial_period: 10, + transition_period: 50 + }, + autostaking_enable: true, + proof_of_work_nonce_size: 8, + nonce_length: 32, + max_anon_ops_per_block: 132, + max_operation_data_length: 32768, + max_proposals_per_delegate: 20, + max_micheline_node_count: 50000, + max_micheline_bytes_limit: 50000, + max_allowed_global_constants_depth: 10000, + cache_layout_size: 3, + michelson_maximum_type_size: 2001, + smart_rollup_max_wrapped_proof_binary_size: 30000, + smart_rollup_max_number_of_messages_per_level: '1000000', + blocks_per_commitment: 25, + blocks_per_cycle: 210, + blocks_preservation_cycles: 1, + nonce_revelation_threshold: 50, + ns_enable: true, + cycles_per_voting_period: 1, + hard_gas_limit_per_operation: new BigNumber(1040000), + hard_gas_limit_per_block: new BigNumber(3328000), + proof_of_work_threshold: new BigNumber(-1), + minimal_stake: new BigNumber(6000000000), + origination_size: 257, + cost_per_byte: new BigNumber(250), + hard_storage_limit_per_operation: new BigNumber(60000), + percentage_of_frozen_deposits_slashed_per_double_attestation: 5000, + percentage_of_frozen_deposits_slashed_per_double_baking: 700, + minimal_frozen_stake: '600000000', + limit_of_delegation_over_baking: 9, + liquidity_baking_subsidy: new BigNumber(5000000), + issuance_weights: { + attesting_reward_weight: 10240, + baking_reward_bonus_weight: 5120, + baking_reward_fixed_portion_weight: 5120, + base_total_issued_per_minute: "85007812", + seed_nonce_revelation_tip_weight: 1, + vdf_revelation_tip_weight: 1, + }, + min_proposal_quorum: 500, + edge_of_staking_over_delegation: 3, + global_limit_of_staking_over_baking: 9, + liquidity_baking_toggle_ema_threshold: 100000, + max_operations_time_to_live: 187, + minimal_block_delay: new BigNumber(4), + delay_increment_per_round: new BigNumber(4), + delegate_parameters_activation_delay: 3, + direct_ticket_spending_enable: false, + consensus_committee_size: 7000, + consensus_threshold: 4667, + consensus_rights_delay: 2, + minimal_participation_ratio: { + numerator: 2, + denominator: 3 + }, + max_slashing_period: 2, + max_slashing_per_block: 10000, + max_slashing_threshold: 2334, + cache_script_size: 100000000, + cache_stake_distribution_cycles: 8, + cache_sampler_state_cycles: 8, + dal_parametric: { + attestation_lag: 8, + attestation_threshold: 66, + feature_enable: true, + incentives_enable: false, + number_of_shards: 512, + number_of_slots: 32, + page_size: 3967, + redundancy_factor: 8, + slot_size: 126944, + }, + quorum_max: 7000, + quorum_min: 2000, + smart_rollup_arith_pvm_enable: true, + smart_rollup_challenge_window_in_blocks: 62, + smart_rollup_commitment_period_in_blocks: 31, + smart_rollup_max_active_outbox_levels: 31500, + smart_rollup_max_lookahead_in_blocks: 46875, + smart_rollup_max_outbox_messages_per_level: 100, + smart_rollup_max_number_of_cemented_commitments: 5, + smart_rollup_max_number_of_parallel_games: 32, + smart_rollup_message_size_limit: 4096, + smart_rollup_number_of_sections_in_dissection: 32, + smart_rollup_origination_size: 6314, + smart_rollup_private_enable: true, + smart_rollup_reveal_activation_level: { + dal_attested_slots_validity_lag: 241920, + dal_page: 1, + dal_parameters: 1, + metadata: 0, + raw_data: { + Blake2B: 0, + }, + }, + smart_rollup_riscv_pvm_enable: true, + smart_rollup_stake_amount: '32000000', + smart_rollup_timeout_period_in_blocks: 781, + testnet_dictator: 'tz1e1TX7KghsqWUBXWmBTAAtPK3W6JTbNc82', + vdf_difficulty: new BigNumber(10000000), + zk_rollup_enable: true, + zk_rollup_max_ticket_payload_size: 2048, + zk_rollup_min_pending_to_process: 10, + zk_rollup_origination_size: 4000, + }); + }); + weeklynet(`should successfully fetch all constants for weeklynet using ${rpc}`, async () => { Tezos.setRpcProvider(rpc); - const constants: ConstantsResponseProto019 = await Tezos.rpc.getConstants(); + const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants(); expect(constants).toEqual({ - adaptive_issuance_launch_ema_threshold: 10000000, + adaptive_issuance_activation_vote_enable: true, + adaptive_issuance_force_activation: true, + adaptive_issuance_launch_ema_threshold: 0, adaptive_rewards_params: { center_dz: { denominator: "2", numerator: "1", }, - growth_rate: "115740740", - issuance_ratio_max: { + growth_rate: { + denominator: "100", + numerator: "1", + }, + issuance_ratio_final_max: { denominator: "10", numerator: "1", }, - issuance_ratio_min: { - denominator: "200", + issuance_ratio_final_min: { + denominator: "400", numerator: "1", }, + issuance_ratio_initial_max: { + denominator: "200", + numerator: "11", + }, + issuance_ratio_initial_min: { + denominator: "200", + numerator: "9" + }, max_bonus: "50000000000000", radius_dz: { denominator: "50", numerator: "1", }, + initial_period: 10, + transition_period: 50 }, + autostaking_enable: true, proof_of_work_nonce_size: 8, nonce_length: 32, - nonce_revelation_threshold: 32, max_anon_ops_per_block: 132, max_operation_data_length: 32768, max_proposals_per_delegate: 20, - preserved_cycles: 3, - blocks_per_cycle: 128, - blocks_per_commitment: 16, + max_micheline_node_count: 50000, + max_micheline_bytes_limit: 50000, + max_allowed_global_constants_depth: 10000, + cache_layout_size: 3, + michelson_maximum_type_size: 2001, + smart_rollup_max_wrapped_proof_binary_size: 30000, + smart_rollup_max_number_of_messages_per_level: '1000000', + blocks_per_commitment: 25, + blocks_per_cycle: 200, + blocks_preservation_cycles: 1, + nonce_revelation_threshold: 50, + ns_enable: true, + cycles_per_voting_period: 1, hard_gas_limit_per_operation: new BigNumber(1040000), - hard_gas_limit_per_block: new BigNumber(5200000), + hard_gas_limit_per_block: new BigNumber(3328000), proof_of_work_threshold: new BigNumber(-1), + minimal_stake: new BigNumber(6000000000), origination_size: 257, - percentage_of_frozen_deposits_slashed_per_double_baking: 11, - percentage_of_frozen_deposits_slashed_per_double_attestation: 50, cost_per_byte: new BigNumber(250), hard_storage_limit_per_operation: new BigNumber(60000), + percentage_of_frozen_deposits_slashed_per_double_attestation: 5000, + percentage_of_frozen_deposits_slashed_per_double_baking: 700, + minimal_frozen_stake: '600000000', + limit_of_delegation_over_baking: 9, + liquidity_baking_subsidy: new BigNumber(5000000), issuance_weights: { attesting_reward_weight: 10240, baking_reward_bonus_weight: 5120, baking_reward_fixed_portion_weight: 5120, base_total_issued_per_minute: "85007812", - liquidity_baking_subsidy_weight: 1280, seed_nonce_revelation_tip_weight: 1, vdf_revelation_tip_weight: 1, }, - limit_of_delegation_over_baking: 9, - quorum_min: 2000, - quorum_max: 7000, min_proposal_quorum: 500, + edge_of_staking_over_delegation: 2, + global_limit_of_staking_over_baking: 5, liquidity_baking_toggle_ema_threshold: 100000, - max_allowed_global_constants_depth: 10000, - max_micheline_bytes_limit: 50000, - max_micheline_node_count: 50000, - michelson_maximum_type_size: 2001, - blocks_per_stake_snapshot: 64, max_operations_time_to_live: 120, + minimal_block_delay: new BigNumber(4), + delay_increment_per_round: new BigNumber(4), + delegate_parameters_activation_delay: 3, + direct_ticket_spending_enable: false, consensus_committee_size: 7000, consensus_threshold: 4667, + consensus_rights_delay: 2, minimal_participation_ratio: { - denominator: 3, numerator: 2, + denominator: 3 }, max_slashing_period: 2, - minimal_block_delay: new BigNumber(7), - minimal_frozen_stake: "600000000", - delay_increment_per_round: new BigNumber(7), - edge_of_staking_over_delegation: 2, - global_limit_of_staking_over_baking: 5, + max_slashing_per_block: 10000, + max_slashing_threshold: 2334, + cache_script_size: 100000000, + cache_stake_distribution_cycles: 5, + cache_sampler_state_cycles: 5, dal_parametric: { - attestation_lag: 4, - attestation_threshold: 50, + attestation_lag: 8, + attestation_threshold: 66, feature_enable: true, - number_of_shards: 2048, + incentives_enable: false, + number_of_shards: 512, number_of_slots: 32, - page_size: 4096, - redundancy_factor: 16, - slot_size: 65536, - blocks_per_epoch: 32, + page_size: 3967, + redundancy_factor: 8, + slot_size: 126944, }, - minimal_stake: new BigNumber('6000000000'), - cache_layout_size: 3, - cache_sampler_state_cycles: 8, - cache_script_size: 100000000, - cache_stake_distribution_cycles: 8, - cycles_per_voting_period: 1, + quorum_max: 7000, + quorum_min: 2000, smart_rollup_arith_pvm_enable: true, - smart_rollup_challenge_window_in_blocks: 40, - smart_rollup_commitment_period_in_blocks: 20, - smart_rollup_max_active_outbox_levels: 20160, - smart_rollup_max_lookahead_in_blocks: 30000, + smart_rollup_challenge_window_in_blocks: 62, + smart_rollup_commitment_period_in_blocks: 31, + smart_rollup_max_active_outbox_levels: 31500, + smart_rollup_max_lookahead_in_blocks: 346875, + smart_rollup_max_outbox_messages_per_level: 100, smart_rollup_max_number_of_cemented_commitments: 5, - smart_rollup_max_number_of_messages_per_level: "1000000", smart_rollup_max_number_of_parallel_games: 32, - smart_rollup_max_outbox_messages_per_level: 100, - smart_rollup_max_wrapped_proof_binary_size: 30000, smart_rollup_message_size_limit: 4096, smart_rollup_number_of_sections_in_dissection: 32, smart_rollup_origination_size: 6314, smart_rollup_private_enable: true, smart_rollup_reveal_activation_level: { - dal_page: 0, + dal_attested_slots_validity_lag: 80, + dal_page: 1, + dal_parameters: 1, metadata: 0, raw_data: { Blake2B: 0, }, }, - smart_rollup_stake_amount: "32000000", - smart_rollup_timeout_period_in_blocks: 500, - vdf_difficulty: new BigNumber('10000000'), + smart_rollup_riscv_pvm_enable: true, + smart_rollup_stake_amount: '32000000', + smart_rollup_timeout_period_in_blocks: 781, + vdf_difficulty: new BigNumber(10000000), zk_rollup_enable: true, zk_rollup_max_ticket_payload_size: 2048, zk_rollup_min_pending_to_process: 10, diff --git a/integration-tests/__tests__/rpc/nodes.spec.ts b/integration-tests/__tests__/rpc/nodes.spec.ts index 082d689a80..b1b2798ebb 100644 --- a/integration-tests/__tests__/rpc/nodes.spec.ts +++ b/integration-tests/__tests__/rpc/nodes.spec.ts @@ -1,6 +1,6 @@ import { CONFIGS } from '../../config'; -import { DefaultContractType } from "@taquito/taquito"; -import { RpcClientCache, RpcClient, RPCRunViewParam, RPCRunScriptViewParam, PendingOperationsV1, PendingOperationsV2, PvmKind } from '@taquito/rpc'; +import { DefaultContractType, Protocols } from "@taquito/taquito"; +import { RpcClientCache, RpcClient, RPCRunViewParam, RPCRunScriptViewParam, PendingOperationsV1, PendingOperationsV2 } from '@taquito/rpc'; import { encodeExpr } from '@taquito/utils'; import { Schema } from '@taquito/michelson-encoder'; import { tokenBigmapCode, tokenBigmapStorage } from '../../data/token_bigmap'; @@ -19,8 +19,9 @@ CONFIGS().forEach( knownViewContract, }) => { const Tezos = lib; - const unrestrictedRPCNode = rpc.endsWith("ecadinfra.com") ? test.skip : test; - + const unrestrictedRPCNode = rpc.includes("teztnets.com") || rpc.includes("net-rolling-1.i.ecadinfra.com") ? test : test.skip; + const parisnet = protocol === Protocols.PsParisCZ ? test : test.skip; + const quebecnet = protocol === Protocols.PsQuebecn ? test : test.skip; let ticketContract: DefaultContractType; beforeAll(async () => { @@ -66,6 +67,21 @@ CONFIGS().forEach( expect(balance).toBeDefined(); }); + quebecnet(`Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds`, async () => { + const balance = await rpcClient.getSpendable(knownBaker); + expect(balance).toBeDefined(); + }); + + it(`Verify that rpcClient.getBalanceAndFrozenBonds for knownBaker returns the full balance`, async () => { + const balance = await rpcClient.getBalanceAndFrozenBonds(knownBaker); + expect(balance).toBeDefined(); + }); + + quebecnet(`Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance`, async () => { + const balance = await rpcClient.getSpendableAndFrozenBonds(knownBaker); + expect(balance).toBeDefined(); + }); + it(`Verify that rpcClient.getFullBalance for knownBaker returns the full balance`, async () => { const balance = await rpcClient.getFullBalance(knownBaker); expect(balance).toBeDefined(); @@ -486,12 +502,12 @@ CONFIGS().forEach( expect(launchCycle).toEqual(1054); } else if (rpc.includes('parisnet')) { expect(launchCycle).toEqual(6); - } else if (rpc.includes('mondaynet') || rpc.includes('weeklynet')) { + } else if (rpc.includes('quebecnet') || rpc.includes('weeklynet')) { expect(launchCycle).toEqual(5); } }) - it('Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied', async () => { + parisnet('Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied', async () => { const pendingOperations = await rpcClient.getPendingOperations({ version: '1' }) as PendingOperationsV1; expect(pendingOperations).toBeDefined(); expect(pendingOperations.applied).toBeInstanceOf(Array); diff --git a/integration-tests/__tests__/wallet/failing-noop.spec.ts b/integration-tests/__tests__/wallet/failing-noop.spec.ts index fff84b0f99..19d7eba483 100644 --- a/integration-tests/__tests__/wallet/failing-noop.spec.ts +++ b/integration-tests/__tests__/wallet/failing-noop.spec.ts @@ -3,19 +3,17 @@ import { OpKind, TezosToolkit } from "@taquito/taquito"; import { InMemorySigner } from "@taquito/signer"; import { verifySignature } from "@taquito/utils"; -CONFIGS().forEach(({ setup, rpc }) => { +CONFIGS().forEach(({ setup, rpc, lib }) => { let signerAlice = new InMemorySigner('edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq') describe(`Test failing_noop through wallet api using: ${rpc}`, () => { - let Tezos: TezosToolkit; + const Tezos = lib beforeAll(async () => { setup(true) if (rpc.includes('paris')) { - Tezos = new TezosToolkit('https://rpc.tzkt.io/parisnet'); // public archive node to fetch genesis block - Tezos.setSignerProvider(signerAlice); // alice's secret key + Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/parisnet'}) } else if (rpc.includes('ghost')) { - Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); // public archive node to fetch genesis block - Tezos.setSignerProvider(signerAlice); // alice's secret key + Tezos.setProvider({signer: signerAlice, rpc: 'https://rpc.tzkt.io/ghostnet'}) } }); diff --git a/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts b/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts index 66f01da3dd..a4f2db42a1 100644 --- a/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts +++ b/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts @@ -1,25 +1,38 @@ import { CONFIGS } from '../../config'; import { InvalidStakingAddressError, InvalidFinalizeUnstakeAmountError } from '@taquito/core'; -CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { +CONFIGS().forEach(({ lib, rpc, setup }) => { const Tezos = lib; describe(`Test staking pseudo operations using: ${rpc}`, () => { beforeAll(async () => { await setup(true); - try { - // There is no baker accept staking in betanet and weeklylnet hence tests will fail - // Currently TF is a baker that allows staking on parisnet. - if (rpc.includes('pariscnet')) { - knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF + try{ + const address = await Tezos.signer.publicKeyHash() + if(!await Tezos.rpc.getDelegate(address)){ + const delegateOp = await Tezos.contract.registerDelegate({}); + await delegateOp.confirmation(); } - const delegateOp = await Tezos.contract.setDelegate({ - delegate: knownBaker, - source: await Tezos.signer.publicKeyHash() - }); - await delegateOp.confirmation(); - } catch (e) { - console.log(JSON.stringify(e)); - } + }catch(e){console.log} + }); + + it('should throw error when param is against pseudo operation', async () => { + expect(async () => { + const op = await Tezos.wallet.stake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); + + expect(async () => { + const op = await Tezos.wallet.unstake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); + expect(async () => { + const op = await Tezos.wallet.finalizeUnstake({ to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); + await op.confirmation() + }).rejects.toThrow(InvalidStakingAddressError); + expect(async () => { + const op = await Tezos.wallet.finalizeUnstake({ amount: 1 }).send(); + await op.confirmation() + }).rejects.toThrow(InvalidFinalizeUnstakeAmountError); }); it(`should be able to stake successfully: ${rpc}`, async () => { @@ -29,7 +42,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { const stakedBalance = await Tezos.rpc.getStakedBalance(await Tezos.signer.publicKeyHash()); // staked balance returned in mutez therefore dividing by 1000000 and rounding explanation here https://tezos-dev.slack.com/archives/C05RS0MEJ9H/p1714641691368019?thread_ts=1714604532.409029&cid=C05RS0MEJ9H - expect(Math.round(stakedBalance.toNumber() / 1000000)).toEqual(3); + expect(Math.round(stakedBalance.toNumber() / 1000000)).toBeGreaterThanOrEqual(3); }); it(`should be able to unstake successfully: ${rpc}`, async () => { @@ -39,7 +52,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { const UnstakedBalance = await Tezos.rpc.getUnstakedFrozenBalance(await Tezos.signer.publicKeyHash()); // unstaked balance returned in mutez therefore dividing by 1000000 and rounding explanation here https://tezos-dev.slack.com/archives/C05RS0MEJ9H/p1714641691368019?thread_ts=1714604532.409029&cid=C05RS0MEJ9H - expect(Math.round(UnstakedBalance.toNumber() / 1000000)).toEqual(1); + expect(Math.round(UnstakedBalance.toNumber() / 1000000)).toBeGreaterThanOrEqual(1); }); it(`should be able to finalizeUnstake successfully: ${rpc}`, async () => { @@ -47,20 +60,5 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { await op.confirmation(); expect(await op.status()).toBe('applied'); }); - - it('should throw error when param is against pseudo operation', async () => { - expect(async () => { - const op = await Tezos.wallet.stake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); - }).rejects.toThrow(InvalidStakingAddressError); - expect(async () => { - const op = await Tezos.wallet.unstake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); - }).rejects.toThrow(InvalidStakingAddressError); - expect(async () => { - const op = await Tezos.wallet.finalizeUnstake({ to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); - }).rejects.toThrow(InvalidStakingAddressError); - expect(async () => { - const op = await Tezos.wallet.finalizeUnstake({ amount: 1 }).send(); - }).rejects.toThrow(InvalidFinalizeUnstakeAmountError); - }); }); -}); +}); \ No newline at end of file diff --git a/integration-tests/config.ts b/integration-tests/config.ts index 4d447806f6..8b64bbbef6 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -8,7 +8,7 @@ import { KnownContracts } from './known-contracts'; import { knownContractsProtoALph } from './known-contracts-ProtoALph'; import { knownContractsPtGhostnet } from './known-contracts-PtGhostnet'; import { knownContractsPsParisCZ } from './known-contracts-PsParisCZ'; -import { knownContractsPtNairobi } from './known-contracts-PtNairobi'; +import { knownContractsPsQuebecn } from './known-contracts-PsQuebecn'; const nodeCrypto = require('crypto'); @@ -117,7 +117,7 @@ const defaultConfig = ({ rpc: process.env[`TEZOS_RPC_${networkName}`] || defaultRpc, pollingIntervalMilliseconds: process.env[`POLLING_INTERVAL_MILLISECONDS`] || undefined, rpcCacheMilliseconds: process.env[`RPC_CACHE_MILLISECONDS`] || '1000', - knownBaker: process.env[`TEZOS_BAKER`] || (networkName === 'WEEKLYNET' ? 'tz1ck3EJwzFpbLVmXVuEn5Ptwzc6Aj14mHSH' : 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'), + knownBaker: process.env[`TEZOS_BAKER`] || (networkName === 'QUEBECNET' ? 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD' : 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb'), knownContract: process.env[`TEZOS_${networkName}_CONTRACT_ADDRESS`] || knownContracts.contract, knownBigMapContract: process.env[`TEZOS_${networkName}_BIGMAPCONTRACT_ADDRESS`] || knownContracts.bigMapContract, knownTzip1216Contract: process.env[`TEZOS_${networkName}_TZIP1216CONTRACT_ADDRESS`] || knownContracts.tzip12BigMapOffChainContract, @@ -141,15 +141,18 @@ const parisnetEphemeral: Config = const parisnetSecretKey: Config = { ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://rpc.pariscnet.teztnets.com/' } }; -const nairobinetSecretKey: Config = +const quebecnetEphemeral: Config = defaultConfig({ - networkName: 'NAIROBINET', - protocol: Protocols.PtNairobi, - defaultRpc: 'http://ecad-nairobinet-full:8732', - knownContracts: knownContractsPtNairobi, - signerConfig: defaultSecretKey + networkName: 'QUEBECNET', + protocol: Protocols.PsQuebecn, + defaultRpc: 'http://ecad-tezos-quebecnet-rolling-1.i.ecadinfra.com/', + knownContracts: knownContractsPsQuebecn, + signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/quebecnet') }) + const quebecnetSecretKey: Config = + { ...quebecnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://rpc.quebeccnet.teztnets.com/' } }; + const ghostnetEphemeral: Config = defaultConfig({ networkName: 'GHOSTNET', @@ -160,13 +163,13 @@ const ghostnetEphemeral: Config = }); const ghostnetSecretKey: Config = - { ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-tezos-ghostnet-rolling-1.i.ecadinfra.com/' } }; + { ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://ghostnet.ecadinfra.com' } }; const weeklynetEphemeral: Config = defaultConfig({ networkName: 'WEEKLYNET', protocol: Protocols.ProtoALpha, - defaultRpc: 'https://rpc.weeklynet-2024-11-27.teztnets.com', + defaultRpc: 'https://rpc.weeklynet-2024-12-18.teztnets.com', knownContracts: knownContractsProtoALph, signerConfig: defaultEphemeralConfig('http://key-gen-1.i.tez.ie:3010/mondaynet') }); @@ -177,23 +180,25 @@ const weeklynetSecretKey: Config = const providers: Config[] = []; if (process.env['RUN_WITH_SECRET_KEY']) { - providers.push(parisnetSecretKey); + providers.push(quebecnetSecretKey); } else if (process.env['RUN_PARISNET_WITH_SECRET_KEY']) { providers.push(parisnetSecretKey); } else if (process.env['RUN_GHOSTNET_WITH_SECRET_KEY']) { providers.push(ghostnetSecretKey); -} else if (process.env['RUN_NAIROBINET_WITH_SECRET_KEY']) { - providers.push(nairobinetSecretKey); +} else if (process.env['RUN_QUEBECNET_WITH_SECRET_KEY']) { + providers.push(quebecnetSecretKey); } else if (process.env['RUN_WEEKLYNET_WITH_SECRET_KEY']) { providers.push(weeklynetSecretKey); } else if (process.env['PARISNET']) { providers.push(parisnetEphemeral); } else if (process.env['GHOSTNET']) { - providers.push(ghostnetEphemeral); + providers.push(quebecnetEphemeral); +} else if (process.env['QUEBECNET']) { + providers.push(quebecnetEphemeral); } else if (process.env['WEEKLYNET']) { providers.push(weeklynetEphemeral); } else { - providers.push(parisnetEphemeral); + providers.push(quebecnetEphemeral); } const setupForger = (Tezos: TezosToolkit, forger: ForgerType): void => { diff --git a/integration-tests/known-contracts-ProtoALph.ts b/integration-tests/known-contracts-ProtoALph.ts index d8a8b93389..cb83ed842e 100644 --- a/integration-tests/known-contracts-ProtoALph.ts +++ b/integration-tests/known-contracts-ProtoALph.ts @@ -1,8 +1,8 @@ import { KnownContracts } from './known-contracts'; export const knownContractsProtoALph: KnownContracts = { - contract: "KT1XXrWDuK77kQWX55zjD347Wh6bwgmJDfJ8", - bigMapContract: "KT1NSDEhMTWoX2Vie98NCtQV4fVYoPfqfAN3", - tzip12BigMapOffChainContract: "KT1X4c8BCVSDE7dtf5jPRtpYtYcaSFknwzN5", - saplingContract: "KT1JKC49zUSCXJGKT2p1bHVWmg47rAgF53ff", - onChainViewContractAddress: "KT1FVjUZeH5KM8tMwYvrVCMC3QFyDRUBFNLk", + contract: "KT1NU3z6vzQuVBMrkCgX3mQpU17wA7G7SKAS", + bigMapContract: "KT1AjNnhB43DCYNxkyQSFuG1tEPXFUTti39n", + tzip12BigMapOffChainContract: "KT1KJqM6UkQf6nk2csMbLSqV7ivkMYFcU88f", + saplingContract: "KT1R3pzTFYxb4nEr8xmofbBAuFhc6AZedsbE", + onChainViewContractAddress: "KT1GcSugQyFwCWuA3bNqm5w3GtPaG5iKd91u", }; diff --git a/integration-tests/known-contracts-PsQuebecn.ts b/integration-tests/known-contracts-PsQuebecn.ts new file mode 100644 index 0000000000..9fcc164cbd --- /dev/null +++ b/integration-tests/known-contracts-PsQuebecn.ts @@ -0,0 +1,8 @@ +import { KnownContracts } from './known-contracts'; +export const knownContractsPsQuebecn: KnownContracts = { + contract: "KT1FgT84FrqpCVg2TK8MFSYTumkzxqtJYzQV", + bigMapContract: "KT1GUuMynTFvEi4zFC6w8WWbMtRdFYWCGvBV", + tzip12BigMapOffChainContract: "KT1HW4jLAy8q52cXSsdKRXpDrgbobK6GCHfE", + saplingContract: "KT1H5U6DYcmBnxeywD1Usi74agwxNX63pXUK", + onChainViewContractAddress: "KT1NMQN7dEtALemqWJooQvvKgAHa4ZtuoFE4", +}; diff --git a/integration-tests/known-contracts-PtNairobi.ts b/integration-tests/known-contracts-PtNairobi.ts deleted file mode 100644 index b830cd3f4b..0000000000 --- a/integration-tests/known-contracts-PtNairobi.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { KnownContracts } from './known-contracts'; -export const knownContractsPtNairobi: KnownContracts = { - contract: "", - bigMapContract: "", - tzip12BigMapOffChainContract: "", - saplingContract: "", - onChainViewContractAddress: "" -}; \ No newline at end of file diff --git a/integration-tests/originate-known-contracts.ts b/integration-tests/originate-known-contracts.ts index 946ed90d83..9b872f30a2 100644 --- a/integration-tests/originate-known-contracts.ts +++ b/integration-tests/originate-known-contracts.ts @@ -8,7 +8,7 @@ import { codeViewsTopLevel } from './data/contract_views_top_level'; import { knownBigMapContract } from './data/knownBigMapContract'; import { knownContract } from './data/knownContract'; import * as fs from 'fs/promises'; - +// before running the test with secret key make sure tz2RqxsYQyFuP9amsmrr25x9bUcBMWXGvjuD is funded const MUTEZ_UNIT = new BigNumber(1000000); CONFIGS().forEach(({ lib, setup, protocol }) => { diff --git a/integration-tests/package.json b/integration-tests/package.json index dbe3540fa9..a996ae85bf 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -5,7 +5,8 @@ "test:secret-key": "RUN_WITH_SECRET_KEY=true jest --runInBand", "test:parisnet": "PARISNET=true jest", "test:parisnet-secret-key": "RUN_PARISNET_WITH_SECRET_KEY=true jest --runInBand", - "test:nairobinet-secret-key": "RUN_NAIROBINET_WITH_SECRET_KEY=true jest --runInBand", + "test:quebecnet": "QUEBECNET=true jest", + "test:quebecnet-secret-key": "RUN_QUEBECNET_WITH_SECRET_KEY=true jest --runInBand", "test:weeklynet": "WEEKLYNET=true jest", "test:weeklynet-secret-key": "RUN_WEEKLYNET_WITH_SECRET_KEY=true jest --runInBand", "test:ghostnet": "GHOSTNET=true jest", @@ -13,26 +14,26 @@ "originate-known-contracts": "node -r ts-node/register originate-known-contracts.ts", "originate-known-contracts-and-run-test": "node -r ts-node/register originate-known-contracts.ts && jest" }, - "version": "20.1.2", + "version": "21.0.0", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.2", - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/remote-signer": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/sapling": "^20.1.2", - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip12": "^20.1.2", - "@taquito/tzip16": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/contracts-library": "^21.0.0", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/remote-signer": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/sapling": "^21.0.0", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip12": "^21.0.0", + "@taquito/tzip16": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" diff --git a/lerna.json b/lerna.json index 4c2fc6e966..6ffeca5727 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { "useNx": true, - "version": "20.1.2" + "version": "21.0.0" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fe1f21cd1c..81cbc49436 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,15 +56,15 @@ }, "apps/taquito-test-dapp": { "name": "taquito-test-dapp-vite", - "version": "20.1.2", - "dependencies": { - "@airgap/beacon-sdk": "^4.3.1", - "@airgap/beacon-types": "^4.3.1", - "@taquito/beacon-wallet": "^20.1.2", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", - "@taquito/wallet-connect": "^20.1.2", + "version": "21.0.0", + "dependencies": { + "@airgap/beacon-sdk": "^4.3.2-beta.0", + "@airgap/beacon-types": "^4.3.2-beta.0", + "@taquito/beacon-wallet": "^21.0.0", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", + "@taquito/wallet-connect": "^21.0.0", "buffer": "^6.0.3", "svelte-modals": "^2.0.0-beta.2", "svelte-select": "^5.8.3", @@ -76,7 +76,7 @@ "events": "^3.3.0", "lerna": "^8.1.7", "prettier-plugin-svelte": "^3.2.6", - "sass": "^1.80.1", + "sass": "^1.81.0", "svelte": "^4.2.19", "svelte-check": "^3.8.5", "svelte-preprocess": "^6.0.2", @@ -111,19 +111,19 @@ }, "example": { "name": "@taquito/example", - "version": "20.1.2", + "version": "21.0.0", "dependencies": { "@ledgerhq/hw-transport-node-hid": "^6.29.5", - "@taquito/ledger-signer": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/sapling": "^20.1.2", - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip16": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/ledger-signer": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/sapling": "^21.0.0", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip16": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -132,26 +132,26 @@ } }, "integration-tests": { - "version": "20.1.2", + "version": "21.0.0", "dependencies": { "@ledgerhq/devices": "8.4.4", "@ledgerhq/hw-transport": "6.31.4", "@ledgerhq/hw-transport-node-hid": "6.29.5", "@ledgerhq/hw-transport-node-hid-noevents": "6.30.5", - "@taquito/contracts-library": "^20.1.2", - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/remote-signer": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/sapling": "^20.1.2", - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip12": "^20.1.2", - "@taquito/tzip16": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/contracts-library": "^21.0.0", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/remote-signer": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/sapling": "^21.0.0", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip12": "^21.0.0", + "@taquito/tzip16": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1" @@ -183,33 +183,33 @@ } }, "node_modules/@airgap/beacon-blockchain-substrate": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.3.1.tgz", - "integrity": "sha512-kUnIo4qlGJDvheupN5S4ax1MrjsT6Idw4L/6KhpRTLIHd9yXz6JEJRLgrxIp4pFtmGsxIxol8kPnNTSMu15DhA==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.3.2-beta.0.tgz", + "integrity": "sha512-jjf4WllviUVRUqBFB/hlbGYBsk846ZswvYlvOj1u+2GCmih8K+AP8bGM82vLELg0qXkxZkVyfu+qCWEFZ5ljmQ==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } }, "node_modules/@airgap/beacon-blockchain-tezos": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.3.1.tgz", - "integrity": "sha512-aLTtwQeC0OQ64uCx66PF04oYKMeqXFh1EXD3KIk7Mv7fKlizDg7+MObcxdixAg1vObA2JDreurJTU9Uui7XVCw==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.3.2-beta.0.tgz", + "integrity": "sha512-KEPbFKVlURY8RoL6JzdjVW3cCAepz/WtqHyyEjcmwV9aP6pxjBFdTv6PM49ECD2vNzXPo+AGrbYCU2HYKDwRlg==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1" + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0" } }, "node_modules/@airgap/beacon-core": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.3.1.tgz", - "integrity": "sha512-Zo4dG6R7ZBapGTvuBSBM9jPIJYW3DJjEcbshJLnLBgCU3zjcitnW6auKaqpWjWIXqwP2ThzYwpjftWKpavCf9g==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.3.2-beta.0.tgz", + "integrity": "sha512-GKXsbXqLaoeKaZH8ySuRBmE/cjUfWBCMEEXssUHynEaOwyDhGjEwDnIEX2QvO77xTgpOOW0Ag4LDxWsM4nLNYw==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@stablelib/ed25519": "^1.0.3", "@stablelib/nacl": "^1.0.4", "@stablelib/utf8": "^1.0.1", @@ -248,75 +248,75 @@ } }, "node_modules/@airgap/beacon-dapp": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.3.1.tgz", - "integrity": "sha512-WTQB7ULv9ergD+6OSv9RDbZyWjSCForWUEhKNMbAYd1RZSz4bcoMaqw8/0v97b+bjLayZmqNqhrUEo0Y7z/jXw==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.3.2-beta.0.tgz", + "integrity": "sha512-9w20A4TBdWtfzZ05lojadJN2mW1v/EUJU0354C+ltOV5VSsdaxY2wEEokWWZ5zEREGTqxvVw+mbtOK/x9MzbWg==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-transport-walletconnect": "4.3.1", - "@airgap/beacon-ui": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-transport-walletconnect": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", "broadcast-channel": "^7.0.0" } }, "node_modules/@airgap/beacon-sdk": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.3.1.tgz", - "integrity": "sha512-zk6HkieYGHY+LrA+VPpoQhbTjAQuDzGU81L3mzyECFg0/HWamiY3Tr9BpwwGKIJo1IW8WV1HLfzhE9SckzA0aA==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.3.2-beta.0.tgz", + "integrity": "sha512-iCHv5BiLFZVQQwx1410ppI7AazklzCcmiThorIR/xdNa/Jho9Bi21IQmOcJ1AesqyxnWp5xGfD/LRH9e+ij2mA==", "license": "ISC", "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.3.1", - "@airgap/beacon-blockchain-tezos": "4.3.1", - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-dapp": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-ui": "4.3.1", - "@airgap/beacon-utils": "4.3.1", - "@airgap/beacon-wallet": "4.3.1" + "@airgap/beacon-blockchain-substrate": "4.3.2-beta.0", + "@airgap/beacon-blockchain-tezos": "4.3.2-beta.0", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-dapp": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-ui": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", + "@airgap/beacon-wallet": "4.3.2-beta.0" } }, "node_modules/@airgap/beacon-transport-matrix": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.3.1.tgz", - "integrity": "sha512-Kmm2056712xSbGkIFWM2IEeifw++owHubOg163bCcvSPc6dwNgTodZdbeXmkpHcTg8ZisRhe0j46IRwvMcw4gg==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.3.2-beta.0.tgz", + "integrity": "sha512-QB/fdHnD7Av0u6rkkEWt5+IMrKrlv4n+fMN6YqJXomlXke8HExldHMd80sQygMfXP0979uKkUGMDIA228YZMng==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "axios": "^1.6.2" } }, "node_modules/@airgap/beacon-transport-postmessage": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.3.1.tgz", - "integrity": "sha512-Dy3LsIhNkqR7s85iOnt0iAqoB3k9NPyP4x4uHEhhyV8jEn0Z03N+Ra09Zk3RvysqS5oIoFWPjuaG8HvRjuXihg==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.3.2-beta.0.tgz", + "integrity": "sha512-0Z3fnws5MZS0/5T7ydr6IXP/uqLTKtIeeKf7oLCj8OQKXfXLqNoOnApNS5jjIclE7QoKWka56dyzW6iLfeIMMA==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0" } }, "node_modules/@airgap/beacon-transport-walletconnect": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.3.1.tgz", - "integrity": "sha512-UACRVnM6O6qVDua5nBBcY94FfiLxU56cArHVeNVTA2cp9jOyeE2JPUJ4jcaPs4yslikFbsT21Vn3d5FJl5Y1YQ==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.3.2-beta.0.tgz", + "integrity": "sha512-cV7eCSHTqEb+ZFvN6Gsq/vyYKzTp4IkLg8Y9I/B3x33C2ZW75Vd4XidPGBe7HxH+LGWOcyZQ5i9dlD7+b/VujQ==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/sign-client": "2.14.0" } }, "node_modules/@airgap/beacon-types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.3.1.tgz", - "integrity": "sha512-XYLZRQFRtfO33q/ZBSdssRIQHNXuRtoJhsnsmwwnbBssJKtiKEPfC0D+cf7BeBKoOObjigCIh9NixrPk+YyNeA==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.3.2-beta.0.tgz", + "integrity": "sha512-nGtC+k4BgrY67//DYEQHwkYppYBHMqeLm9xv34ECRb8VCR2AraMDULpHbmGOnrPeDh1rwfA2mPAWyH1kcad1DQ==", "license": "ISC", "dependencies": { "@types/chrome": "0.0.246" @@ -333,15 +333,15 @@ } }, "node_modules/@airgap/beacon-ui": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.3.1.tgz", - "integrity": "sha512-OJYrQlQxU98ZckW4xhyX1+hEMLOEd80N302sauKGzpUv7P0oxBfMLHaTVhQlZ7A+cAJkwMSqBa+Ek19QRPvoiQ==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.3.2-beta.0.tgz", + "integrity": "sha512-hnt80B4ZdYAs5xkZ0waCDkKpmTh3M+Xntr3f0H5UJ0ckWuaMzkns6Z1qbAgMAtSibjCyW93GAhO6izh/VUod6A==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1", - "@airgap/beacon-types": "4.3.1", - "@airgap/beacon-utils": "4.3.1", + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0", + "@airgap/beacon-types": "4.3.2-beta.0", + "@airgap/beacon-utils": "4.3.2-beta.0", "@walletconnect/utils": "2.14.0", "qrcode-svg": "^1.1.0", "solid-js": "^1.7.11" @@ -402,9 +402,9 @@ } }, "node_modules/@airgap/beacon-utils": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.3.1.tgz", - "integrity": "sha512-6mghsASMxObCLcypsnTC38S+BkW8oZNxeuiSjPQSNE5c5LtNmDWS0Lm+UF69FjaskcbiUOxJWhOnmZZM3A9hcg==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.3.2-beta.0.tgz", + "integrity": "sha512-yh82G8fsy/g1UkNI//M0oUKRnstBOertNjnkovHTboW3H6ihA6YscsqXYr1tp2WQDjHMqiZFytBIek+65c5PPA==", "license": "ISC", "dependencies": { "@stablelib/ed25519": "^1.0.3", @@ -444,14 +444,14 @@ } }, "node_modules/@airgap/beacon-wallet": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.3.1.tgz", - "integrity": "sha512-xsZdZLAsT4yKj2wz7lhMXhLChFhk1GglHi0bLaiJIi0ZycAbB76gOIwSAat7otMBLaswJj0b08JRinOCN4bf6Q==", + "version": "4.3.2-beta.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.3.2-beta.0.tgz", + "integrity": "sha512-arxpuvHnRu11RaYuLC5xaJttzjnXHkhBnO3GMhUQGgYMxauE9lEmbDzun8IDbMNUUHIPHTvuGEKxsFAIlq0Uzw==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.3.1", - "@airgap/beacon-transport-matrix": "4.3.1", - "@airgap/beacon-transport-postmessage": "4.3.1" + "@airgap/beacon-core": "4.3.2-beta.0", + "@airgap/beacon-transport-matrix": "4.3.2-beta.0", + "@airgap/beacon-transport-postmessage": "4.3.2-beta.0" } }, "node_modules/@airgap/sapling-wasm": { @@ -16370,9 +16370,9 @@ } }, "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", "dev": true, "license": "MIT" }, @@ -24993,14 +24993,14 @@ } }, "node_modules/sass": { - "version": "1.80.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.6.tgz", - "integrity": "sha512-ccZgdHNiBF1NHBsWvacvT5rju3y1d/Eu+8Ex6c21nHp2lZGLBEtuwc415QfiI1PJa1TpCo3iXwwSRjRpn2Ckjg==", + "version": "1.83.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz", + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", "dev": true, "license": "MIT", "dependencies": { "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { @@ -26057,7 +26057,7 @@ "postcss": "^7 || ^8", "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0", "pug": "^3.0.0", - "sass": "^1.26.8", + "sass": "^1.81.0", "stylus": "^0.55.0", "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0", @@ -26142,7 +26142,7 @@ "postcss": "^7 || ^8", "postcss-load-config": ">=3", "pug": "^3.0.0", - "sass": "^1.26.8", + "sass": "^1.81.0", "stylus": ">=0.55", "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0", "svelte": "^4.0.0 || ^5.0.0-next.100 || ^5.0.0", @@ -28511,17 +28511,17 @@ }, "packages/taquito": { "name": "@taquito/taquito", - "version": "20.1.2", + "version": "21.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -28569,13 +28569,12 @@ }, "packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@airgap/beacon-dapp": "^4.3.1", - "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", + "@airgap/beacon-dapp": "^4.3.2-beta.0", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", "@testing-library/react": "^16.0.1" }, "devDependencies": { @@ -28627,13 +28626,13 @@ }, "packages/taquito-contracts-library": { "name": "@taquito/contracts-library", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -28670,7 +28669,7 @@ }, "packages/taquito-core": { "name": "@taquito/core", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -28687,10 +28686,10 @@ }, "packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", + "@taquito/core": "^21.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -28748,14 +28747,14 @@ }, "packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -28816,15 +28815,15 @@ }, "packages/taquito-local-forging": { "name": "@taquito/local-forging", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.2", + "@taquito/rpc": "^21.0.0", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", @@ -28862,10 +28861,10 @@ }, "packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2" + "@taquito/core": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -28894,21 +28893,21 @@ } }, "packages/taquito-michel-codec/pack-test-tool": { - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.1.2", + "@taquito/rpc": "^21.0.0", "yargs": "^17.7.2" } }, "packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -28945,15 +28944,15 @@ }, "packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -28990,12 +28989,12 @@ }, "packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -29031,17 +29030,17 @@ }, "packages/taquito-sapling": { "name": "@taquito/sapling", - "version": "20.1.2", + "version": "21.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", @@ -29102,7 +29101,7 @@ }, "packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -29111,9 +29110,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", @@ -29156,7 +29155,7 @@ }, "packages/taquito-timelock": { "name": "@taquito/timelock", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -29164,9 +29163,9 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -29197,13 +29196,13 @@ }, "packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip16": "^20.1.2" + "@taquito/core": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip16": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -29239,15 +29238,15 @@ }, "packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -29286,12 +29285,12 @@ }, "packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.2", + "@taquito/core": "^21.0.0", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", @@ -29358,10 +29357,10 @@ }, "packages/taquito-wallet-connect": { "name": "@taquito/wallet-connect", - "version": "20.1.2", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/taquito": "^20.1.2", + "@taquito/taquito": "^21.0.0", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", diff --git a/packages/taquito-beacon-wallet/package.json b/packages/taquito-beacon-wallet/package.json index 0d837bd6cf..5c3ce6903f 100644 --- a/packages/taquito-beacon-wallet/package.json +++ b/packages/taquito-beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/beacon-wallet", - "version": "20.1.2", + "version": "21.0.0", "description": "Beacon wallet provider", "keywords": [ "tezos", @@ -67,10 +67,9 @@ ] }, "dependencies": { - "@airgap/beacon-dapp": "^4.3.1", - "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", + "@airgap/beacon-dapp": "^4.3.2-beta.0", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", "@testing-library/react": "^16.0.1" }, "devDependencies": { diff --git a/packages/taquito-beacon-wallet/src/version.ts b/packages/taquito-beacon-wallet/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-beacon-wallet/src/version.ts +++ b/packages/taquito-beacon-wallet/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-contracts-library/package.json b/packages/taquito-contracts-library/package.json index 690580f974..6261a58946 100644 --- a/packages/taquito-contracts-library/package.json +++ b/packages/taquito-contracts-library/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/contracts-library", - "version": "20.1.2", + "version": "21.0.0", "description": "Can be used as an extension on the TezosToolkit to provide contracts data", "keywords": [ "tezos" @@ -67,10 +67,10 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-contracts-library/src/read-provider-wrapper.ts b/packages/taquito-contracts-library/src/read-provider-wrapper.ts index 2c6be8cbb3..8374ba8cee 100644 --- a/packages/taquito-contracts-library/src/read-provider-wrapper.ts +++ b/packages/taquito-contracts-library/src/read-provider-wrapper.ts @@ -37,6 +37,9 @@ export class ReadWrapperContractsLibrary implements TzReadProvider { getBalance(address: string, block: BlockIdentifier): Promise { return this.readProvider.getBalance(address, block); } + getSpendable(address: string, block: BlockIdentifier): Promise { + return this.readProvider.getSpendable(address, block); + } getDelegate(address: string, block: BlockIdentifier): Promise { return this.readProvider.getDelegate(address, block); } diff --git a/packages/taquito-contracts-library/src/rpc-wrapper.ts b/packages/taquito-contracts-library/src/rpc-wrapper.ts index 2b035d9249..4634b654b4 100644 --- a/packages/taquito-contracts-library/src/rpc-wrapper.ts +++ b/packages/taquito-contracts-library/src/rpc-wrapper.ts @@ -94,6 +94,24 @@ export class RpcWrapperContractsLibrary implements RpcClientInterface { ): Promise { return this.rpc.getBalance(address, { block }); } + async getSpendable( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + return this.rpc.getSpendable(address, { block }); + } + async getBalanceAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + return this.rpc.getBalanceAndFrozenBonds(address, { block }); + } + async getSpendableAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + return this.rpc.getSpendableAndFrozenBonds(address, { block }); + } async getFullBalance( address: string, { block }: RPCOptions = defaultRPCOptions diff --git a/packages/taquito-contracts-library/src/version.ts b/packages/taquito-contracts-library/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-contracts-library/src/version.ts +++ b/packages/taquito-contracts-library/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-core/package.json b/packages/taquito-core/package.json index 8b51273fe4..1687fb6197 100644 --- a/packages/taquito-core/package.json +++ b/packages/taquito-core/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/core", - "version": "20.1.2", + "version": "21.0.0", "description": "Classes, interfaces, and types shared across Taquito packages", "keywords": [ "tezos", diff --git a/packages/taquito-core/src/version.ts b/packages/taquito-core/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-core/src/version.ts +++ b/packages/taquito-core/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-http-utils/package.json b/packages/taquito-http-utils/package.json index 1e1afc085a..fe4aea28f3 100644 --- a/packages/taquito-http-utils/package.json +++ b/packages/taquito-http-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/http-utils", - "version": "20.1.2", + "version": "21.0.0", "description": "", "keywords": [ "tezos" @@ -58,7 +58,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", + "@taquito/core": "^21.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { diff --git a/packages/taquito-http-utils/src/version.ts b/packages/taquito-http-utils/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-http-utils/src/version.ts +++ b/packages/taquito-http-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-ledger-signer/package.json b/packages/taquito-ledger-signer/package.json index 12f2b5fef7..e11c5110e9 100644 --- a/packages/taquito-ledger-signer/package.json +++ b/packages/taquito-ledger-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/ledger-signer", - "version": "20.1.2", + "version": "21.0.0", "description": "Ledger signer provider", "keywords": [ "tezos", @@ -59,9 +59,9 @@ "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "buffer": "^6.0.3" }, "devDependencies": { diff --git a/packages/taquito-ledger-signer/src/version.ts b/packages/taquito-ledger-signer/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-ledger-signer/src/version.ts +++ b/packages/taquito-ledger-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-local-forging/package.json b/packages/taquito-local-forging/package.json index 5dfc2cd221..71c14cec22 100644 --- a/packages/taquito-local-forging/package.json +++ b/packages/taquito-local-forging/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/local-forging", - "version": "20.1.2", + "version": "21.0.0", "description": "Provide local forging functionality to be with taquito", "keywords": [ "tezos", @@ -67,12 +67,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { - "@taquito/rpc": "^20.1.2", + "@taquito/rpc": "^21.0.0", "@types/bluebird": "^3.5.42", "@types/estree": "^1.0.5", "@types/jest": "^29.5.12", diff --git a/packages/taquito-local-forging/src/protocols.ts b/packages/taquito-local-forging/src/protocols.ts index db42478da9..bd0b538f67 100644 --- a/packages/taquito-local-forging/src/protocols.ts +++ b/packages/taquito-local-forging/src/protocols.ts @@ -18,6 +18,7 @@ export enum ProtocolsHash { ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + PsQuebecn = 'PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -41,7 +42,8 @@ const protoLevel: Record = { ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19, PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20, PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20, - ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 21, + PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg: 21, + ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 22, }; export function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean { diff --git a/packages/taquito-local-forging/src/taquito-local-forging.ts b/packages/taquito-local-forging/src/taquito-local-forging.ts index d217f7b12f..7e197fc326 100644 --- a/packages/taquito-local-forging/src/taquito-local-forging.ts +++ b/packages/taquito-local-forging/src/taquito-local-forging.ts @@ -22,7 +22,7 @@ export * from './interface'; export { VERSION } from './version'; export { ProtocolsHash } from './protocols'; -const PROTOCOL_CURRENT = ProtocolsHash.PsParisCZ; +const PROTOCOL_CURRENT = ProtocolsHash.PsQuebecn; export function getCodec(codec: CODEC, _proto: ProtocolsHash) { return { diff --git a/packages/taquito-local-forging/src/version.ts b/packages/taquito-local-forging/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-local-forging/src/version.ts +++ b/packages/taquito-local-forging/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-michel-codec/pack-test-tool/package.json b/packages/taquito-michel-codec/pack-test-tool/package.json index a8fe4f7a7e..55a665506f 100644 --- a/packages/taquito-michel-codec/pack-test-tool/package.json +++ b/packages/taquito-michel-codec/pack-test-tool/package.json @@ -1,6 +1,6 @@ { "name": "pack-test-tool", - "version": "20.1.2", + "version": "21.0.0", "description": "Generate pack test data via Tezos RPC", "main": "pack-test-tool.js", "private": true, @@ -8,7 +8,7 @@ "author": "Eugene Zagidullin ", "license": "Apache-2.0", "dependencies": { - "@taquito/rpc": "^20.1.2", + "@taquito/rpc": "^21.0.0", "yargs": "^17.7.2" } } diff --git a/packages/taquito-michel-codec/package.json b/packages/taquito-michel-codec/package.json index 20afbdd5d6..a94d769b21 100644 --- a/packages/taquito-michel-codec/package.json +++ b/packages/taquito-michel-codec/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michel-codec", - "version": "20.1.2", + "version": "21.0.0", "description": "Michelson parser/validator/formatter", "keywords": [ "tezos", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2" + "@taquito/core": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", diff --git a/packages/taquito-michel-codec/src/michelson-types.ts b/packages/taquito-michel-codec/src/michelson-types.ts index 86f87cdb02..3c52c4b410 100644 --- a/packages/taquito-michel-codec/src/michelson-types.ts +++ b/packages/taquito-michel-codec/src/michelson-types.ts @@ -406,6 +406,7 @@ export enum Protocol { ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + PsQuebecn = 'PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash } @@ -441,7 +442,8 @@ const protoLevel: Record = { ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19, PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20, PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20, - ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 21, + PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg: 21, + ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 22, }; export function ProtoGreaterOrEqual(a: ProtocolID, b: ProtocolID): boolean { diff --git a/packages/taquito-michel-codec/src/version.ts b/packages/taquito-michel-codec/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-michel-codec/src/version.ts +++ b/packages/taquito-michel-codec/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-michelson-encoder/package.json b/packages/taquito-michelson-encoder/package.json index 16358adb1f..02a13beb54 100644 --- a/packages/taquito-michelson-encoder/package.json +++ b/packages/taquito-michelson-encoder/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/michelson-encoder", - "version": "20.1.2", + "version": "21.0.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -67,9 +67,9 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, diff --git a/packages/taquito-michelson-encoder/src/version.ts b/packages/taquito-michelson-encoder/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-michelson-encoder/src/version.ts +++ b/packages/taquito-michelson-encoder/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-remote-signer/package.json b/packages/taquito-remote-signer/package.json index e382bed285..c098f97b8f 100644 --- a/packages/taquito-remote-signer/package.json +++ b/packages/taquito-remote-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/remote-signer", - "version": "20.1.2", + "version": "21.0.0", "description": "Remote signer provider", "keywords": [ "tezos", @@ -62,10 +62,10 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { diff --git a/packages/taquito-remote-signer/src/version.ts b/packages/taquito-remote-signer/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-remote-signer/src/version.ts +++ b/packages/taquito-remote-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-rpc/package.json b/packages/taquito-rpc/package.json index 96408e0660..1ce9c520fb 100644 --- a/packages/taquito-rpc/package.json +++ b/packages/taquito-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/rpc", - "version": "20.1.2", + "version": "21.0.0", "description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node", "keywords": [ "tezos", @@ -66,9 +66,9 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { diff --git a/packages/taquito-rpc/src/rpc-client-interface.ts b/packages/taquito-rpc/src/rpc-client-interface.ts index e0d58341c6..508a41dd9c 100644 --- a/packages/taquito-rpc/src/rpc-client-interface.ts +++ b/packages/taquito-rpc/src/rpc-client-interface.ts @@ -55,7 +55,7 @@ import { export interface RPCOptions { block: string; - version?: 0 | 1 | '0' | '1'; + version?: 1 | '1'; } export const defaultChain = 'main'; @@ -65,6 +65,9 @@ export interface RpcClientInterface { getBlockHash(options?: RPCOptions): Promise; getLiveBlocks(options?: RPCOptions): Promise; getBalance(address: string, options?: RPCOptions): Promise; + getSpendable(address: string, options?: RPCOptions): Promise; + getBalanceAndFrozenBonds(address: string, options?: RPCOptions): Promise; + getSpendableAndFrozenBonds(address: string, options?: RPCOptions): Promise; getFullBalance(address: string, options?: RPCOptions): Promise; getStakedBalance(address: string, options?: RPCOptions): Promise; getUnstakedFinalizableBalance(address: string, options?: RPCOptions): Promise; @@ -151,6 +154,9 @@ export enum RPCMethodName { GET_BLOCK_HEADER = 'getBlockHeader', GET_BLOCK_METADATA = 'getBlockMetadata', GET_BALANCE = 'getBalance', + GET_SPENDABLE = 'getSpendable', + GET_BALANCE_AND_FROZEN_BONDS = 'getBalanceAndFrozenBonds', + GET_SPENDABLE_AND_FROZEN_BONDS = 'getSpendableAndFrozenBonds', GET_FULL_BALANCE = 'getFullBalance', GET_STAKED_BALANCE = 'getStakedBalance', GET_UNSTAKED_FINALIZABLE_BALANCE = 'getUnstakedFinalizableBalance', diff --git a/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts b/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts index 5bff88bc7a..ff54b6044a 100644 --- a/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts +++ b/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts @@ -201,9 +201,9 @@ export class RpcClientCache implements RpcClientInterface { } /** - * @param address address from which we want to retrieve the balance + * @param address address from which we want to retrieve the spendable balance * @param options contains generic configuration for rpc calls to specified block (default to head) - * @description Access the spendable balance of a contract, excluding frozen bonds + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC. * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance */ async getBalance( @@ -224,6 +224,77 @@ export class RpcClientCache implements RpcClientInterface { } } + /** + * @param address address from which we want to retrieve the balance + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC. + */ + async getSpendable( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_SPENDABLE, [ + block, + address, + ]); + if (this.has(key)) { + return this.get(key); + } else { + const response = this.rpcClient.getSpendable(address, { block }); + this.put(key, response); + return response; + } + } + + /** + * @param address address from which we want to retrieve balance and frozen bonds + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'spendable_and_frozen_bonds' RPC. + */ + async getBalanceAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const key = this.formatCacheKey( + this.rpcClient.getRpcUrl(), + RPCMethodName.GET_BALANCE_AND_FROZEN_BONDS, + [block, address] + ); + if (this.has(key)) { + return this.get(key); + } else { + const response = this.rpcClient.getBalanceAndFrozenBonds(address, { block }); + this.put(key, response); + return response; + } + } + + /** + * @param address address from which we want to retrieve spendable and frozen bonds + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'balance_and_frozen_bonds' RPC. + */ + async getSpendableAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const key = this.formatCacheKey( + this.rpcClient.getRpcUrl(), + RPCMethodName.GET_SPENDABLE_AND_FROZEN_BONDS, + [block, address] + ); + if (this.has(key)) { + return this.get(key); + } else { + const response = this.rpcClient.getSpendableAndFrozenBonds(address, { block }); + this.put(key, response); + return response; + } + } + /** * @param address address from which we want to retrieve the full balance * @param options contains generic configuration for rpc calls to specified block (default to head) @@ -641,8 +712,8 @@ export class RpcClientCache implements RpcClientInterface { * @param options contains generic configuration for rpc calls to specified block (default to head) and version. * @description All the information about a block * @see https://tezos.gitlab.io/active/rpc.html#get-block-id - * @example getBlock() will default to `/main/chains/block/head?version=0` which shows { kind: endorsement } - * @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation } + * @example getBlock() will default to `/main/chains/block/head?version=1` + * @example getBlock({ block: 'head~2') will return an offset of 2 from head blocks * @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash.. */ async getBlock({ block }: RPCOptions = defaultRPCOptions): Promise { @@ -696,7 +767,7 @@ export class RpcClientCache implements RpcClientInterface { * @param args contains optional query arguments (level, cycle, delegate, consensus_key, and max_round) * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Retrieves the list of delegates allowed to bake a block. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getBakingRights( args: BakingRightsQueryArguments = {}, @@ -719,7 +790,7 @@ export class RpcClientCache implements RpcClientInterface { * @param args contains optional query arguments (level, cycle, delegate, and consensus_key) * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Retrieves the delegates allowed to attest a block - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getAttestationRights( args: AttestationRightsQueryArguments = {}, @@ -857,7 +928,7 @@ export class RpcClientCache implements RpcClientInterface { * @param data operation contents to forge * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Forge an operation returning the unsigned bytes - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async forgeOperations( data: ForgeOperationsParams, @@ -918,7 +989,7 @@ export class RpcClientCache implements RpcClientInterface { * @param op Operation to run * @param options contains generic configuration for rpc calls to specified block and version * @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runOperation( op: RPCRunOperationParam, @@ -931,7 +1002,7 @@ export class RpcClientCache implements RpcClientInterface { * @param op Operation to simulate * @param options contains generic configuration for rpc calls to specified block and version * @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async simulateOperation( op: RPCSimulateOperationParam, @@ -944,7 +1015,7 @@ export class RpcClientCache implements RpcClientInterface { * @param code Code to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Run a Michelson script in the current context - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runCode( code: RPCRunCodeParam, @@ -957,7 +1028,7 @@ export class RpcClientCache implements RpcClientInterface { * @param viewScriptParams Parameters of the script view to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Simulate a call to a michelson view - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runScriptView( { unparsing_mode = 'Readable', ...rest }: RPCRunScriptViewParam, @@ -976,7 +1047,7 @@ export class RpcClientCache implements RpcClientInterface { * @param viewParams Parameters of the view to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Simulate a call to a view following the TZIP-4 standard. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runView( { unparsing_mode = 'Readable', ...rest }: RPCRunViewParam, @@ -1011,7 +1082,7 @@ export class RpcClientCache implements RpcClientInterface { * A node that is operated by a bad actor, or compromised by a bad actor could return a fully formed operation that does not correspond to the input provided to the RPC endpoint. * A safer solution to pack and sign data would be to use the `packDataBytes` function available in the `@taquito/michel-codec` package. * @example packData({ data: { string: "test" }, type: { prim: "string" } }) - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async packData( data: PackDataParams, @@ -1153,7 +1224,7 @@ export class RpcClientCache implements RpcClientInterface { * @param contract address of the contract we want to retrieve storage information of * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Access the used storage space of the contract - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getStorageUsedSpace( contract: string, @@ -1177,7 +1248,7 @@ export class RpcClientCache implements RpcClientInterface { * @param contract address of the contract we want to retrieve storage information of * @param options contains generic configuration for rpc calls to specified block (default to head) = * @description Access the paid storage space of the contract - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getStoragePaidSpace( contract: string, @@ -1203,7 +1274,7 @@ export class RpcClientCache implements RpcClientInterface { * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Access the contract's balance of ticket with specified ticketer, content type, and content. * @example ticket { ticketer: 'address', content_type: { prim: "string" }, content: { string: 'ticket1' } } - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getTicketBalance( contract: string, @@ -1229,7 +1300,7 @@ export class RpcClientCache implements RpcClientInterface { * @param contract originated address we want to retrieve ticket balances of * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Access the complete list of tickets owned by the given contract by scanning the contract's storage. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getAllTicketBalances( contract: string, @@ -1272,7 +1343,7 @@ export class RpcClientCache implements RpcClientInterface { /** * @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint) - * @param args has 5 optional properties. We support version 1 & 2 + * @param args has 5 optional properties * @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined } */ async getPendingOperations( diff --git a/packages/taquito-rpc/src/taquito-rpc.ts b/packages/taquito-rpc/src/taquito-rpc.ts index a6831edecd..7e1eaf3176 100644 --- a/packages/taquito-rpc/src/taquito-rpc.ts +++ b/packages/taquito-rpc/src/taquito-rpc.ts @@ -167,9 +167,9 @@ export class RpcClient implements RpcClientInterface { } /** - * @param address address from which we want to retrieve the balance + * @param address address from which we want to retrieve the spendable balance * @param options contains generic configuration for rpc calls to specified block (default to head) - * @description Access the spendable balance of a contract, excluding frozen bonds + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC. * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance */ async getBalance( @@ -186,6 +186,65 @@ export class RpcClient implements RpcClientInterface { return new BigNumber(balance); } + /** + * @param address address from which we want to retrieve the spendable balance + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC. + */ + async getSpendable( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const balance = await this.httpBackend.createRequest({ + url: this.createURL( + `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/spendable` + ), + method: 'GET', + }); + return new BigNumber(balance); + } + + /** + * @param address address from which we want to retrieve balance and frozen bonds + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'spendable_and_frozen_bonds' RPC. + * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance + */ + async getBalanceAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const balance = await this.httpBackend.createRequest({ + url: this.createURL( + `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/balance_and_frozen_bonds` + ), + method: 'GET', + }); + return new BigNumber(balance); + } + + /** + * @param address address from which we want to retrieve spendable and frozen bonds + * @param options contains generic configuration for rpc calls to specified block (default to head) + * @description The sum (in mutez) of the spendable balance and frozen bonds of a contract. Corresponds to the contract's full balance from which staked funds and unstake requests have been excluded. Identical to the 'balance_and_frozen_bonds' RPC. + * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance + */ + async getSpendableAndFrozenBonds( + address: string, + { block }: RPCOptions = defaultRPCOptions + ): Promise { + this.validateAddress(address); + const balance = await this.httpBackend.createRequest({ + url: this.createURL( + `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/spendable_and_frozen_bonds` + ), + method: 'GET', + }); + return new BigNumber(balance); + } + /** * @param address address from which we want to retrieve the full balance * @param options contains generic configuration for rpc calls to specified block (default to head) @@ -619,8 +678,8 @@ export class RpcClient implements RpcClientInterface { * @param options contains generic configuration for rpc calls to specified block (default to head) and version. * @description All the information about a block * @see https://tezos.gitlab.io/active/rpc.html#get-block-id - * @example getBlock() will default to `/main/chains/block/head?version=1` which shows { kind: attestation } - * @example getBlock({ block: 'head~2', version: 0 }) will return an offset of 2 from head blocks and shows { kind: endorsement } + * @example getBlock() will default to `/main/chains/block/head?version=1` + * @example getBlock({ block: 'head~2' }) will return an offset of 2 from head blocks * @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash.. */ async getBlock({ block, version }: RPCOptions = defaultRPCOptions): Promise { @@ -671,7 +730,7 @@ export class RpcClient implements RpcClientInterface { * @param args contains optional query arguments (level, cycle, delegate, consensus_key, and max_round) * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Retrieves the list of delegates allowed to bake a block. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getBakingRights( args: BakingRightsQueryArguments = {}, @@ -690,7 +749,7 @@ export class RpcClient implements RpcClientInterface { * @param args contains optional query arguments (level, cycle, delegate, and consensus_key) * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Retrieves the delegates allowed to attest a block - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getAttestationRights( args: AttestationRightsQueryArguments = {}, @@ -811,7 +870,7 @@ export class RpcClient implements RpcClientInterface { * @param data operation contents to forge * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Forge an operation returning the unsigned bytes - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async forgeOperations( data: ForgeOperationsParams, @@ -890,7 +949,7 @@ export class RpcClient implements RpcClientInterface { * @param op Operation to run * @param options contains generic configuration for rpc calls to specified block and version * @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runOperation( op: RPCRunOperationParam, @@ -910,7 +969,7 @@ export class RpcClient implements RpcClientInterface { * @param op Operation to simulate * @param options contains generic configuration for rpc calls to specified block and version * @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async simulateOperation( op: RPCSimulateOperationParam, @@ -932,7 +991,7 @@ export class RpcClient implements RpcClientInterface { * @param code Code to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Run a Michelson script in the current context - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runCode( code: RPCRunCodeParam, @@ -953,7 +1012,7 @@ export class RpcClient implements RpcClientInterface { * @param viewScriptParams Parameters of the script view to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Simulate a call to a michelson view - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runScriptView( { unparsing_mode = 'Readable', ...rest }: RPCRunScriptViewParam, @@ -977,7 +1036,7 @@ export class RpcClient implements RpcClientInterface { * @param viewParams Parameters of the view to run * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Simulate a call to a view following the TZIP-4 standard. - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async runView( { unparsing_mode = 'Readable', ...rest }: RPCRunViewParam, @@ -1011,7 +1070,7 @@ export class RpcClient implements RpcClientInterface { * A node that is operated by a bad actor, or compromised by a bad actor could return a fully formed operation that does not correspond to the input provided to the RPC endpoint. * A safer solution to pack and sign data would be to use the `packDataBytes` function available in the `@taquito/michel-codec` package. * @example packData({ data: { string: "test" }, type: { prim: "string" } }) - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async packData(data: PackDataParams, { block }: RPCOptions = defaultRPCOptions) { const { gas, ...rest } = await this.httpBackend.createRequest( @@ -1123,7 +1182,7 @@ export class RpcClient implements RpcClientInterface { * @param contract address of the contract we want to retrieve storage information of * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Access the used storage space of the contract - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getStorageUsedSpace( contract: string, @@ -1141,7 +1200,7 @@ export class RpcClient implements RpcClientInterface { * @param contract address of the contract we want to retrieve storage information of * @param options contains generic configuration for rpc calls to specified block (default to head) * @description Access the paid storage space of the contract - * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json + * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/alpha-openapi.json */ async getStoragePaidSpace( contract: string, @@ -1215,14 +1274,14 @@ export class RpcClient implements RpcClientInterface { /** * @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint) - * @param args has 5 optional properties. We support version 1 & 2 - * @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined } + * @param args has 5 optional properties + * @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined } * @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-mempool-openapi-rc.json */ async getPendingOperations( args: PendingOperationsQueryArguments = {} ): Promise { - return this.httpBackend.createRequest({ + return this.httpBackend.createRequest({ url: this.createURL(`/chains/${this.chain}/mempool/pending_operations`), method: 'GET', query: args, diff --git a/packages/taquito-rpc/src/types.ts b/packages/taquito-rpc/src/types.ts index e789e7363a..36a18f1fa4 100644 --- a/packages/taquito-rpc/src/types.ts +++ b/packages/taquito-rpc/src/types.ts @@ -1783,6 +1783,7 @@ export interface OperationContentsAndResultMetadataOrigination { } export type ConstantsResponse = ConstantsResponseCommon & + ConstantsResponseProto021 & ConstantsResponseProto020 & ConstantsResponseProto019 & ConstantsResponseProto017 & @@ -1828,6 +1829,8 @@ export interface ConstantsResponseCommon { export type Ratio = { numerator: number; denominator: number }; +export type ConstantsResponseProto021 = ConstantsResponseProto020; + export interface ConstantsResponseProto020 extends Omit< ConstantsResponseProto019, @@ -2385,14 +2388,16 @@ export type LastRemovedCommitmentHashes = { }; export interface PendingOperationsQueryArguments { - version?: '1' | '2'; + version?: 1 | 2 | '1' | '2'; validated?: boolean; applied?: boolean; refused?: boolean; outdated?: boolean; branchRefused?: boolean; branchDelayed?: boolean; - validationPass?: '0' | '1' | '2' | '3'; + validationPass?: '0' | '1' | '2' | '3' | 0 | 1 | 2 | 3; + source?: string; + operationHash?: string; } type FailedProcessedOperation = Pick< @@ -2401,7 +2406,7 @@ type FailedProcessedOperation = Pick< > & { error: TezosGenericOperationError[]; }; - +// TODO: Remove once mainnet migrated into quebec protocol it's not supported anymore export interface PendingOperationsV1 { applied: Pick[]; refused: FailedProcessedOperation[]; diff --git a/packages/taquito-rpc/src/version.ts b/packages/taquito-rpc/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-rpc/src/version.ts +++ b/packages/taquito-rpc/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-rpc/test/data/rpc-responses.ts b/packages/taquito-rpc/test/data/rpc-responses.ts index d8af80159e..223d3f6964 100644 --- a/packages/taquito-rpc/test/data/rpc-responses.ts +++ b/packages/taquito-rpc/test/data/rpc-responses.ts @@ -2,3427 +2,771 @@ import BigNumber from 'bignumber.js'; export const rpcUrl = 'rpcTest'; export const blockResponse = { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'BMUMMDZRvvTfLrpmtYMUtYgk498WssaSfNnpkWwEiL7GNTwUYus', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + chain_id: 'NetXXWAHLEvre9b', + hash: 'BLauzww5KwkaBTuPjxANENMHHR4BapJ2G9B86z2bsZHHi5oKanb', header: { - level: 536085, - proto: 2, - predecessor: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - timestamp: '2021-10-04T18:11:32Z', + level: 989795, + proto: 1, + predecessor: 'BL2Ba8XNJYRTHUjapPQYNxuymQNA2u2PWhsuEXRrTT9pvEm9E65', + timestamp: '2024-09-06T20:47:46Z', validation_pass: 4, - operations_hash: 'LLoZRH5DQMZiuE5eZ588fFC9JkL7qN8QjMdTUWQAHcAut2BmoUGZM', - fitness: ['01', '0000000000082e14'], - context: 'CoWCv7EjSWa6naU4fonnAcSSDDRjq9ddgdC13nuBdfR5x9xnR1sR', - priority: 0, - proof_of_work_nonce: 'bc2cc86f726c0000', - liquidity_baking_escape_vote: false, + operations_hash: 'LLoaKUBDXGeocTaJiuyb3w4d7JzHs419R7B6HFpMqQTwMpkdfcRq8', + fitness: ['02', '000f1a63', '', 'ffffffff', '00000000'], + context: 'CoWHYezPfU43VGjBjEyxN4f2hdGq73ghasPgWHzhJN9aGYU2W8H6', + payload_hash: 'vh2ifehMZB2C7GFb2M4YycExTMWAY5PnDC4PoPtDmWh7yNNVbfLj', + payload_round: 0, + proof_of_work_nonce: '1a991a0300000000', + liquidity_baking_toggle_vote: 'on', + adaptive_issuance_vote: 'pass', signature: - 'sigPoYZryqKDksRqXpfby9eDfx6SbaLAq2vwLVnWJNrv73JrfAwAgiM1mCZrR7UaqEwvuR48QRJfj2FW6dCFAPynmJbgjysg', + 'sigWZtc4cGRxY7Fm1uPWFqHLyZYTgouUvAyTFfPLtE669VGezRNpfLXuxjUrU4DjviZjJcQe59RvNE4wLj1zEXpYsmwF6AXs', }, metadata: { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - next_protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + next_protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', test_chain_status: { status: 'not_running' }, max_operations_ttl: 120, max_operation_data_length: 32768, - max_block_header_length: 239, + max_block_header_length: 289, max_operation_list_length: [ { max_size: 4194304, max_op: 2048 }, { max_size: 32768 }, { max_size: 135168, max_op: 132 }, { max_size: 524288 }, ], - baker: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', + proposer: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + baker: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', level_info: { - level: 536085, - level_position: 536084, - cycle: 131, - cycle_position: 3604, + level: 989795, + level_position: 989794, + cycle: 7732, + cycle_position: 98, expected_commitment: false, }, voting_period_info: { - voting_period: { index: 26, kind: 'proposal', start_position: 532481 }, - position: 3603, - remaining: 16876, + voting_period: { index: 7732, kind: 'proposal', start_position: 989696 }, + position: 98, + remaining: 29, }, nonce_hash: null, - consumed_gas: '108015000', deactivated: [], balance_updates: [ + { + kind: 'accumulator', + category: 'block fees', + change: '-437', + origin: 'block', + }, + { + kind: 'contract', + contract: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + change: '437', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking rewards', + change: '-156420503', + origin: 'block', + }, + { + kind: 'freezer', + category: 'deposits', + staker: { baker_own_stake: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX' }, + change: '156420503', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking rewards', + change: '-156420503', + origin: 'block', + }, + { + kind: 'freezer', + category: 'deposits', + staker: { delegate: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX' }, + change: '156420503', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking rewards', + change: '-244566', + origin: 'block', + }, { kind: 'contract', - contract: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - change: '-640000000', + contract: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + change: '244566', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking bonuses', + change: '-156325272', origin: 'block', }, { kind: 'freezer', category: 'deposits', - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - cycle: 131, - change: '640000000', + staker: { baker_own_stake: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX' }, + change: '156325272', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking bonuses', + change: '-156325272', origin: 'block', }, { kind: 'freezer', - category: 'rewards', - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - cycle: 131, - change: '16093750', + category: 'deposits', + staker: { delegate: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX' }, + change: '156325272', + origin: 'block', + }, + { + kind: 'minted', + category: 'baking bonuses', + change: '-244417', + origin: 'block', + }, + { + kind: 'contract', + contract: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + change: '244417', origin: 'block', }, ], - liquidity_baking_escape_ema: 281925, + liquidity_baking_toggle_ema: 2550, + adaptive_issuance_vote_ema: 2634186, + adaptive_issuance_activation_cycle: 0, implicit_operations_results: [ { kind: 'transaction', storage: [ - { int: '81141010' }, - { int: '1004154556389' }, - { int: '87443' }, + { int: '1' }, + { int: '116095517093' }, + { int: '100' }, { bytes: '01e927f00ef734dfc85919635e9afc9166c83ef9fc00' }, { bytes: '0115eb0104481a6d7921160bc982c5e0a561cd8a3a00' }, ], balance_updates: [ + { + kind: 'minted', + category: 'subsidy', + change: '-583333', + origin: 'subsidy', + }, { kind: 'contract', contract: 'KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5', - change: '2500000', + change: '583333', origin: 'subsidy', }, ], - consumed_gas: '2118', - consumed_milligas: '2117300', - storage_size: '4636', + consumed_milligas: '206532', + storage_size: '4632', }, ], + proposer_consensus_key: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + baker_consensus_key: 'tz1fLH7NNTTshW2zycQ3rFJ8ZPjcxp9mXboX', + consumed_milligas: '277000', + dal_attestation: '0', }, operations: [ [ { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooK6Fj6pPV8LMfuuo9CTTyDzd28CRiRzC1UFzwxrvuWCtfiuBHA', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigQigTJyznbECHxo3sokWyvsMX3GdUWhfND76bhpdQgrmj8MLcVpTQTudg8T7dswKAm4wVq9dXx3sdGiwnz1tWwatJJ2JGP', - }, - slot: 7, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1NFs6yP2sXd5vAAbR43bbDRpV2nahDZope', - change: '-62500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1NFs6yP2sXd5vAAbR43bbDRpV2nahDZope', - cycle: 131, - change: '62500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1NFs6yP2sXd5vAAbR43bbDRpV2nahDZope', - cycle: 131, - change: '1953125', - origin: 'block', - }, - ], - delegate: 'tz1NFs6yP2sXd5vAAbR43bbDRpV2nahDZope', - slots: [ - 7, 26, 28, 31, 52, 55, 56, 57, 73, 81, 90, 100, 116, 137, 139, 141, 150, 155, 194, - 204, 209, 219, 226, 240, 255, - ], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'opVPpVtkcwWYW3AaKCLYgLXDLVteewJxv1mqvRKJxiBVx4hR3Ld', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigucwWZSCHugH3w3g8Mm9k8C2vLQfCU2CixgRTLSQF2xDg5Xf6VqEDB2snUJQjZHFD4EFejrAuQhcGFJ2j729ABYAxgQdZV', - }, - slot: 25, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb', - change: '-12500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb', - cycle: 131, - change: '12500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb', - cycle: 131, - change: '390625', - origin: 'block', - }, - ], - delegate: 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb', - slots: [25, 49, 59, 143, 241], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooV7jeBXUjeAXb7sB6UbiPrFeadyUWAQjyVbiezYV4dQ2jh7nXZ', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigjgqeWJXQGxt7nuUJy9ZfJQrUyoMVgi34YKsCmvuKczKc198x6izoCgMGRVb7iTqDgqzEKcPFeLJpW6jxzFJ5AGXgCDPAK', - }, - slot: 1, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - change: '-37500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - cycle: 131, - change: '37500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - cycle: 131, - change: '1171875', - origin: 'block', - }, - ], - delegate: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - slots: [1, 12, 19, 20, 32, 46, 66, 93, 129, 146, 174, 176, 185, 187, 236], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooAcSPWvGdxWHs9axWkkUv8auevgo5S65y6BGuqKUyzxmQtAkkw', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigshnJHvMozfhProNP2iBV1baiUoUGoZC9yc7XyKk3TKBHZ6pJyLb8vWUcGpvqPPv732HzB5px7QsBm9KVm2n9TgERgCDmB', - }, - slot: 62, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1Qr3aFcxjRGu84PfDEtqQSM2PQutSn635P', - change: '-5000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1Qr3aFcxjRGu84PfDEtqQSM2PQutSn635P', - cycle: 131, - change: '5000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1Qr3aFcxjRGu84PfDEtqQSM2PQutSn635P', - cycle: 131, - change: '156250', - origin: 'block', - }, - ], - delegate: 'tz1Qr3aFcxjRGu84PfDEtqQSM2PQutSn635P', - slots: [62, 102], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'onrL2x7aon3qi1p3wsroWnRfx8KigzYNQg5S2EYyB3k7N72Nqcy', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + chain_id: 'NetXXWAHLEvre9b', + hash: 'opNoTGfrSBj1k2deQvh5mZGXm6tBhBZz5YHRQsxStTFrjWjwV3q', + branch: 'BLQNVpuLN5vi7Js8QML9jPBr61X3QwW2h8dH9ptp33hxuBwzDpJ', contents: [ { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigWwT3mRjCzfvxy65Nd76yHDH6MBwDw1RhhMf4miDp6MvtBjCvcgXhL7z4WM1vZrGEB74UiAbnJzNCSJ3KDwNFwBbU2kpU4', - }, - slot: 3, + kind: 'attestation', + slot: 0, + level: 989794, + round: 0, + block_payload_hash: 'vh3Y2ysro9mSgkGmB1uNmoGho98gCTF3ycSfSKGXGrYEowXbDraa', metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD', - change: '-62500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD', - cycle: 131, - change: '62500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD', - cycle: 131, - change: '1953125', - origin: 'block', - }, - ], - delegate: 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD', - slots: [ - 3, 6, 13, 21, 37, 63, 68, 86, 94, 110, 123, 133, 134, 152, 169, 170, 208, 212, 213, - 215, 218, 221, 223, 232, 254, - ], + delegate: 'tz1Zt8QQ9aBznYNk5LUBjtME9DuExomw9YRs', + consensus_power: 2558, + consensus_key: 'tz1Zt8QQ9aBznYNk5LUBjtME9DuExomw9YRs', }, }, ], + signature: + 'sigXErmHKcQpsTZ9tEc7MtLjPde16tZDwPtbvCdBJum5S55tRSQuoTQ88CRgYz1Yw1ap5F5PhjGTpqq5GdGp3MFZonkZLxUo', }, + ], + [], + [], + [ { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'onseUqV43jrnEQDWV6S7pNEWAQ1W1jVwDrtjXLXUMMYqLJUaCKo', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + chain_id: 'NetXXWAHLEvre9b', + hash: 'opS8fwbeZEv9riec1GzYCSuxtBEVeuJzLhwtRV7DAsR3BurRRRV', + branch: 'BLQNVpuLN5vi7Js8QML9jPBr61X3QwW2h8dH9ptp33hxuBwzDpJ', contents: [ { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigeeqviP7cPW2SdBNx53trnr9zCDTJKZd2ixZGTg5qz17CcEJaHZgQZjcEcFcy2EnEDusA4m9yeT9JK24fipu9XyiprZ6pH', - }, - slot: 184, + kind: 'smart_rollup_add_messages', + source: 'tz1NxvcLNywVH5jkZgqKnFbGyn9rjp5Rkkgi', + fee: '437', + counter: '740739', + gas_limit: '277', + storage_limit: '0', + message: [ + '006f3183e65b011f6c0f0bc9f5665aeca477e6ad8103f897adeca08a42b0140371b7d91998994355379608669f83503adfe3527153d485e0018dd4c0c088696adb6600000000a095ba080000000000000000000000000000000000000000000000000000000000820100820000b840d177389e13cbc219d847dfa13fe66762647f55a369c0f1af75331f7045ed05d2ee87f2d76699fcdbddbdd63fcce6e5a656e295c17848f24c7662eeee57e8d806', + ], metadata: { balance_updates: [ { kind: 'contract', - contract: 'tz1LKV2Hb8XezQXFqCmsKXYDc8BWQkvFnzcP', - change: '-2500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1LKV2Hb8XezQXFqCmsKXYDc8BWQkvFnzcP', - cycle: 131, - change: '2500000', + contract: 'tz1NxvcLNywVH5jkZgqKnFbGyn9rjp5Rkkgi', + change: '-437', origin: 'block', }, { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1LKV2Hb8XezQXFqCmsKXYDc8BWQkvFnzcP', - cycle: 131, - change: '78125', + kind: 'accumulator', + category: 'block fees', + change: '437', origin: 'block', }, ], - delegate: 'tz1LKV2Hb8XezQXFqCmsKXYDc8BWQkvFnzcP', - slots: [184], + operation_result: { status: 'applied', consumed_milligas: '176870' }, }, }, ], + signature: + 'sigoadYdMRfktcFDDMtKrhper43S4fSKF6MtkJDkTjtY2EPG9Wz7oGN5XqjqfBbLNMcpowsyYWirCYQKd28vcTxX55RC8zN2', }, + ], + ], +}; +export const blockHash = 'BlockHash'; +export const liveBlocks = [ + 'BKiHeQzuKM5quBsgVL25UDFXKcZyaTt26AQUtUkbA4Vh3dAQY21', + 'BKiboc2xTLtbCXt6AWX2BpR4km41onVrLmhFSTjYUA2iWKBwSTH', +]; +export const balance = new BigNumber(4138876344398); +export const storage = { prim: 'Pair', args: [{ int: '0' }, { int: '1' }] }; +export const script = { + code: [ + { prim: 'parameter', args: [] }, + { prim: 'storage', args: [] }, + { prim: 'code', args: [] }, + ], + storage: { prim: 'Pair', args: [] }, +}; +export const contract = { + balance: new BigNumber(765), + script: { + code: [], + storage: { prim: 'Pair', args: [] }, + }, +}; +export const unstakeRequestsResponse = { + finalizable: [ + { + delegate: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA', + cycle: 10, + amount: new BigNumber('500000000'), + }, + ], + unfinalizable: { + delegate: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA', + requests: [ { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooFD5AWihGns7RaZHKqyiJPFDAYuCpXJGT72p6CCig4EQsYm9tT', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigiDTLARKGSKx1KnhxMdhxV7h4NnChw3gzYy8fJv9C58vPD9mCuKsvCrRGUk79mCqaxudyUu5T3qxWkuJqugJysSeg45KBT', - }, - slot: 5, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - change: '-80000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - cycle: 131, - change: '80000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - cycle: 131, - change: '2500000', - origin: 'block', - }, - ], - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - slots: [ - 5, 18, 22, 24, 51, 77, 79, 95, 98, 115, 140, 145, 151, 157, 162, 163, 167, 171, 181, - 188, 189, 195, 196, 198, 202, 205, 207, 227, 231, 238, 242, 252, - ], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooqKhCA49xFX9wwyU3LmgwJZu8qwfgRQNHHjaoA45QkmAR8rxmW', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigkD1y57jWwdGyzwgHXZoEFsNuJCcWsC4SRpMeMiAzFbgf5G3ATQoZF2pCtCdfxvXYu1nDixosqJvqttiX7hNNWWw7H5H3o', - }, - slot: 16, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - change: '-45000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - cycle: 131, - change: '45000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - cycle: 131, - change: '1406250', - origin: 'block', - }, - ], - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - slots: [ - 16, 35, 42, 53, 76, 80, 85, 87, 91, 125, 126, 127, 179, 186, 214, 225, 239, 245, - ], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooiBEZGpe15vBVEJBD7f42NhtXUVyMgZFJ6Kq6Rz9x59acRjfqC', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigo63PyYEcmFmGoWiLoY7aChpqq4AzE3u6EyeMbX5dfmSyFPqrbKJgTrH4Pg9ELZJfFWW9DmurYw77nqmH529wLYxVq43ec', - }, - slot: 201, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1PUv7oRg5xpMf4nFewZrtRtnmCizW2ETtU', - change: '-2500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1PUv7oRg5xpMf4nFewZrtRtnmCizW2ETtU', - cycle: 131, - change: '2500000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1PUv7oRg5xpMf4nFewZrtRtnmCizW2ETtU', - cycle: 131, - change: '78125', - origin: 'block', - }, - ], - delegate: 'tz1PUv7oRg5xpMf4nFewZrtRtnmCizW2ETtU', - slots: [201], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'oogyZfDdZPWFxuyRAQs1J53CxmxUbnd6Q1WixifHKpnicphrEbb', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigpznVMjV53auoAPqxYxkYANxbrYaMmuq242ueQqo1NijaQvZRUEZP5sFwMLVpLGRUzHEkrYkX6NGFm1RfKKb4yBmBjrHr5', - }, - slot: 15, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1T8UYSbVuRm6CdhjvwCfXsKXb4yL9ai9Q3', - change: '-75000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1T8UYSbVuRm6CdhjvwCfXsKXb4yL9ai9Q3', - cycle: 131, - change: '75000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1T8UYSbVuRm6CdhjvwCfXsKXb4yL9ai9Q3', - cycle: 131, - change: '2343750', - origin: 'block', - }, - ], - delegate: 'tz1T8UYSbVuRm6CdhjvwCfXsKXb4yL9ai9Q3', - slots: [ - 15, 23, 30, 34, 38, 45, 60, 61, 64, 67, 70, 75, 78, 89, 92, 104, 112, 114, 122, 124, - 138, 149, 160, 175, 191, 197, 199, 230, 233, 234, - ], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'oozpKKz7XcaihZhSsEMiLcUPvGxjZe74yz1hrNzvYg9W1NNCjTx', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigqhueAmzzAArEiHLnwQUpLEVcz8wWcn2qxfMKmRrGRg2cn6k4q17eBaU9bHDepsf1jnGN3cDHrTfbas58BW7pbUoCJgHUh', - }, - slot: 120, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1VpvtSaSxKvykrqajFJTZqCXgoVJ5cKaM1', - change: '-5000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1VpvtSaSxKvykrqajFJTZqCXgoVJ5cKaM1', - cycle: 131, - change: '5000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1VpvtSaSxKvykrqajFJTZqCXgoVJ5cKaM1', - cycle: 131, - change: '156250', - origin: 'block', - }, - ], - delegate: 'tz1VpvtSaSxKvykrqajFJTZqCXgoVJ5cKaM1', - slots: [120, 131], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'onwE9jGH8LXetQmPTHekChAnecpcmV92md8WMSgTcjok6DUDtJ9', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigfTpvZPXMb2ur3PhQ2w6N93auNHft7swUHdf4QsizPMgbKHxNFV4TU8MmHXQ5ZivMkeCAbwBEdDApAw25uf9vzzPuAFoAK', - }, - slot: 8, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', - change: '-65000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', - cycle: 131, - change: '65000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', - cycle: 131, - change: '2031250', - origin: 'block', - }, - ], - delegate: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', - slots: [ - 8, 10, 11, 33, 41, 58, 99, 107, 108, 111, 118, 128, 147, 148, 154, 156, 158, 168, - 172, 183, 192, 228, 237, 244, 250, 253, - ], - }, - }, - ], - }, - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'oo7qUvuxaxUthTzfbTYk56TPBQ1V59iycoTmbTpPYGPENyuR7Fi', - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - contents: [ - { - kind: 'endorsement_with_slot', - endorsement: { - branch: 'BM44sPfEofA59iibf5v5AC1wB1BH2kYi9YsKXHmQeDqZFkMSDD7', - operations: { kind: 'endorsement', level: 536084 }, - signature: - 'sigeiWyjufSMaWBEHqotERDGUSFtTLimnFhTH4gm1Pi8qB7hrz41czWXquqHGcVAdt8a3Z96o6Ktg5SkMJ9cyr6qFq8ccmTM', - }, - slot: 9, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1SwJwrKe8H1yi6KnYKCYkVHPApJRnZcHsa', - change: '-60000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1SwJwrKe8H1yi6KnYKCYkVHPApJRnZcHsa', - cycle: 131, - change: '60000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1SwJwrKe8H1yi6KnYKCYkVHPApJRnZcHsa', - cycle: 131, - change: '1875000', - origin: 'block', - }, - ], - delegate: 'tz1SwJwrKe8H1yi6KnYKCYkVHPApJRnZcHsa', - slots: [ - 9, 14, 27, 43, 54, 83, 84, 96, 101, 105, 113, 136, 144, 153, 159, 164, 180, 182, - 203, 211, 224, 247, 249, 251, - ], - }, - }, - ], + cycle: 11, + amount: new BigNumber('200000000'), }, ], - [], - [], - [ - { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'ooybqGUDKq3QUbZVe4qZ1oLx2GhTqZ6VdVTuA7SZDfE5B2jbHRd', - branch: 'BLEzWSy1Aze5Enuv3KimDvqZbAXbzSHxQeRDztN6tvXknfTCAus', - contents: [ - { - kind: 'transaction', - source: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - fee: '0', - counter: '703827', - gas_limit: '3422', - storage_limit: '67', - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'update_operators', - value: [ - { - prim: 'Left', - args: [ - { - prim: 'Pair', - args: [ - { string: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59' }, - { - prim: 'Pair', - args: [{ string: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm' }, { int: '1' }], - }, - ], - }, - ], - }, - ], - }, - metadata: { - balance_updates: [], - operation_result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [ - { - action: 'update', - big_map: '20442', - key_hash: 'exprtpmtn8bL4jrTW2AfMZJ9p2yx1k9xMkN5f7EWhxtUVPtvutxqNL', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { - prim: 'Pair', - args: [ - { bytes: '01a783b18821ce1f502c8a1c2fd9761ad21c1391d600' }, - { int: '1' }, - ], - }, - ], - }, - value: { prim: 'Unit' }, - }, - ], - balance_updates: [ - { - kind: 'contract', - contract: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - change: '-16750', - origin: 'block', - }, - ], - consumed_gas: '3322', - consumed_milligas: '3321239', - storage_size: '48520', - paid_storage_size_diff: '67', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { - kind: 'big_map', - id: '20442', - diff: { - action: 'update', - updates: [ - { - key_hash: 'exprtpmtn8bL4jrTW2AfMZJ9p2yx1k9xMkN5f7EWhxtUVPtvutxqNL', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { - prim: 'Pair', - args: [ - { bytes: '01a783b18821ce1f502c8a1c2fd9761ad21c1391d600' }, - { int: '1' }, - ], - }, - ], - }, - value: { prim: 'Unit' }, - }, - ], - }, - }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20440', diff: { action: 'update', updates: [] } }, - ], - }, - }, - }, - { - kind: 'transaction', - source: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - fee: '0', - counter: '703828', - gas_limit: '101201', - storage_limit: '70', - amount: '0', - destination: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - parameters: { - entrypoint: 'swap_exact_for_tokens', - value: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { string: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59' }, - { int: '5000000000' }, - ], - }, - { - prim: 'Pair', - args: [{ int: '14146908' }, { string: '2022-01-28T11:57:44.601Z' }], - }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { string: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { - prim: 'Pair', - args: [ - { string: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - }, - ], - }, - ], - }, - }, - metadata: { - balance_updates: [], - operation_result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Some', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { prim: 'None' }, - ], - }, - { - prim: 'Pair', - args: [ - { prim: 'None' }, - { prim: 'Right', args: [{ prim: 'Unit' }] }, - ], - }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600', - }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { - prim: 'Pair', - args: [ - { - bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600', - }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - }, - ], - }, - { prim: 'None' }, - ], - }, - ], - }, - ], - }, - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - { prim: 'Pair', args: [{ int: '20669' }, { int: '20670' }] }, - ], - }, - big_map_diff: [], - consumed_gas: '12665', - consumed_milligas: '12664013', - storage_size: '32990', - lazy_storage_diff: [ - { kind: 'big_map', id: '20670', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20669', diff: { action: 'update', updates: [] } }, - ], - }, - internal_operation_results: [ - { - kind: 'transaction', - source: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - nonce: 0, - amount: '0', - destination: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - parameters: { - entrypoint: 'get_reserves', - value: { - bytes: - '01a783b18821ce1f502c8a1c2fd9761ad21c1391d60072657365727665735f63616c6c6261636b', - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20832' }, { int: '20833' }] }, - { prim: 'Pair', args: [{ int: '20834' }, { int: '20835' }] }, - ], - }, - { int: '20836' }, - ], - }, - { prim: 'Pair', args: [{ prim: 'None' }, { int: '20837' }] }, - ], - }, - { prim: 'Pair', args: [{ int: '2369921' }, { int: '976068754' }] }, - { int: '1633368712' }, - { int: '3520039054386878' }, - ], - { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { int: '9999515636866' }, - { int: '35198685566720594775323444348' }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - ], - }, - big_map_diff: [], - consumed_gas: '9288', - consumed_milligas: '9287559', - storage_size: '19227', - lazy_storage_diff: [ - { kind: 'big_map', id: '20837', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20836', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20835', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20834', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20833', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20832', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 2, - amount: '0', - destination: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - parameters: { - entrypoint: 'reserves_callback', - value: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [{ int: '3520039054386878' }, { int: '9999515636866' }], - }, - { int: '188166353164099' }, - ], - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Some', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f', - }, - { prim: 'Some', args: [{ int: '3520039054386878' }] }, - ], - }, - { - prim: 'Pair', - args: [ - { prim: 'Some', args: [{ int: '9999515636866' }] }, - { prim: 'Left', args: [{ prim: 'Unit' }] }, - ], - }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: - '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600', - }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { - prim: 'Pair', - args: [ - { - bytes: - '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600', - }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - }, - ], - }, - { prim: 'Some', args: [{ int: '188166353164099' }] }, - ], - }, - ], - }, - ], - }, - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - { prim: 'Pair', args: [{ int: '20669' }, { int: '20670' }] }, - ], - }, - big_map_diff: [], - consumed_gas: '9479', - consumed_milligas: '9478157', - storage_size: '33015', - lazy_storage_diff: [ - { kind: 'big_map', id: '20670', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20669', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - nonce: 1, - amount: '0', - destination: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - parameters: { - entrypoint: 'main_entry', - value: { - prim: 'Left', - args: [ - { - prim: 'Left', - args: [ - { - prim: 'Left', - args: [ - { - prim: 'Right', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: - '0000bc82eedf570c81349226f937bed3d3485a2b080f', - }, - { int: '5000000000' }, - ], - }, - { - prim: 'Pair', - args: [{ int: '14146908' }, { int: '1643371064' }], - }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - ], - }, - ], - }, - ], - }, - ], - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'None' }, - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - { prim: 'Pair', args: [{ int: '20669' }, { int: '20670' }] }, - ], - }, - big_map_diff: [], - consumed_gas: '11667', - consumed_milligas: '11666798', - storage_size: '32875', - lazy_storage_diff: [ - { kind: 'big_map', id: '20670', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20669', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - nonce: 3, - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'transfer', - value: [ - { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { prim: 'Pair', args: [{ int: '1' }, { int: '5000000000' }] }, - ], - }, - ], - ], - }, - ], - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [ - { - action: 'update', - big_map: '20440', - key_hash: 'exprtqGiP8vxvoGE35foNVciCmRtuofNsZVinQfSE2SKdQdAvSTcBS', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '1' }, - ], - }, - value: { int: '5000000000' }, - }, - { - action: 'update', - big_map: '20440', - key_hash: 'exprv6HH2WDmykE9AQ5kmXbsZAbEHzr2Wy6Bkt5CCS9U9CEgiNdRJr', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - value: { int: '3520044054386878' }, - }, - ], - consumed_gas: '5018', - consumed_milligas: '5017728', - storage_size: '48520', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20442', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { - kind: 'big_map', - id: '20440', - diff: { - action: 'update', - updates: [ - { - key_hash: 'exprv6HH2WDmykE9AQ5kmXbsZAbEHzr2Wy6Bkt5CCS9U9CEgiNdRJr', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - value: { int: '3520044054386878' }, - }, - { - key_hash: 'exprtqGiP8vxvoGE35foNVciCmRtuofNsZVinQfSE2SKdQdAvSTcBS', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '1' }, - ], - }, - value: { int: '5000000000' }, - }, - ], - }, - }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm', - nonce: 4, - amount: '0', - destination: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - parameters: { - entrypoint: 'start_swap', - value: { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '0' }, - ], - }, - { prim: 'Pair', args: [{ int: '14161068' }, { prim: 'None' }] }, - ], - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20832' }, { int: '20833' }] }, - { prim: 'Pair', args: [{ int: '20834' }, { int: '20835' }] }, - ], - }, - { int: '20836' }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Some', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: - '0000bc82eedf570c81349226f937bed3d3485a2b080f', - }, - { int: '0' }, - ], - }, - { - prim: 'Pair', - args: [{ int: '14161068' }, { prim: 'None' }], - }, - ], - }, - { - prim: 'Pair', - args: [ - { prim: 'None' }, - { prim: 'Right', args: [{ prim: 'Unit' }] }, - ], - }, - ], - }, - ], - }, - { int: '20837' }, - ], - }, - ], - }, - { prim: 'Pair', args: [{ int: '2369921' }, { int: '976068754' }] }, - { int: '1633368712' }, - { int: '3520039054386878' }, - ], - { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { int: '9999515636866' }, - { int: '35198685566720594775323444348' }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - ], - }, - big_map_diff: [], - consumed_gas: '12571', - consumed_milligas: '12570775', - storage_size: '19279', - lazy_storage_diff: [ - { kind: 'big_map', id: '20837', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20836', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20835', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20834', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20833', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20832', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 5, - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'transfer', - value: [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - [ - { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { prim: 'Pair', args: [{ int: '1' }, { int: '0' }] }, - ], - }, - ], - ], - }, - ], - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [ - { - action: 'update', - big_map: '20440', - key_hash: 'exprtqGiP8vxvoGE35foNVciCmRtuofNsZVinQfSE2SKdQdAvSTcBS', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '1' }, - ], - }, - value: { int: '5000000000' }, - }, - { - action: 'update', - big_map: '20440', - key_hash: 'exprv6HH2WDmykE9AQ5kmXbsZAbEHzr2Wy6Bkt5CCS9U9CEgiNdRJr', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - value: { int: '3520044054386878' }, - }, - ], - consumed_gas: '4759', - consumed_milligas: '4758619', - storage_size: '48520', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20442', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { - kind: 'big_map', - id: '20440', - diff: { - action: 'update', - updates: [ - { - key_hash: 'exprv6HH2WDmykE9AQ5kmXbsZAbEHzr2Wy6Bkt5CCS9U9CEgiNdRJr', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - value: { int: '3520044054386878' }, - }, - { - key_hash: 'exprtqGiP8vxvoGE35foNVciCmRtuofNsZVinQfSE2SKdQdAvSTcBS', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '1' }, - ], - }, - value: { int: '5000000000' }, - }, - ], - }, - }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 6, - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'transfer', - value: [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - [ - { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { prim: 'Pair', args: [{ int: '0' }, { int: '14161068' }] }, - ], - }, - ], - ], - }, - ], - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [ - { - action: 'update', - big_map: '20440', - key_hash: 'exprtsTQSSJpAVrr1qEA9LRMaNz7zpBH4bpmGGBM8N6JztetYSREov', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '0' }, - ], - }, - value: { int: '9999501475798' }, - }, - { - action: 'update', - big_map: '20440', - key_hash: 'expruhP7hUgjQpeNgzkjxgBt8Bz3bncenkYmC383MS2UYEsTMYXYaU', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '0' }, - ], - }, - value: { int: '14161068' }, - }, - ], - balance_updates: [ - { - kind: 'contract', - contract: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - change: '-17500', - origin: 'block', - }, - ], - consumed_gas: '4522', - consumed_milligas: '4521387', - storage_size: '48590', - paid_storage_size_diff: '70', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20442', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { - kind: 'big_map', - id: '20440', - diff: { - action: 'update', - updates: [ - { - key_hash: 'expruhP7hUgjQpeNgzkjxgBt8Bz3bncenkYmC383MS2UYEsTMYXYaU', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { int: '0' }, - ], - }, - value: { int: '14161068' }, - }, - { - key_hash: 'exprtsTQSSJpAVrr1qEA9LRMaNz7zpBH4bpmGGBM8N6JztetYSREov', - key: { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '0' }, - ], - }, - value: { int: '9999501475798' }, - }, - ], - }, - }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 7, - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'balance_of', - value: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - ], - { - bytes: - '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc40062616c616e63655f63616c6c6261636b', - }, - ], - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [], - consumed_gas: '5064', - consumed_milligas: '5063541', - storage_size: '48590', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20442', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20440', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - nonce: 10, - amount: '0', - destination: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - parameters: { - entrypoint: 'balance_callback', - value: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '1' }, - ], - }, - { int: '3520044054386878' }, - ], - }, - ], - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20832' }, { int: '20833' }] }, - { prim: 'Pair', args: [{ int: '20834' }, { int: '20835' }] }, - ], - }, - { int: '20836' }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Some', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: - '0000bc82eedf570c81349226f937bed3d3485a2b080f', - }, - { int: '0' }, - ], - }, - { - prim: 'Pair', - args: [ - { int: '14161068' }, - { - prim: 'Some', - args: [{ int: '3520044054386878' }], - }, - ], - }, - ], - }, - { - prim: 'Pair', - args: [ - { prim: 'None' }, - { - prim: 'Left', - args: [{ prim: 'Left', args: [{ prim: 'Unit' }] }], - }, - ], - }, - ], - }, - ], - }, - { int: '20837' }, - ], - }, - ], - }, - { prim: 'Pair', args: [{ int: '2369921' }, { int: '976068754' }] }, - { int: '1633368712' }, - { int: '3520039054386878' }, - ], - { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { int: '9999515636866' }, - { int: '35198685566720594775323444348' }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - ], - }, - big_map_diff: [], - consumed_gas: '7023', - consumed_milligas: '7022609', - storage_size: '19290', - lazy_storage_diff: [ - { kind: 'big_map', id: '20837', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20836', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20835', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20834', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20833', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20832', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 8, - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'balance_of', - value: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '0' }, - ], - }, - ], - { - bytes: - '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc40062616c616e63655f63616c6c6261636b', - }, - ], - }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [], - consumed_gas: '5064', - consumed_milligas: '5063529', - storage_size: '48590', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20442', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20440', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - nonce: 11, - amount: '0', - destination: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - parameters: { - entrypoint: 'balance_callback', - value: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { bytes: '01728d89975f2119d0bcc6dee11eb7d627b0fe5dc400' }, - { int: '0' }, - ], - }, - { int: '9999501475798' }, - ], - }, - ], - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20832' }, { int: '20833' }] }, - { prim: 'Pair', args: [{ int: '20834' }, { int: '20835' }] }, - ], - }, - { int: '20836' }, - ], - }, - { - prim: 'Pair', - args: [ - { - prim: 'Some', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - bytes: - '0000bc82eedf570c81349226f937bed3d3485a2b080f', - }, - { int: '0' }, - ], - }, - { - prim: 'Pair', - args: [ - { int: '14161068' }, - { - prim: 'Some', - args: [{ int: '3520044054386878' }], - }, - ], - }, - ], - }, - { - prim: 'Pair', - args: [ - { prim: 'Some', args: [{ int: '9999501475798' }] }, - { - prim: 'Left', - args: [{ prim: 'Right', args: [{ prim: 'Unit' }] }], - }, - ], - }, - ], - }, - ], - }, - { int: '20837' }, - ], - }, - ], - }, - { prim: 'Pair', args: [{ int: '2369921' }, { int: '976068754' }] }, - { int: '1633368712' }, - { int: '3520039054386878' }, - ], - { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { int: '9999515636866' }, - { int: '35198685566720594775323444348' }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - ], - }, - big_map_diff: [], - consumed_gas: '7025', - consumed_milligas: '7024325', - storage_size: '19298', - lazy_storage_diff: [ - { kind: 'big_map', id: '20837', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20836', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20835', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20834', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20833', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20832', diff: { action: 'update', updates: [] } }, - ], - }, - }, - { - kind: 'transaction', - source: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - nonce: 9, - amount: '0', - destination: 'KT1K2U9q55iPwGJEFyEqfbL3AKhHX4f6UThT', - parameters: { - entrypoint: 'finalize_action', - value: { prim: 'Right', args: [{ prim: 'Unit' }] }, - }, - result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20832' }, { int: '20833' }] }, - { prim: 'Pair', args: [{ int: '20834' }, { int: '20835' }] }, - ], - }, - { int: '20836' }, - ], - }, - { prim: 'Pair', args: [{ prim: 'None' }, { int: '20837' }] }, - ], - }, - { prim: 'Pair', args: [{ int: '2369927' }, { int: '976906563' }] }, - { int: '1633371092' }, - { int: '3520044054386878' }, - ], - { - prim: 'Pair', - args: [ - [ - { - prim: 'Pair', - args: [ - { int: '9999501475798' }, - { int: '35198685566720594775323444348' }, - ], - }, - { - prim: 'Pair', - args: [ - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '1' }] }, - ], - }, - { bytes: '01be8be8d6aa8aa77b26fcdfb58b2d3abc097ba74600' }, - { prim: 'Some', args: [{ int: '0' }] }, - ], - { bytes: '012582f9db72407f07e78f065db7965ff42c46248700' }, - ], - }, - ], - }, - big_map_diff: [], - consumed_gas: '6962', - consumed_milligas: '6961817', - storage_size: '19227', - lazy_storage_diff: [ - { kind: 'big_map', id: '20837', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20836', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20835', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20834', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20833', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20832', diff: { action: 'update', updates: [] } }, - ], - }, - }, - ], - }, - }, - { - kind: 'transaction', - source: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - fee: '12049', - counter: '703829', - gas_limit: '3392', - storage_limit: '0', - amount: '0', - destination: 'KT1RxHZJCrFVuPQJWqhVLBZeZxm7SawHdHGL', - parameters: { - entrypoint: 'update_operators', - value: [ - { - prim: 'Right', - args: [ - { - prim: 'Pair', - args: [ - { string: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59' }, - { - prim: 'Pair', - args: [{ string: 'KT1PrWB2PSwWNzbfpA9SJbUaHXxCzbLSJspm' }, { int: '1' }], - }, - ], - }, - ], - }, - ], - }, - metadata: { - balance_updates: [ - { - kind: 'contract', - contract: 'tz1cpnaaG6FkPAUcrsj45zhYYSPMvJnxyc59', - change: '-12049', - origin: 'block', - }, - { - kind: 'freezer', - category: 'fees', - delegate: 'tz1RomaiWJV3NFDZWTMVR2aEeHknsn3iF5Gi', - cycle: 131, - change: '12049', - origin: 'block', - }, - ], - operation_result: { - status: 'applied', - storage: { - prim: 'Pair', - args: [ - { prim: 'Pair', args: [{ int: '20440' }, { int: '20441' }] }, - { prim: 'Pair', args: [{ int: '20442' }, { int: '20443' }] }, - ], - }, - big_map_diff: [ - { - action: 'update', - big_map: '20442', - key_hash: 'exprtpmtn8bL4jrTW2AfMZJ9p2yx1k9xMkN5f7EWhxtUVPtvutxqNL', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { - prim: 'Pair', - args: [ - { bytes: '01a783b18821ce1f502c8a1c2fd9761ad21c1391d600' }, - { int: '1' }, - ], - }, - ], - }, - }, - ], - consumed_gas: '3292', - consumed_milligas: '3291138', - storage_size: '48523', - lazy_storage_diff: [ - { kind: 'big_map', id: '20443', diff: { action: 'update', updates: [] } }, - { - kind: 'big_map', - id: '20442', - diff: { - action: 'update', - updates: [ - { - key_hash: 'exprtpmtn8bL4jrTW2AfMZJ9p2yx1k9xMkN5f7EWhxtUVPtvutxqNL', - key: { - prim: 'Pair', - args: [ - { bytes: '0000bc82eedf570c81349226f937bed3d3485a2b080f' }, - { - prim: 'Pair', - args: [ - { bytes: '01a783b18821ce1f502c8a1c2fd9761ad21c1391d600' }, - { int: '1' }, - ], - }, - ], - }, - }, - ], - }, - }, - { kind: 'big_map', id: '20441', diff: { action: 'update', updates: [] } }, - { kind: 'big_map', id: '20440', diff: { action: 'update', updates: [] } }, - ], - }, - }, - }, - ], - signature: - 'siggVH9Kh81y4UraZqdPvH2zdP3RgjUSt2XvM2VDD9N5mGptMrF31GRhaKAxtk6xErHsxLqohMvudwvLkjsMg7TkfGrbwMdC', - }, - ], - ], -}; -export const blockHash = 'BlockHash'; -export const liveBlocks = [ - 'BKiHeQzuKM5quBsgVL25UDFXKcZyaTt26AQUtUkbA4Vh3dAQY21', - 'BKiboc2xTLtbCXt6AWX2BpR4km41onVrLmhFSTjYUA2iWKBwSTH', -]; -export const balance = new BigNumber(4138876344398); -export const storage = { prim: 'Pair', args: [{ int: '0' }, { int: '1' }] }; -export const script = { - code: [ - { prim: 'parameter', args: [] }, - { prim: 'storage', args: [] }, - { prim: 'code', args: [] }, - ], - storage: { prim: 'Pair', args: [] }, -}; -export const contract = { - balance: new BigNumber(765), - script: { - code: [], - storage: { prim: 'Pair', args: [] }, - }, -}; -export const unstakeRequestsResponse = { - finalizable: [ - { - delegate: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA', - cycle: 10, - amount: new BigNumber('500000000'), - }, - ], - unfinalizable: { - delegate: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA', - requests: [ - { - cycle: 11, - amount: new BigNumber('200000000'), - }, - ], - }, -}; -export const managerKey = 'edpkvP1NXoo8vhYbPSvXdy466EHoYWBpf6zmjghB2p3DwJPjbB5nsf'; -export const delegate = 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'; -export const bigmapValue = { prim: 'Pair', args: [[], { int: '100' }] }; -export const delegates = { - full_balance: new BigNumber('10289576365'), - current_frozen_deposits: new BigNumber('2028957741'), - frozen_deposits: new BigNumber('1028957741'), - staking_balance: new BigNumber('10289576365'), - delegated_contracts: ['tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'], - delegated_balance: new BigNumber('0'), - min_delegated_in_current_cycle: { - amount: '8260618624', - level: { - level: 81924, - level_position: 81923, - cycle: 7, - cycle_position: 3, - expected_commitment: false, - }, - }, - deactivated: false, - grace_period: 7, - pending_denunciations: false, - total_delegated_stake: new BigNumber('0'), - staking_denominator: new BigNumber('0'), - voting_power: new BigNumber('10289577405'), - remaining_proposals: 20, - active_consensus_key: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', -}; -export const votingInfo = { - voting_power: '1005169895965', - remaining_proposals: 20, -}; -export const constants = { - proof_of_work_nonce_size: 8, - nonce_length: 32, - max_anon_ops_per_block: 132, - max_operation_data_length: 32768, - max_proposals_per_delegate: 20, - preserved_cycles: 3, - blocks_per_cycle: 4096, - blocks_per_commitment: 32, - blocks_per_roll_snapshot: 256, - blocks_per_voting_period: 20480, - time_between_blocks: [new BigNumber(30), new BigNumber(20)], - endorsers_per_block: 256, - hard_gas_limit_per_operation: new BigNumber(1040000), - hard_gas_limit_per_block: new BigNumber(5200000), - proof_of_work_threshold: new BigNumber(70368744177663), - minimal_stake: new BigNumber(8000000000), - michelson_maximum_type_size: 1000, - seed_nonce_revelation_tip: new BigNumber(125000), - origination_size: 257, - block_security_deposit: new BigNumber(640000000), - endorsement_security_deposit: new BigNumber(2500000), - baking_reward_per_endorsement: [new BigNumber(78125), new BigNumber(11719)], - endorsement_reward: [new BigNumber(78125), new BigNumber(52083)], - cost_per_byte: new BigNumber(250), - hard_storage_limit_per_operation: new BigNumber(60000), - quorum_min: 2000, - quorum_max: 7000, - min_proposal_quorum: 500, - initial_endorsers: 192, - delay_per_missing_endorsement: new BigNumber(4), - minimal_block_delay: new BigNumber(15), - liquidity_baking_subsidy: new BigNumber(2500000), - liquidity_baking_sunset_level: 2032928, - liquidity_baking_escape_ema_threshold: 1000000, -}; -export const blockHeader = { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - chain_id: 'NetXz969SFaFn8k', - hash: 'BMZXDPn8kKMCSXX1ZfpkCHBuSeXkwqbEp3MJtEwNB21TNVC3Gsp', - level: 516500, - proto: 2, - predecessor: 'BM4FhgGT16ikghoVoz1WoG5z2pmo24GC9sTrfMk5UB4KEnzjNTu', - timestamp: '2021-09-27T20:41:55Z', - validation_pass: 4, - operations_hash: 'LLoZRW4irfmyGwY5ufakDd52aA1P6bVhn3zpjBbQxdjPvwjeEaDkK', - fitness: ['01', '000000000007e193'], - context: 'CoWX5BdtfTGKmmwpwhF9cpU6SqBmP5MqostAPP6b3oZp94PG9V2S', - priority: 0, - proof_of_work_nonce: '36055190bec80200', - liquidity_baking_escape_vote: false, - signature: - 'sigXwcYckn43nA9uqFKKTqFbkiyhBdKfRd8mbCWHnk4kFqis7unT4VJozBrT7f1pVZNUnTPwHYBqarCdVTRajj5bhWg4qGSF', -}; - -export const bakingRights = [ - { - level: 516501, - delegate: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', - priority: 0, - estimated_time: '2021-09-27T20:42:10Z', - }, -]; - -export const blockMetadata = { - protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - next_protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', - test_chain_status: { status: 'not_running' }, - max_operations_ttl: 120, - max_operation_data_length: 32768, - max_block_header_length: 239, - max_operation_list_length: [ - { max_size: 4194304, max_op: 2048 }, - { max_size: 32768 }, - { max_size: 135168, max_op: 132 }, - { max_size: 524288 }, - ], - baker: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - level_info: { - level: 516500, - level_position: 516499, - cycle: 127, - cycle_position: 403, - expected_commitment: false, - }, - voting_period_info: { - voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, - position: 4498, - remaining: 15981, - }, - nonce_hash: null, - consumed_gas: '0', - deactivated: [], - balance_updates: [ - { - kind: 'contract', - contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - change: '-640000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'deposits', - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - cycle: 127, - change: '640000000', - origin: 'block', - }, - { - kind: 'freezer', - category: 'rewards', - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - cycle: 127, - change: '16484375', - origin: 'block', - }, - ], - liquidity_baking_escape_ema: 243180, - implicit_operations_results: [ - { - kind: 'transaction', - storage: [Array], - balance_updates: [Array], - consumed_gas: '2118', - consumed_milligas: '2117300', - storage_size: '4636', - }, - ], -}; -export const attestationRights = [ - { - level: 151187, - delegates: [ - { - delegate: 'tz3Q1fwk1vh3zm5LqyUV9e2wZBdaEXcovh2r', - first_slot: 79, - attestation_power: 326, - consensus_key: 'tz3Q1fwk1vh3zm5LqyUV9e2wZBdaEXcovh2r', - }, - ], - }, -]; -export const ballotList = []; -export const ballots = { yay: 0, nay: 0, pass: 0 }; -export const currentPeriodKind = { - voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, - position: 4498, - remaining: 15981, -}; -export const currentProposal = null; -export const currentQuorum = 5500; -export const votesListing = [{ pkh: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', rolls: 399 }]; -export const porposals = []; -export const entryPoints = { - entrypoints: { main: { prim: 'pair', args: [] }, default: { prim: 'unit' } }, -}; -export const chainId = 'NetXz969SFaFn8k'; -export const packData = { - gas: 'unaccounted', - packed: '050a000000160000b24ac1e1759565d5c9b69af8450ce7ea3d1ee64c', -}; -export const currentPeriod = { - voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, - position: 4498, - remaining: 15981, -}; -export const successorPeriod = { - voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, - position: 4539, - remaining: 15940, -}; - -export const protocols = { - protocol: 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx', - next_protocol: 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx', -}; - -export const delegatesIthacanetResponse = { - full_balance: '1198951292321', - current_frozen_deposits: '120167343864', - frozen_deposits: '120167343864', - staking_balance: '1203308804406', - delegated_contracts: ['tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'], - delegated_balance: '4357512085', - deactivated: false, - grace_period: 37, - voting_power: 199, -}; - -export const delegatesKathmandunetResponse = { - full_balance: '965532868030', - current_frozen_deposits: '96350095609', - frozen_deposits: '96350095609', - staking_balance: '970221941952', - delegated_contracts: ['tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'], - delegated_balance: '4689073922', - deactivated: false, - grace_period: 42, - voting_power: '968128693450', - remaining_proposals: 20, -}; - -export const votingInfoKathmandunetResponse = { - voting_power: '1054404383333', - remaining_proposals: 20, -}; - -export const blockIthacanetResponse = { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'BMGdK16iMkm4YmgAneYuvd7B4R5S8nYQKFfKzXCKMHP1FqS5hXQ', - header: { - level: 135596, - proto: 2, - predecessor: 'BLgx6Cr7DYwXEexuz828mBUqCKotCXo8PRAN55A9wovUrYWvao8', - timestamp: '2022-02-24T01:09:20Z', - validation_pass: 4, - operations_hash: 'LLoaKP1SEeTE1ziKFRHipDYihitAoTHhEZbiartSvehqMPvu7v661', - fitness: ['02', '000211ac', '', 'ffffffff', '00000000'], - context: 'CoVkVfBsmMSCeTLcBesUe4TdhDhvZxhm8SN48Rky5B3aD8U92hY9', - payload_hash: 'vh28CE8X2KKMvt5S4aGzPdMq5FpcfVRSoeyU3D3TUdVyk9zucR31', - payload_round: 0, - proof_of_work_nonce: '409a3f3f250d0100', - liquidity_baking_escape_vote: false, - signature: - 'sigtWPWubCNXDfaH7NZQcei2hzBbHKQtw56z2WRvrmyPNBLRYP2cNAycFob1Dr8MBbbCGtCUny2BaEbzBa4kVEadMNrGp6Mk', - }, - metadata: { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - next_protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - test_chain_status: { - status: 'not_running', - }, - max_operations_ttl: 120, - max_operation_data_length: 32768, - max_block_header_length: 289, - max_operation_list_length: [ - { - max_size: 4194304, - max_op: 2048, - }, - { - max_size: 32768, - }, - { - max_size: 135168, - max_op: 132, - }, - { - max_size: 524288, - }, - ], - proposer: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - baker: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - level_info: { - level: 135596, - level_position: 135595, - cycle: 33, - cycle_position: 427, - expected_commitment: false, - }, - voting_period_info: { - voting_period: { - index: 6, - kind: 'proposal', - start_position: 122880, - }, - position: 12715, - remaining: 7764, - }, - nonce_hash: null, - consumed_gas: '1000000', - deactivated: [], - balance_updates: [ - { - kind: 'accumulator', - category: 'block fees', - change: '-1500', - origin: 'block', - }, - { - kind: 'minted', - category: 'baking rewards', - change: '-5000000', - origin: 'block', - }, - { - kind: 'contract', - contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - change: '5001500', - origin: 'block', - }, - { - kind: 'minted', - category: 'baking bonuses', - change: '-4217424', - origin: 'block', - }, - { - kind: 'contract', - contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - change: '4217424', - origin: 'block', - }, - ], - liquidity_baking_escape_ema: 119624, - implicit_operations_results: [ - { - kind: 'transaction', - storage: [ - { - int: '1', - }, - { - int: '338987500100', - }, - { - int: '100', - }, - { - bytes: '01e927f00ef734dfc85919635e9afc9166c83ef9fc00', - }, - { - bytes: '0115eb0104481a6d7921160bc982c5e0a561cd8a3a00', - }, - ], - balance_updates: [ - { - kind: 'minted', - category: 'subsidy', - change: '-2500000', - origin: 'subsidy', - }, - { - kind: 'contract', - contract: 'KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5', - change: '2500000', - origin: 'subsidy', - }, - ], - consumed_gas: '225', - consumed_milligas: '224023', - storage_size: '4632', - }, - ], - }, - operations: [ - [ - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooqwt58nxiSHAsmwaBDux3LoEkNE9p14v1TXtnB4CfEaobgHuZ2', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 0, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1iZ9LkpAhN8X1L6RpBtfy3wxpEWzFrXz8j', - endorsement_power: 206, - }, - }, - ], - signature: - 'sigT3AuNgusteshSqt2J5aha7iSsYAXsYVGAr62RNZkrd1Gp6JjY59CtD33a4zyv57ZwV7J5JvWRD7uZrwaE6NSzmP61SGkb', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opZP7VfVcdqY5ivF5tyFYr48SR4wj74wrc4hQHyQWLv5azBZtiN', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 1, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1RuHDSj9P7mNNhfKxsyLGRDahTX5QD1DdP', - endorsement_power: 121, - }, - }, - ], - signature: - 'sigdipDBAxcvLShbKRHNkBoSxxFUr2bTnoVsaM3df8zZhmNex1SefwfNmBJQPePvXSyePWMHSxQiDxpCDkzppEEade6eaSjh', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onxcESouatMhSqYxmtQPtM99df28TYavNR2izyJtULDG29eq5FY', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 2, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1RJ74UepJA9tigjoEeUEFajowzVB3QQaVx', - endorsement_power: 257, - }, - }, - ], - signature: - 'sigeNkH2F3rFUha9Qr1kunmoTHMsWcDKtjh6owGkmBu1xJW7VWfFvgGJtz3qvi2a7npnTfLzVPKroAQwTc8XjY3rMNwDZuUr', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'op2gAd6kzpWPViXxC5QhH62HhtRjjthf2QT78C9vC7epL9V5sxo', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 3, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', - endorsement_power: 1227, - }, - }, - ], - signature: - 'sigVwJmrALwEdqetE3Z6EDJyGpett54p4A68xKSpvZMnS2aJZa6Dqr6hiQFroEaV97VsZdVoBZZK1pn7o5CvwZ6BuHG89v7j', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'oorGPbxDrdFc8aZfa7BSLm2v2x3DEWdnThvvq6sxwv2Xbra74A9', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 4, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1XMiZwHpHZ8a1AfwRWKfzLskJgZNyV8PHs', - endorsement_power: 139, - }, - }, - ], - signature: - 'sigRz9Ev7mwTiRtVdBegKCGHLqWz3JSt8HwwmmPoTNYEHyijovj62MRHQBAuaKVi6c7rwoP2451v1ejKB1diHYvgQ2L9iVBj', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opLpk7KV13f8ZkjZrf15PW6gjaiBAeJeWgz3xsgcHv538afebPR', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 5, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1XGwK6kkiJaq2ZEJYcWEj5Tc8bcV6pNHqV', - endorsement_power: 48, - }, - }, - ], - signature: - 'sigXSUhDQmNG4PuQR6Eaz5ffDsL3upXZ1QwsSd7Q4LTTkkucbsYTqorgpY9dh28XtcTFkxi6cGYN2cUUPvDaMXZxX4nJ4Zg2', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'op55vJPHBNdwmAztCGSEezNgUBMLrLa19F7FXGt4mXmYBJ2rz6i', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 7, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1cg5EqC3WdZgRSvGJeW328S4KQNrT4jvyv', - endorsement_power: 264, - }, - }, - ], - signature: - 'sigWtL6YhYswrxoBxACy7P8dwrcWW4syiTeeggTL5sLyS1PdQUYaTMVgvTzWmdX5LdpC4JSB5o3xxF941ac3nbnFtzXgwMYc', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onxq8YLBdsL8AJy81MXrsSMKdBKFnLk7GVqAUxjjoCLFt6D8HMN', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 8, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1NGS7FEGGfEFp5XRVkHBqVqSQ8VuumF9j3', - endorsement_power: 33, - }, - }, - ], - signature: - 'sigpDY5wQs7Rxo7sFTcJUkxzXeBMvbnseLZaLAT5JB95iGS9ndwdQF1WYLSdAYDhwiXKuZpcGDFLHipHYizpQh8qQFg8xrYU', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onqHgJw1HWxoHucpim35NQ2t4V4sPzJmPTPhru4cxuBJuMjQzwh', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 10, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1TGKSrZrBpND3PELJ43nVdyadoeiM1WMzb', - endorsement_power: 164, - }, - }, - ], - signature: - 'sigUfJLBuU6HnaCVRDvFG6YELjMy3YmoMwj8ohgaYt9mTQUbK28AkfxjDcck72e3LsL6KGBZZjmSWDwwU6DtJanM5orRTubY', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooCYNg4ZMQWt3yzfyrDbmK6dtyMuwYr6spj2eCCoJf76iZeP3mP', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 12, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1MeT8NACB8Q4uV9dPQ3YxXBmYgapbxQxQ5', - endorsement_power: 782, - }, - }, - ], - signature: - 'sigWwS6Cqc32rrngX136d2KKfp9SgBDdosgA2HoALEk62tRMjU6LJSa6m6SDnrKitAZrXTtD9VguMCc61X8oUuYyYt5nT1CF', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opDt75d4MTscbTgXzcJVrKD25QPofMpkTzofCAeRZgskLYwbJX5', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 13, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1dqPQn5HXNJ7yjcqBx2w6sozjPXTV1kpfh', - endorsement_power: 156, - }, - }, - ], - signature: - 'sigijCvAxjub2QdmhNT4wQkppQDYrKAxt7MN1v9iwRszcR3bMkKK6VfACHpy7RkQ4VvN3caPMJf6rhnLRdgpAqpQrAwj6KBT', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'oohJgzphmFhuqPzhhSgMThmeuUQNmpqbwUMjc2tPCGryQTFDCQ8', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 17, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1foXHgRzdYdaLgX6XhpZGxbBv42LZ6ubvE', - endorsement_power: 237, - }, - }, - ], - signature: - 'sigQkUSHt6izTh7TNn3GTtELiL6rypCYUYHFPU65FXWojV6xhsL7jDkJipxSLvpPhshK8d7EebWSe2PhFrtqgUWBbuGibNtm', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooQnVunqu4u6KVD65kKfruyh4fUDLD8ahqmvg3tWQbo1WX6yreK', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 18, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1NiaviJwtMbpEcNqSP6neeoBYj8Brb3QPv', - endorsement_power: 240, - }, - }, - ], - signature: - 'sigqVDESVHH7tkjtyuM63TsL28C3HSjmesdGJn7ALFKVQHn1Ciw23PhAXeeR3iS9LtVihM7LQy4hqjZhZqCWnP5BmoPgXSFr', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooUzJx1JK2uMnSxzwTzN7VCaaGropVm32w1CMXc25fLwBvNoSiF', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 20, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1LQ32syCNyGj6FdAuJfko42Wep87iYZk8k', - endorsement_power: 159, - }, - }, - ], - signature: - 'sigTcHdNzSGKd3WoKTcwFYvZXseN3oya2eNnRWvnh3yjDoqjB4mJedUrvVPHb3XphnejGhmqscWQeqo8qz5SMJGFvSLsaU5R', - }, + }, +}; +export const managerKey = 'edpkvP1NXoo8vhYbPSvXdy466EHoYWBpf6zmjghB2p3DwJPjbB5nsf'; +export const delegate = 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'; +export const bigmapValue = { prim: 'Pair', args: [[], { int: '100' }] }; +export const delegates = { + full_balance: new BigNumber('10289576365'), + current_frozen_deposits: new BigNumber('2028957741'), + frozen_deposits: new BigNumber('1028957741'), + staking_balance: new BigNumber('10289576365'), + delegated_contracts: ['tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'], + delegated_balance: new BigNumber('0'), + min_delegated_in_current_cycle: { + amount: '8260618624', + level: { + level: 81924, + level_position: 81923, + cycle: 7, + cycle_position: 3, + expected_commitment: false, + }, + }, + deactivated: false, + grace_period: 7, + pending_denunciations: false, + total_delegated_stake: new BigNumber('0'), + staking_denominator: new BigNumber('0'), + voting_power: new BigNumber('10289577405'), + remaining_proposals: 20, + active_consensus_key: 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', +}; +export const votingInfo = { + voting_power: '1005169895965', + remaining_proposals: 20, +}; +export const constants = { + proof_of_work_nonce_size: 8, + nonce_length: 32, + max_anon_ops_per_block: 132, + max_operation_data_length: 32768, + max_proposals_per_delegate: 20, + max_micheline_node_count: 50000, + max_micheline_bytes_limit: 50000, + max_allowed_global_constants_depth: 10000, + cache_layout_size: 3, + michelson_maximum_type_size: 2001, + max_slashing_period: 2, + smart_rollup_max_wrapped_proof_binary_size: 30000, + smart_rollup_message_size_limit: 4096, + smart_rollup_max_number_of_messages_per_level: '1000000', + consensus_rights_delay: 2, + blocks_preservation_cycles: 1, + delegate_parameters_activation_delay: 3, + blocks_per_cycle: 128, + blocks_per_commitment: 16, + nonce_revelation_threshold: 32, + cycles_per_voting_period: 1, + hard_gas_limit_per_operation: '1040000', + hard_gas_limit_per_block: '5200000', + proof_of_work_threshold: '-1', + minimal_stake: '6000000000', + minimal_frozen_stake: '600000000', + vdf_difficulty: '10000000', + origination_size: 257, + issuance_weights: { + base_total_issued_per_minute: '85007812', + baking_reward_fixed_portion_weight: 5120, + baking_reward_bonus_weight: 5120, + attesting_reward_weight: 10240, + seed_nonce_revelation_tip_weight: 1, + vdf_revelation_tip_weight: 1, + }, + cost_per_byte: '250', + hard_storage_limit_per_operation: '60000', + quorum_min: 2000, + quorum_max: 7000, + min_proposal_quorum: 500, + liquidity_baking_subsidy: '5000000', + liquidity_baking_toggle_ema_threshold: 100000, + max_operations_time_to_live: 120, + minimal_block_delay: '7', + delay_increment_per_round: '7', + consensus_committee_size: 7000, + consensus_threshold: 4667, + minimal_participation_ratio: { numerator: 2, denominator: 3 }, + limit_of_delegation_over_baking: 9, + percentage_of_frozen_deposits_slashed_per_double_baking: 700, + percentage_of_frozen_deposits_slashed_per_double_attestation: 5000, + max_slashing_per_block: 10000, + max_slashing_threshold: 2334, + cache_script_size: 100000000, + cache_stake_distribution_cycles: 8, + cache_sampler_state_cycles: 8, + dal_parametric: { + feature_enable: true, + incentives_enable: false, + number_of_slots: 32, + attestation_lag: 8, + attestation_threshold: 66, + redundancy_factor: 8, + page_size: 3967, + slot_size: 126944, + number_of_shards: 512, + }, + smart_rollup_arith_pvm_enable: true, + smart_rollup_origination_size: 6314, + smart_rollup_challenge_window_in_blocks: 40, + smart_rollup_stake_amount: '32000000', + smart_rollup_commitment_period_in_blocks: 20, + smart_rollup_max_lookahead_in_blocks: 30000, + smart_rollup_max_active_outbox_levels: 20160, + smart_rollup_max_outbox_messages_per_level: 100, + smart_rollup_number_of_sections_in_dissection: 32, + smart_rollup_timeout_period_in_blocks: 500, + smart_rollup_max_number_of_cemented_commitments: 5, + smart_rollup_max_number_of_parallel_games: 32, + smart_rollup_reveal_activation_level: { + raw_data: { Blake2B: 0 }, + metadata: 0, + dal_page: 1, + dal_parameters: 1, + dal_attested_slots_validity_lag: 241920, + }, + smart_rollup_private_enable: true, + smart_rollup_riscv_pvm_enable: true, + zk_rollup_enable: true, + zk_rollup_origination_size: 4000, + zk_rollup_min_pending_to_process: 10, + zk_rollup_max_ticket_payload_size: 2048, + global_limit_of_staking_over_baking: 5, + edge_of_staking_over_delegation: 2, + adaptive_issuance_launch_ema_threshold: 0, + adaptive_rewards_params: { + issuance_ratio_final_min: { numerator: '1', denominator: '400' }, + issuance_ratio_final_max: { numerator: '1', denominator: '10' }, + issuance_ratio_initial_min: { numerator: '9', denominator: '200' }, + issuance_ratio_initial_max: { numerator: '11', denominator: '200' }, + initial_period: 10, + transition_period: 50, + max_bonus: '50000000000000', + growth_rate: { numerator: '1', denominator: '100' }, + center_dz: { numerator: '1', denominator: '2' }, + radius_dz: { numerator: '1', denominator: '50' }, + }, + adaptive_issuance_activation_vote_enable: true, + autostaking_enable: true, + adaptive_issuance_force_activation: true, + ns_enable: true, + direct_ticket_spending_enable: false, +}; +export const blockHeader = { + protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', + chain_id: 'NetXz969SFaFn8k', + hash: 'BMZXDPn8kKMCSXX1ZfpkCHBuSeXkwqbEp3MJtEwNB21TNVC3Gsp', + level: 516500, + proto: 2, + predecessor: 'BM4FhgGT16ikghoVoz1WoG5z2pmo24GC9sTrfMk5UB4KEnzjNTu', + timestamp: '2021-09-27T20:41:55Z', + validation_pass: 4, + operations_hash: 'LLoZRW4irfmyGwY5ufakDd52aA1P6bVhn3zpjBbQxdjPvwjeEaDkK', + fitness: ['01', '000000000007e193'], + context: 'CoWX5BdtfTGKmmwpwhF9cpU6SqBmP5MqostAPP6b3oZp94PG9V2S', + priority: 0, + proof_of_work_nonce: '36055190bec80200', + liquidity_baking_escape_vote: false, + signature: + 'sigXwcYckn43nA9uqFKKTqFbkiyhBdKfRd8mbCWHnk4kFqis7unT4VJozBrT7f1pVZNUnTPwHYBqarCdVTRajj5bhWg4qGSF', +}; + +export const bakingRights = [ + { + level: 516501, + delegate: 'tz1VWasoyFGAWZt5K2qZRzP3cWzv3z7MMhP8', + priority: 0, + estimated_time: '2021-09-27T20:42:10Z', + }, +]; + +export const blockMetadata = { + protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', + next_protocol: 'PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV', + test_chain_status: { status: 'not_running' }, + max_operations_ttl: 120, + max_operation_data_length: 32768, + max_block_header_length: 239, + max_operation_list_length: [ + { max_size: 4194304, max_op: 2048 }, + { max_size: 32768 }, + { max_size: 135168, max_op: 132 }, + { max_size: 524288 }, + ], + baker: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + level_info: { + level: 516500, + level_position: 516499, + cycle: 127, + cycle_position: 403, + expected_commitment: false, + }, + voting_period_info: { + voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, + position: 4498, + remaining: 15981, + }, + nonce_hash: null, + consumed_gas: '0', + deactivated: [], + balance_updates: [ + { + kind: 'contract', + contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + change: '-640000000', + origin: 'block', + }, + { + kind: 'freezer', + category: 'deposits', + delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + cycle: 127, + change: '640000000', + origin: 'block', + }, + { + kind: 'freezer', + category: 'rewards', + delegate: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + cycle: 127, + change: '16484375', + origin: 'block', + }, + ], + liquidity_baking_escape_ema: 243180, + implicit_operations_results: [ + { + kind: 'transaction', + storage: [Array], + balance_updates: [Array], + consumed_gas: '2118', + consumed_milligas: '2117300', + storage_size: '4636', + }, + ], +}; +export const attestationRights = [ + { + level: 151187, + delegates: [ { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onfyPPCxtU937rMKNtkXV978ckQSnTqgM9VMEsB18ha9QXHZbyw', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 28, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1funU3PjPsuXvmtXMgnAckY1s4pNT6V7WJ', - endorsement_power: 152, - }, - }, - ], - signature: - 'sigfiyUP39iz8GGq6opn5eMiUqGCJ1vRWF8r92ByyeL7zhGe7b21WEKREYNmAPfhcWFWHm9rFRB5uav4LMFd2V6NCwkQtsaF', + delegate: 'tz3Q1fwk1vh3zm5LqyUV9e2wZBdaEXcovh2r', + first_slot: 79, + attestation_power: 326, + consensus_key: 'tz3Q1fwk1vh3zm5LqyUV9e2wZBdaEXcovh2r', }, + ], + }, +]; +export const ballotList = []; +export const ballots = { yay: 0, nay: 0, pass: 0 }; +export const currentPeriodKind = { + voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, + position: 4498, + remaining: 15981, +}; +export const currentProposal = null; +export const currentQuorum = 5500; +export const votesListing = [{ pkh: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', rolls: 399 }]; +export const proposals = []; +export const entryPoints = { + entrypoints: { main: { prim: 'pair', args: [] }, default: { prim: 'unit' } }, +}; +export const chainId = 'NetXz969SFaFn8k'; +export const packData = { + gas: 'unaccounted', + packed: '050a000000160000b24ac1e1759565d5c9b69af8450ce7ea3d1ee64c', +}; +export const currentPeriod = { + voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, + position: 4498, + remaining: 15981, +}; +export const successorPeriod = { + voting_period: { index: 25, kind: 'proposal', start_position: 512001 }, + position: 4539, + remaining: 15940, +}; + +export const protocols = { + protocol: 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx', + next_protocol: 'PtHangz2aRngywmSRGGvrcTyMbbdpWdpFKuS4uMWxg2RaH9i1qx', +}; + +export const delegatesIthacanetResponse = { + full_balance: '1198951292321', + current_frozen_deposits: '120167343864', + frozen_deposits: '120167343864', + staking_balance: '1203308804406', + delegated_contracts: ['tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'], + delegated_balance: '4357512085', + deactivated: false, + grace_period: 37, + voting_power: 199, +}; + +export const delegatesKathmandunetResponse = { + full_balance: '965532868030', + current_frozen_deposits: '96350095609', + frozen_deposits: '96350095609', + staking_balance: '970221941952', + delegated_contracts: ['tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'], + delegated_balance: '4689073922', + deactivated: false, + grace_period: 42, + voting_power: '968128693450', + remaining_proposals: 20, +}; + +export const votingInfoKathmandunetResponse = { + voting_power: '1054404383333', + remaining_proposals: 20, +}; + +export const blockIthacanetResponse = { + protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', + chain_id: 'NetXnHfVqm9iesp', + hash: 'BMGdK16iMkm4YmgAneYuvd7B4R5S8nYQKFfKzXCKMHP1FqS5hXQ', + header: { + level: 135596, + proto: 2, + predecessor: 'BLgx6Cr7DYwXEexuz828mBUqCKotCXo8PRAN55A9wovUrYWvao8', + timestamp: '2022-02-24T01:09:20Z', + validation_pass: 4, + operations_hash: 'LLoaKP1SEeTE1ziKFRHipDYihitAoTHhEZbiartSvehqMPvu7v661', + fitness: ['02', '000211ac', '', 'ffffffff', '00000000'], + context: 'CoVkVfBsmMSCeTLcBesUe4TdhDhvZxhm8SN48Rky5B3aD8U92hY9', + payload_hash: 'vh28CE8X2KKMvt5S4aGzPdMq5FpcfVRSoeyU3D3TUdVyk9zucR31', + payload_round: 0, + proof_of_work_nonce: '409a3f3f250d0100', + liquidity_baking_escape_vote: false, + signature: + 'sigtWPWubCNXDfaH7NZQcei2hzBbHKQtw56z2WRvrmyPNBLRYP2cNAycFob1Dr8MBbbCGtCUny2BaEbzBa4kVEadMNrGp6Mk', + }, + metadata: { + protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', + next_protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', + test_chain_status: { + status: 'not_running', + }, + max_operations_ttl: 120, + max_operation_data_length: 32768, + max_block_header_length: 289, + max_operation_list_length: [ { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooosvu7cCgZZG9E8SYgrNBFBJcVtTnrhhuoEuckNGzsEi5ug8uk', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 29, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc', - endorsement_power: 158, - }, - }, - ], - signature: - 'sigqFLE4Q2uZ6yMo8QWjrsbzVKV4bWNWbppP5ZhLDsvL83HbzJQG2ABHbCALrqXNrZR1znRcvAaB7JYEHDScw9tqWVN2VpKt', + max_size: 4194304, + max_op: 2048, }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooT5Fy1ZkamhGPBKSE6uFhQicoaZJNBC4AsoWo9F9v7W6AVRvpv', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 33, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1cXeGHP8Urj2pQRwpAkCdPGbCdqFUPsQwU', - endorsement_power: 163, - }, - }, - ], - signature: - 'sigvGuQyTgdreAChYGAjUYR76pQSKKTq7ed4vFuzSGe6sZyiSa1uXS8wRDqH5nXTugTKs6S7sSDps4UsT6SRuTXQFN5iDekk', + max_size: 32768, }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onway6W9qLwef1ejbEFPtKiU6wzjubKfj6YorREHtiaZhNQuRuD', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 35, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1ituzNz9MGaMSL9dVDN7jE5SArCEWNmZbS', - endorsement_power: 161, - }, - }, - ], - signature: - 'sigN9vEVaZerpXewKGoDUhXqDoyw69jawRuewDAf55z839E4JSaW3KDGX3AZHN5vRxPxiQLTUmvnUCTxK73fQL63aJ8CMiLF', + max_size: 135168, + max_op: 132, }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'op2tvcwvEN8vDoBQdHinKCpJpq5xr8uhXjESfNpQg4dUYKXv3RC', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 43, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1hm7NuCGNSKZQLQSawjUnehJcX8yCBcCAq', - endorsement_power: 162, - }, - }, - ], - signature: - 'sigmCvUw4dFVcru7Vpa4yiQKh8M5zX4EPXNwg5VTggXDiQmxTeZdwsKggZJwh3CDyiBWvLL7gnnbCK644Kwy59xXpZvQi19h', + max_size: 524288, }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onr9HZHYKAgRxrZKgvQWraBGaGAoWGqtEaT8bArT9JzfxisgWTw', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 44, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1Q7YBzLJkw87c2FdwaWuGKyacSDc4QghzQ', - endorsement_power: 137, - }, - }, - ], - signature: - 'sigwKZiwNPK4mw5eEBBGh8TNNGuhuQ2snncTLWuQhMxs9GFxMFRD8GrkLUwsPQV84Qcr6pwbFFPFQx5U6TUBT7ZXU9jovyLY', + ], + proposer: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + baker: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + level_info: { + level: 135596, + level_position: 135595, + cycle: 33, + cycle_position: 427, + expected_commitment: false, + }, + voting_period_info: { + voting_period: { + index: 6, + kind: 'proposal', + start_position: 122880, }, + position: 12715, + remaining: 7764, + }, + nonce_hash: null, + consumed_gas: '1000000', + deactivated: [], + balance_updates: [ { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opUPRQxsDU1XsppujmWr66YwQLD135vApq6EbVz7mtY58EKCSGq', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 46, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1NFs6yP2sXd5vAAbR43bbDRpV2nahDZope', - endorsement_power: 117, - }, - }, - ], - signature: - 'siggYsKR7C7hMFfUXNv4KvUx9t2djbZxVHeSJQvd5Zcmz8tg5bCZLmXV8rwAeB5bFahuVn5z6iAp8SMXT35peAPc37256pEE', + kind: 'accumulator', + category: 'block fees', + change: '-1500', + origin: 'block', }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooM4BoirczR6W8hXEVsYQ8cHerbHbE9in4z5wMS2AhxvP2Ufad4', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 47, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1KkJtLB9pMdLKNpVRNZw9zmysrxKmYcRGU', - endorsement_power: 158, - }, - }, - ], - signature: - 'sigpDri9hyWVNm6VrnS8Kr4yY3bdNXEWwXPmUEMbvJSM6nLEgzHczAN9QQ73WiHv6xJdjdhgUjitkHkyU8tsmEHSpJMGLrTt', + kind: 'minted', + category: 'baking rewards', + change: '-5000000', + origin: 'block', }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooLKxLjcVBoeB2GJ2QNg6afi4HwUQ2upCfaxWsjT4k1nrtxmL8h', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 48, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1V9CRVyKP3roXsnjcFJP3p9DSXX63KL7iP', - endorsement_power: 166, - }, - }, - ], - signature: - 'sigVjebUbAjkjvw1wyvQ73FyEn9GJfnytuqN9Xd3ghEzaFyacaWEiD7c1ANv67XYDgrquV3GsHF29booHXinSjGjP4cAgcRU', + kind: 'contract', + contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + change: '5001500', + origin: 'block', }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'oo36GYoDhvBuhb4wqFRRZ2ugLJNkKfHGmcaHhjLCg9SgdiQPJSY', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 54, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1Zt8QQ9aBznYNk5LUBjtME9DuExomw9YRs', - endorsement_power: 153, - }, - }, - ], - signature: - 'sigV2Cfek4NvEY5CvN91nJLfAG2xG7r8hAt3nZQFPNYu5Qtz3TEQbYLxfwbs8UozKvv8bwAzVk35L9VKgcMUkaEZ3NHsYYg1', + kind: 'minted', + category: 'baking bonuses', + change: '-4217424', + origin: 'block', }, { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'oopWQdrwuxWCBkw7qaVesBLCsGExxuhRuU7FJqQuA9pQcr7nPzw', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ - { - kind: 'endorsement', - slot: 59, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1e841Z7k7XHSoTSyHyBHG2Gijv7DzzjEBb', - endorsement_power: 170, - }, - }, - ], - signature: - 'signyax1oDM1SxWoQir1aMRNXnm1zDnSvLyZnGdPZzh8kqYiK7GqiNb9tP3DUxcLnZeYtiQbWNuBCf6eZzXnXtc7mUhYXAHV', + kind: 'contract', + contract: 'tz1aWXP237BLwNHJcCD4b3DutCevhqq2T1Z9', + change: '4217424', + origin: 'block', }, + ], + liquidity_baking_escape_ema: 119624, + implicit_operations_results: [ { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'oo4t2WvJgwZhAsf5CwcDtKCfSkiaKp9wTNYL7LuAbJ9k3sJvTEg', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ + kind: 'transaction', + storage: [ { - kind: 'endorsement', - slot: 61, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1e42w8ZaGAbM3gucbBy8iRypdbnqUj7oWY', - endorsement_power: 74, - }, + int: '1', }, - ], - signature: - 'signNkorAErY1hBzFRkzeMTqUy6inFFTd9EmpYPKfFyUGX139DyHtsfUHfumPFHeomLtXZMmGQ5g2vi4R1tveaS9yQvz7aba', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opUy2TmnHxDqjUt3Ht7dCsWyLLNz9sRpA1eC5qZqkhyvHND67pu', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ { - kind: 'endorsement', - slot: 64, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1QXAAasy8TciwfvDC4a7MWo1tm3K37uN9Y', - endorsement_power: 153, - }, + int: '338987500100', }, - ], - signature: - 'sigtoch1ijiGuNGW3qHtAngiEDhEqL5T4acdNEGKt4ew2NoPNkxScgshoxttV45NYxKpLNw6J3FQHPRyaT22fGgwbd9ySu3k', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ooArbFfPVgM6mc3RUroxf2qsimXProumPK6XuidgfjosoT2VN34', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ { - kind: 'endorsement', - slot: 70, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1MvCE9dczhoij2bd4sLL2AfVuMtWfFAoCN', - endorsement_power: 137, - }, + int: '100', }, - ], - signature: - 'sigb2eh47AatunkNSZPVpsZg9nqGqu8GG2C24Hx4D6SoRJ1sz4jgFPjAhP1rk9BkRJ8GfM3AYyY7PGdFqzod3a6q1Wk4ZRVK', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'ood93Z7NmwMeLSo2dW8tBUBst3p3ogcEmkUrDR9T8coHrVApZzF', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ { - kind: 'endorsement', - slot: 71, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1PirbogVqfmBT9XCuYJ1KnDx4bnMSYfGru', - endorsement_power: 119, - }, + bytes: '01e927f00ef734dfc85919635e9afc9166c83ef9fc00', }, - ], - signature: - 'sigiSzxJ1dSeHujvRtv1VKCAc5V1mu5ftRfyutfgKyjjCLGRrNG73k8jb5nqjiTu9T79L4oKdf1g7AEQMCK6eENWPcaMwfFN', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'onjvGqyScQLdGb5cMPwHbnd9UVmh3MhcUze3P1wGHSXRarfxAwY', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ { - kind: 'endorsement', - slot: 75, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1edUYGqBtteStneTGDBrQWTFmq9cnEELiW', - endorsement_power: 135, - }, + bytes: '0115eb0104481a6d7921160bc982c5e0a561cd8a3a00', }, ], - signature: - 'siggwc4K8yWEU8ttzA8HhQh15zV2fYcyK6nfbuVGVs3G2TbM1nVrJxLiC6sHKqBtBuofiC8pYzDLJxVY9zdCzGqBhyMPCw4M', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opBqy3cLQugeT2xVvKoJUn3yLp79hzuXHc7r5BqSa5HHHFddYgB', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ + balance_updates: [ { - kind: 'endorsement', - slot: 85, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD', - endorsement_power: 139, - }, + kind: 'minted', + category: 'subsidy', + change: '-2500000', + origin: 'subsidy', }, - ], - signature: - 'sigoZ5bh1XPA8kHFkBCs4U9Dq6nT9Ng3i9LENKKCHg8k96TP4KVcFmh1iyVTpxSSiM8V21bnZ7W91KsDL2vekru1ACXsU8Yp', - }, - { - protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', - chain_id: 'NetXnHfVqm9iesp', - hash: 'opCRv7Ewfh3s96PDiVKPC2c4A9oT6nf8FVeQYB2EUEJFT81UTET', - branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', - contents: [ { - kind: 'endorsement', - slot: 90, - level: 135595, - round: 0, - block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', - metadata: { - balance_updates: [], - delegate: 'tz1SFbdg2jjkixHNU1Jm9f8JA4pYnMXsgATC', - endorsement_power: 5, - }, + kind: 'contract', + contract: 'KT1TxqZ8QtKvLu3V3JH7Gx58n7Co8pgtpQU5', + change: '2500000', + origin: 'subsidy', }, ], - signature: - 'sigcmrbc6rZnDpEkR268Pvzz2GPSRi8nWnTthYXt8L6Tg9pB4vzdh4uy8gKYrMQFbJTwRSsyPa31xR5u8FMH9xMAfrWn9r48', + consumed_gas: '225', + consumed_milligas: '224023', + storage_size: '4632', }, + ], + }, + operations: [ + [ { protocol: 'Psithaca2MLRFYargivpo7YvUr7wUDqyxrdhC5CQq78mRvimz6A', chain_id: 'NetXnHfVqm9iesp', - hash: 'op9TeE362FGyayWVRghVrRxm2FdezqPdqJRM4VTeq5C6ievFDkd', + hash: 'ooqwt58nxiSHAsmwaBDux3LoEkNE9p14v1TXtnB4CfEaobgHuZ2', branch: 'BLzJ1MtqtmWwnG6ZdX7LPygJGvaE51eDqX55KVQM4HNHcVbeDKs', contents: [ { kind: 'endorsement', - slot: 116, + slot: 0, level: 135595, round: 0, block_payload_hash: 'vh2SkkaBZp19oyMUmTTXy5Q33hKKWZSAzXa7Tz2F6mtyeAgXsHC6', metadata: { balance_updates: [], - delegate: 'tz1RBECWBXv4tKcuDbxYmBguvdn8wzjrejHg', - endorsement_power: 143, + delegate: 'tz1iZ9LkpAhN8X1L6RpBtfy3wxpEWzFrXz8j', + endorsement_power: 206, }, }, ], signature: - 'sigQ5nhdCPRiddmNUYLXCeBk5qs3T6fxMiitKgFJQg5Nuo8sqJTamyJctbF5Gt7MrDZEdiCcmZBj4dEHa9fjDLyCSdgHsL3x', + 'sigT3AuNgusteshSqt2J5aha7iSsYAXsYVGAr62RNZkrd1Gp6JjY59CtD33a4zyv57ZwV7J5JvWRD7uZrwaE6NSzmP61SGkb', }, ], [], @@ -4348,45 +1692,36 @@ export const ticketBalancesResponse = [ export const aiLaunchCycle = 6; export const pendingOperationsResponse = { - applied: [ + validated: [ { - hash: 'onjTGvtnaudo1o5sfTe51XEumhsENAhM7oMzhvsSXzZFXNcj1LE', - branch: 'BLvb5tzmepwJkxhRYCnnQeYXqRWhUvdmx4NbpVK9w4nkM6tdXEr', + hash: 'onwh9Z2SHQVDFq2FeuAfoQKC8PzCDkJbDr11ZJTZPCK6C51Gv8U', + branch: 'BLpiU9xW7CdwkodmSdpvEyi2yJ3ZehW5S7ke6sdf6Rd8zEknwdk', contents: [ { - kind: 'preendorsement', - slot: 14, - level: 128135, + kind: 'preattestation', + slot: 1, + level: 176131, round: 0, - block_payload_hash: 'vh3Tk5KEy88s4scEbJM1n6vzYdYSn3PNmsH5uSP4zoLccNVyXAZd', + block_payload_hash: 'vh1uUGEefGiif4iMAGaCiKNLccKArF8SoCsBiCPM788to6Z6DeXH', }, ], signature: - 'sigNWXUeYUraaGi1GrxjrqKTfk7KF8xRG4pABA1qeZi8bQWRmcSmDWD6BehCNC1qNDMgQkf3JdEFHKuomToBza2iGucg9SuC', + 'sigQ5EvfC4NNFVVZKoXoVgmK7oko4CUywnrqpRTroDqY8tzNcUib1bqvUA2fWdTb6qaW5k6s9AaEWoJ6553C4MF3FxcwPbxh', }, ], refused: [ { - hash: 'ongFJ3rNnTwratXX2mTHN8MLww2rG11BeJwiPGxr2z2KdESZKKG', - protocol: 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', - branch: 'BLf8hVJk9kK539kTKQ9PHFjtet3nJuAKYGqCqvFuHTZQWavrP7u', + hash: 'onyUMdZgVkjXoHCo4w7aA9mmRmuSDrdfgXTEVhm1774w64zVhVx', + protocol: 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT', + branch: 'BMXLrvc4bTFKRNohYgQ9Y1Xj4ztborPMczRQPMPiFsFF2TZkx4j', contents: [ - { - kind: 'reveal', - source: 'tz2GeK37F1ThiGwamtxUykBuWqamWc7UcmHN', - fee: '374', - counter: '54971', - gas_limit: '1100', - storage_limit: '0', - public_key: 'sppk7c9pb7WyLmaw2JwHyH2PYeXcmALCnGwHzVCTfzx33XMV8bW3aT7', - }, { kind: 'origination', - source: 'tz2GeK37F1ThiGwamtxUykBuWqamWc7UcmHN', - fee: '544', - counter: '54972', + source: 'tz2RqxsYQyFuP9amsmrr25x9bUcBMWXGvjuD', + fee: '379', + counter: '1817', gas_limit: '600000', - storage_limit: '319', + storage_limit: '339', balance: '0', script: { code: [ @@ -4397,7 +1732,10 @@ export const pendingOperationsResponse = { args: [ [ { prim: 'CAR' }, - { prim: 'PUSH', args: [{ prim: 'string' }, { string: 'Hello ' }] }, + { + prim: 'PUSH', + args: [{ prim: 'string' }, { string: 'Hello ' }], + }, { prim: 'CONCAT' }, { prim: 'NIL', args: [{ prim: 'operation' }] }, { prim: 'PAIR' }, @@ -4410,37 +1748,32 @@ export const pendingOperationsResponse = { }, ], signature: - 'sigaD9KjwZXtfhUEpxGirsvNWyScLKQVFQM9kkFB4sTgixfwnJD2D9wt2Km1CM5o2ExGGRTZGLxAr1dZDESurwJusiuHKQvZ', - error: [ - { - kind: 'permanent', - id: 'proto.016-PtMumbai.prefilter.fees_too_low', - }, - ], + 'sigVW5CsvXPizGNvQR3P1A7jcZEB5jBFhkFvhTAbdY3DDzVdxgztG9JMDpV9kQYMx3CpUT1pNbZymwTLoNd6LCwHKhytgmJG', + error: [{ kind: 'permanent', id: 'proto.beta.prefilter.fees_too_low' }], }, ], outdated: [ { - hash: 'oneJE697j4ZNCnhoEsbyPyj4Y5MmyQh4xX6FU3HEGzKnaJkdL5B', - protocol: 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', - branch: 'BLf4UgJixDsXcRnirtBzfst8uzzkcpbBjXQuMmzwwJwD75gh3GU', + hash: 'oneF43sGDQHXMfXqJYnn8cf7nNwqWmxpG4SUVpomwLB6LXFU77a', + protocol: 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT', + branch: 'BMSMobj7qdiDmE53TCVuPGLKHFYdHJYaYVoKrADxEV6P4q6DaHb', contents: [ { - kind: 'preendorsement', - slot: 15, - level: 128095, + kind: 'preattestation', + slot: 3, + level: 176013, round: 0, - block_payload_hash: 'vh3Xu8Y1EQDMGFYaLXiau3sLukEWGjs3zHW7jynH1m7RaLTqXJpw', + block_payload_hash: 'vh25hajrfSyZwJCu4YCNzxikdJiJQuH5wDu61XXjmsfFsrjnrrcN', }, ], signature: - 'sigsVPdVAmQZrCeucDX5QNjz3H4jNWGfVEZRhjXBGg8ZSxWRK2cGdgUCdyDF47DctaJXqAbMwMHB24En9qWj4mEaTwWMC4SN', + 'sigrrifWiv9pAuidW3tKv1syrb9fuwQCWj52PJ2LmmnsV1DXZd2fZmrEf5UoSxLpchsW5yG3fbfL1zCiPoD6719HpAMNZfDz', error: [ { - kind: 'Preendorsement', - id: 'proto.016-PtMumbai.validate.consensus_operation_for_old_level', - expected: 128096, - provided: 128095, + kind: 'Preattestation', + id: 'proto.beta.validate.consensus_operation_for_old_level', + expected: 176015, + provided: 176013, }, ], }, diff --git a/packages/taquito-rpc/test/rpc-cache.spec.ts b/packages/taquito-rpc/test/rpc-cache.spec.ts index d06ffc1d89..d5c335a57b 100644 --- a/packages/taquito-rpc/test/rpc-cache.spec.ts +++ b/packages/taquito-rpc/test/rpc-cache.spec.ts @@ -22,7 +22,7 @@ import { currentProposal, currentQuorum, votesListing, - porposals, + proposals, entryPoints, chainId, packData, @@ -58,6 +58,9 @@ describe('RpcClientCache test', () => { getBlockHash: jest.fn(), getLiveBlocks: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), + getBalanceAndFrozenBonds: jest.fn(), + getSpendableAndFrozenBonds: jest.fn(), getFullBalance: jest.fn(), getStakedBalance: jest.fn(), getUnstakedFinalizableBalance: jest.fn(), @@ -104,6 +107,9 @@ describe('RpcClientCache test', () => { mockRpcClient.getBlockHash.mockReturnValue(blockHash); mockRpcClient.getLiveBlocks.mockReturnValue(liveBlocks); mockRpcClient.getBalance.mockReturnValue(balance); + mockRpcClient.getSpendable.mockReturnValue(balance); + mockRpcClient.getBalanceAndFrozenBonds.mockReturnValue(balance); + mockRpcClient.getSpendableAndFrozenBonds.mockReturnValue(balance); mockRpcClient.getFullBalance.mockReturnValue(balance); mockRpcClient.getStakedBalance.mockReturnValue(balance); mockRpcClient.getUnstakedFinalizableBalance.mockReturnValue(balance); @@ -131,7 +137,7 @@ describe('RpcClientCache test', () => { mockRpcClient.getCurrentProposal.mockReturnValue(currentProposal); mockRpcClient.getCurrentQuorum.mockReturnValue(currentQuorum); mockRpcClient.getVotesListings.mockReturnValue(votesListing); - mockRpcClient.getProposals.mockReturnValue(porposals); + mockRpcClient.getProposals.mockReturnValue(proposals); mockRpcClient.getEntrypoints.mockReturnValue(entryPoints); mockRpcClient.getChainId.mockReturnValue(chainId); mockRpcClient.packData.mockReturnValue(packData); @@ -155,6 +161,9 @@ describe('RpcClientCache test', () => { await rpcCache.getBlock(); await rpcCache.getLiveBlocks(); await rpcCache.getBalance(address); + await rpcCache.getSpendable(address); + await rpcCache.getBalanceAndFrozenBonds(address); + await rpcCache.getSpendableAndFrozenBonds(address); await rpcCache.getFullBalance(address); await rpcCache.getStakedBalance(address); await rpcCache.getUnstakedFinalizableBalance(address); @@ -207,7 +216,10 @@ describe('RpcClientCache test', () => { expect(rpcCache.getAllCachedData()[`rpcTest/getBalance/head/${address}/`].response).toEqual( balance ); - expect(rpcCache.getAllCachedData()[`rpcTest/getFullBalance/head/${address}/`].response).toEqual( + expect(rpcCache.getAllCachedData()[`rpcTest/getBalance/head/${address}/`].response).toEqual( + balance + ); + expect(rpcCache.getAllCachedData()[`rpcTest/getSpendable/head/${address}/`].response).toEqual( balance ); expect( @@ -323,6 +335,9 @@ describe('RpcClientCache test', () => { await rpcCache.getBlock(block); await rpcCache.getLiveBlocks(block); await rpcCache.getBalance(address, block); + await rpcCache.getSpendable(address, block); + await rpcCache.getBalanceAndFrozenBonds(address, block); + await rpcCache.getSpendableAndFrozenBonds(address, block); await rpcCache.getFullBalance(address, block); await rpcCache.getStakedBalance(address, block); await rpcCache.getUnstakedFinalizableBalance(address, block); @@ -388,6 +403,17 @@ describe('RpcClientCache test', () => { expect( rpcCache.getAllCachedData()[`rpcTest/getBalance/${block.block}/${address}/`].response ).toEqual(balance); + expect( + rpcCache.getAllCachedData()[`rpcTest/getSpendable/${block.block}/${address}/`].response + ).toEqual(balance); + expect( + rpcCache.getAllCachedData()[`rpcTest/getBalanceAndFrozenBonds/${block.block}/${address}/`] + .response + ).toEqual(balance); + expect( + rpcCache.getAllCachedData()[`rpcTest/getSpendableAndFrozenBonds/${block.block}/${address}/`] + .response + ).toEqual(balance); expect( rpcCache.getAllCachedData()[`rpcTest/getFullBalance/${block.block}/${address}/`].response ).toEqual(balance); @@ -517,6 +543,9 @@ describe('RpcClientCache test', () => { await rpcCache.getBlock(); await rpcCache.getLiveBlocks(); await rpcCache.getBalance(address); + await rpcCache.getSpendable(address); + await rpcCache.getBalanceAndFrozenBonds(address); + await rpcCache.getSpendableAndFrozenBonds(address); await rpcCache.getFullBalance(address); await rpcCache.getStakedBalance(address); await rpcCache.getUnstakedFinalizableBalance(address); diff --git a/packages/taquito-rpc/test/taquito-rpc.spec.ts b/packages/taquito-rpc/test/taquito-rpc.spec.ts index 1bcea5d25f..c0f85bbf79 100644 --- a/packages/taquito-rpc/test/taquito-rpc.spec.ts +++ b/packages/taquito-rpc/test/taquito-rpc.spec.ts @@ -4,7 +4,6 @@ import { OpKind, RpcClient } from '../src/taquito-rpc'; import BigNumber from 'bignumber.js'; import { LazyStorageDiffBigMap, - OperationContentsAndResultEndorsement, OperationContentsAndResultAttestationWithDal, OperationContentsAndResultOrigination, OperationResultTransaction, @@ -38,6 +37,8 @@ import { SmartRollupRefutationOptions, RPCSimulateOperationParam, OperationContentsAndResultDalPublishCommitment, + OperationContentsAndResultAttestation, + OperationContentsAndResultEndorsement, } from '../src/types'; import { blockIthacanetResponse, @@ -131,6 +132,48 @@ describe('RpcClient test', () => { }); }); + describe('getSpendable', () => { + it('should query the right url and return a string', async () => { + httpBackend.createRequest.mockReturnValue(Promise.resolve('10000')); + const balance = await client.getSpendable(contractAddress); + + expect(httpBackend.createRequest.mock.calls[0][0]).toEqual({ + method: 'GET', + url: `root/chains/test/blocks/head/context/contracts/${contractAddress}/spendable`, + }); + expect(balance).toBeInstanceOf(BigNumber); + expect(balance.toString()).toEqual('10000'); + }); + }); + + describe('getBalanceAndFrozenBonds', () => { + it('should query the right url and return a string', async () => { + httpBackend.createRequest.mockReturnValue(Promise.resolve('10000')); + const balance = await client.getBalanceAndFrozenBonds(contractAddress); + + expect(httpBackend.createRequest.mock.calls[0][0]).toEqual({ + method: 'GET', + url: `root/chains/test/blocks/head/context/contracts/${contractAddress}/balance_and_frozen_bonds`, + }); + expect(balance).toBeInstanceOf(BigNumber); + expect(balance.toString()).toEqual('10000'); + }); + }); + + describe('getSpendableAndFrozenBonds', () => { + it('should query the right url and return a string', async () => { + httpBackend.createRequest.mockReturnValue(Promise.resolve('10000')); + const balance = await client.getSpendableAndFrozenBonds(contractAddress); + + expect(httpBackend.createRequest.mock.calls[0][0]).toEqual({ + method: 'GET', + url: `root/chains/test/blocks/head/context/contracts/${contractAddress}/spendable_and_frozen_bonds`, + }); + expect(balance).toBeInstanceOf(BigNumber); + expect(balance.toString()).toEqual('10000'); + }); + }); + describe('getFullBalance', () => { it('should query the right url and return a string', async () => { httpBackend.createRequest.mockReturnValue(Promise.resolve('10000')); @@ -1555,9 +1598,9 @@ describe('RpcClient test', () => { method: 'GET', url: 'root/chains/test/blocks/head', }); - const endorsement = response.operations[0][0] - .contents[0] as OperationContentsAndResultEndorsement; - expect(endorsement.metadata.balance_updates![0].kind).toEqual('contract'); + const attestation = response.operations[0][0] + .contents[0] as OperationContentsAndResultAttestation; + expect(attestation.metadata.balance_updates![0].kind).toEqual('contract'); }); }); @@ -3154,11 +3197,11 @@ describe('RpcClient test', () => { method: 'GET', url: 'root/chains/test/blocks/head', }); - const endorsementWithSlot = response.operations[0][0] + const AttestationWithDal = response.operations[0][0] .contents[0] as OperationContentsAndResultAttestationWithDal; - expect(endorsementWithSlot.kind).toEqual('attestation_with_dal'); - expect(endorsementWithSlot.slot).toEqual(19); - expect(endorsementWithSlot.dal_attestation).toEqual('0'); + expect(AttestationWithDal.kind).toEqual('attestation_with_dal'); + expect(AttestationWithDal.slot).toEqual(19); + expect(AttestationWithDal.dal_attestation).toEqual('0'); }); it('should query the right url and property for operation, proto 20, dal_publish_commitment', async () => { @@ -3250,14 +3293,14 @@ describe('RpcClient test', () => { method: 'GET', url: 'root/chains/test/blocks/head', }); - const endorsementWithSlot = response.operations[0][0] + const dalPublishCommitment = response.operations[0][0] .contents[0] as OperationContentsAndResultDalPublishCommitment; - expect(endorsementWithSlot.kind).toEqual('dal_publish_commitment'); - expect(endorsementWithSlot.slot_header.slot_index).toEqual(0); - expect(endorsementWithSlot.slot_header.commitment).toEqual( + expect(dalPublishCommitment.kind).toEqual('dal_publish_commitment'); + expect(dalPublishCommitment.slot_header.slot_index).toEqual(0); + expect(dalPublishCommitment.slot_header.commitment).toEqual( 'sh1vHbHrPSt7eWqYJmM9EUk5scjbvR5PKBckJxmmDJzYHHBkca8Lz4hxXX6zpW5wbhJhswJd4v' ); - expect(endorsementWithSlot.slot_header.commitment_proof).toEqual( + expect(dalPublishCommitment.slot_header.commitment_proof).toEqual( '90c6576ad09e11b14eb464cdd214fe061ba8e8e5a3175e29fe7ff40526f90c2f2f4e02fe9fe03f7adb0fe286d7828b970eb1979f0f65ca3637a51d5456b442377d20397eb1b02544c2e435d79e156881443179fe16b32ad9e9501622a647c2ce' ); }); diff --git a/packages/taquito-sapling/package.json b/packages/taquito-sapling/package.json index 020e325197..956526646e 100644 --- a/packages/taquito-sapling/package.json +++ b/packages/taquito-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/sapling", - "version": "20.1.2", + "version": "21.0.0", "description": "Allows reading and preparing sapling transactions", "keywords": [ "tezos", @@ -68,10 +68,10 @@ "@airgap/sapling-wasm": "0.0.9", "@stablelib/nacl": "^1.0.4", "@stablelib/random": "^1.0.2", - "@taquito/core": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "bip39": "3.1.0", "blakejs": "^1.2.1", diff --git a/packages/taquito-sapling/src/version.ts b/packages/taquito-sapling/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-sapling/src/version.ts +++ b/packages/taquito-sapling/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-signer/package.json b/packages/taquito-signer/package.json index 3a876af928..96d8c49e26 100644 --- a/packages/taquito-signer/package.json +++ b/packages/taquito-signer/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/signer", - "version": "20.1.2", + "version": "21.0.0", "description": "Provide signing functionality to be with taquito", "keywords": [ "tezos", @@ -72,9 +72,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", diff --git a/packages/taquito-signer/src/version.ts b/packages/taquito-signer/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-signer/src/version.ts +++ b/packages/taquito-signer/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-timelock/package.json b/packages/taquito-timelock/package.json index bfa5aa8537..ceeb34e476 100644 --- a/packages/taquito-timelock/package.json +++ b/packages/taquito-timelock/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/timelock", - "version": "20.1.2", + "version": "21.0.0", "description": "TypeScript implementation of the Timelock feature in Tezos", "main": "./dist/taquito-timelock.umd.js", "module": "./dist/taquito-timelock.es6.js", @@ -68,9 +68,9 @@ "big-integer": "^1.6.52" }, "devDependencies": { - "@taquito/signer": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/signer": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "@types/node": "^18", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", diff --git a/packages/taquito-timelock/src/version.ts b/packages/taquito-timelock/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-timelock/src/version.ts +++ b/packages/taquito-timelock/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-tzip12/package.json b/packages/taquito-tzip12/package.json index 365ddeacdc..e724bfaeaf 100644 --- a/packages/taquito-tzip12/package.json +++ b/packages/taquito-tzip12/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip12", - "version": "20.1.2", + "version": "21.0.0", "description": "Tzip12", "keywords": [ "tezos", @@ -62,10 +62,10 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/tzip16": "^20.1.2" + "@taquito/core": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip16": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", diff --git a/packages/taquito-tzip12/src/version.ts b/packages/taquito-tzip12/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-tzip12/src/version.ts +++ b/packages/taquito-tzip12/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-tzip16/package.json b/packages/taquito-tzip16/package.json index b365cd3ed6..839890441c 100644 --- a/packages/taquito-tzip16/package.json +++ b/packages/taquito-tzip16/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/tzip16", - "version": "20.1.2", + "version": "21.0.0", "description": "Tzip16", "keywords": [ "tezos", @@ -61,12 +61,12 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/taquito": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, diff --git a/packages/taquito-tzip16/src/version.ts b/packages/taquito-tzip16/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-tzip16/src/version.ts +++ b/packages/taquito-tzip16/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-utils/package.json b/packages/taquito-utils/package.json index 06f0dc9b85..12704671ba 100644 --- a/packages/taquito-utils/package.json +++ b/packages/taquito-utils/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/utils", - "version": "20.1.2", + "version": "21.0.0", "description": "converts michelson data and types into convenient JS/TS objects", "keywords": [ "tezos", @@ -64,7 +64,7 @@ "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.2", + "@taquito/core": "^21.0.0", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", diff --git a/packages/taquito-utils/src/verify-signature.ts b/packages/taquito-utils/src/verify-signature.ts index 3b8560aafb..0397901da3 100644 --- a/packages/taquito-utils/src/verify-signature.ts +++ b/packages/taquito-utils/src/verify-signature.ts @@ -23,7 +23,7 @@ type SigPrefix = Prefix.EDSIG | Prefix.SPSIG | Prefix.P2SIG | Prefix.SIG; * @description Verify signature of a payload * * @param messageBytes The forged message including the magic byte (11 for block, - * 12 for preattestation/preendorsement, 13 for attestation/endorsement, 3 for generic, 5 for the PACK format of michelson) + * 12 for preattestation, 13 for attestation, 3 for generic, 5 for the PACK format of michelson) * @param publicKey The public key to verify the signature against * @param signature The signature to verify * @returns A boolean indicating if the signature matches diff --git a/packages/taquito-utils/src/version.ts b/packages/taquito-utils/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-utils/src/version.ts +++ b/packages/taquito-utils/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito-wallet-connect/package.json b/packages/taquito-wallet-connect/package.json index ab6bbd2dce..8e1ff1a8ff 100644 --- a/packages/taquito-wallet-connect/package.json +++ b/packages/taquito-wallet-connect/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/wallet-connect", - "version": "20.1.2", + "version": "21.0.0", "description": "Walletconnect provider", "keywords": [ "tezos", @@ -66,7 +66,7 @@ ] }, "dependencies": { - "@taquito/taquito": "^20.1.2", + "@taquito/taquito": "^21.0.0", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", diff --git a/packages/taquito-wallet-connect/src/types.ts b/packages/taquito-wallet-connect/src/types.ts index 29870c47bd..59fc4cffa9 100644 --- a/packages/taquito-wallet-connect/src/types.ts +++ b/packages/taquito-wallet-connect/src/types.ts @@ -22,7 +22,7 @@ export enum NetworkType { WEEKLYNET = 'weeklynet', OXFORDNET = 'oxfordnet', PARISNET = 'parisnet', - // QUEBECNET = 'quebecnet', + QUEBECNET = 'quebecnet', } export interface PermissionScopeParam { diff --git a/packages/taquito-wallet-connect/src/version.ts b/packages/taquito-wallet-connect/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito-wallet-connect/src/version.ts +++ b/packages/taquito-wallet-connect/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito/README.md b/packages/taquito/README.md index 32eb4fc9f0..203db2a7cf 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 4996c88d41..61f80f8ae7 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-OByEkYcHtoJVUV3EZ1uBctPMBYkLdgC8uG4xhJUY1Sw= sha384-oxIIs8n5K4cp3AK5zxtchAvPI3ttFw2jvGd4yArCVsZfcmb+XCAiJYf998aTWr+t sha512-NBdzXRZadNl7EwMvmMHkGZE29o7Djl1RnU6KN5b2+QrIfXpYMOsFzVtfy+Jy6JXELpkT7FT2cR1ztlswycivvg==" + "integrity": "sha256-FswXon4I7gCD3woX89YOPTLiVMhH4dKOlRGTLZkcFqM= sha384-gQR9rZf1SBIMPMGoRBzlAqShG70H2sNowbaSTpJW3w52aTS2IuQe2d/U7irMsRfo sha512-iJ8s2NfNEMlImtlvA+DA0zZQ8FhtxGq7/iFaIhd83UweCDnKnj9dPZ4OoUwcmFsJhCiJ7d66cSGzVXACU/vnig==" } } \ No newline at end of file diff --git a/packages/taquito/package.json b/packages/taquito/package.json index 548a439acc..a009333f03 100644 --- a/packages/taquito/package.json +++ b/packages/taquito/package.json @@ -1,6 +1,6 @@ { "name": "@taquito/taquito", - "version": "20.1.2", + "version": "21.0.0", "description": "High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.", "keywords": [ "tezos", @@ -77,13 +77,13 @@ ] }, "dependencies": { - "@taquito/core": "^20.1.2", - "@taquito/http-utils": "^20.1.2", - "@taquito/local-forging": "^20.1.2", - "@taquito/michel-codec": "^20.1.2", - "@taquito/michelson-encoder": "^20.1.2", - "@taquito/rpc": "^20.1.2", - "@taquito/utils": "^20.1.2", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, diff --git a/packages/taquito/src/constants.ts b/packages/taquito/src/constants.ts index ab25cdc4c2..c7e5aeb1e2 100644 --- a/packages/taquito/src/constants.ts +++ b/packages/taquito/src/constants.ts @@ -70,6 +70,7 @@ export enum Protocols { ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', + PsQuebecn = 'PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -90,7 +91,8 @@ export const protocols = { '017': [Protocols.PtNairobi], '019': [Protocols.ProxfordY], '020': [Protocols.PtParisBx, Protocols.PsParisCZ], - '021': [Protocols.ProtoALpha], + '021': [Protocols.PsQuebecn], + '022': [Protocols.ProtoALpha], }; export enum ChainIds { @@ -112,6 +114,7 @@ export enum ChainIds { OXFORDNET2 = 'NetXxWsskGahzQB', PARISBNET = 'NetXo8SqH1c38SS', PARISCNET = 'NetXXWAHLEvre9b', + PsQuebecn = 'NetXuTeGinLEqxp', } // A fixed fee reveal operation gasLimit accepted by both simulate and injection endpoint is between 1.2-5 times of actual gas consumption (3.5 fails occasionally with gas exhausted; 4 fails occasionally with fee too low) diff --git a/packages/taquito/src/read-provider/interface.ts b/packages/taquito/src/read-provider/interface.ts index 98cbf408c8..cb1d8d7937 100644 --- a/packages/taquito/src/read-provider/interface.ts +++ b/packages/taquito/src/read-provider/interface.ts @@ -22,13 +22,19 @@ export type BlockIdentifier = 'head' | `head~${number}` | `B${string}` | number; export interface TzReadProvider { /** - * @description Access the spendable balance of a contract, excluding frozen bonds. - * @param address address from which we want to retrieve the balance + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC. + * @param address address from which we want to retrieve the spendable balance * @param block from which we want to retrieve the balance * @returns the balance in mutez */ getBalance(address: string, block: BlockIdentifier): Promise; - + /** + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC. + * @param address address from which we want to retrieve the spendable balance + * @param block from which we want to retrieve the balance + * @returns the balance in mutez + */ + getSpendable(address: string, block: BlockIdentifier): Promise; /** * @description Access the delegate of a contract, if any. * @param address contract address from which we want to retrieve the delegate (baker) diff --git a/packages/taquito/src/read-provider/rpc-read-adapter.ts b/packages/taquito/src/read-provider/rpc-read-adapter.ts index 6cf2c999d9..863ab6ba5a 100644 --- a/packages/taquito/src/read-provider/rpc-read-adapter.ts +++ b/packages/taquito/src/read-provider/rpc-read-adapter.ts @@ -17,8 +17,8 @@ export class RpcReadAdapter implements TzReadProvider { constructor(private rpc: RpcClientInterface) {} /** - * @description Access the spendable balance of a contract, excluding frozen bonds. - * @param address address from which we want to retrieve the balance + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC. + * @param address address from which we want to retrieve the spendable balance * @param block from which we want to retrieve the balance * @returns the balance in mutez */ @@ -26,6 +26,16 @@ export class RpcReadAdapter implements TzReadProvider { return this.rpc.getBalance(address, { block: String(block) }); } + /** + * @description The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC. + * @param address address from which we want to retrieve the spendable balance + * @param block from which we want to retrieve the balance + * @returns the balance in mutez + */ + async getSpendable(address: string, block: BlockIdentifier): Promise { + return this.rpc.getSpendable(address, { block: String(block) }); + } + /** * @description Access the delegate of a contract, if any. * @param address contract address from which we want to retrieve the delegate (baker) diff --git a/packages/taquito/src/signer/interface.ts b/packages/taquito/src/signer/interface.ts index 9416c4a7e4..9bdf7ec200 100644 --- a/packages/taquito/src/signer/interface.ts +++ b/packages/taquito/src/signer/interface.ts @@ -5,7 +5,7 @@ export interface Signer { /** * * @param op Operation to sign - * @param magicByte Magic bytes 11 for block, 12 for preattestation/preendorsement, 13 for attestation/endorsements, 3 for generic, 5 for the PACK format of michelson + * @param magicByte Magic bytes 11 for block, 12 for preattestation, 13 for attestation, 3 for generic, 5 for the PACK format of michelson */ sign( op: string, diff --git a/packages/taquito/src/subscribe/filters.ts b/packages/taquito/src/subscribe/filters.ts index b2c95baa60..3ce13eb24b 100644 --- a/packages/taquito/src/subscribe/filters.ts +++ b/packages/taquito/src/subscribe/filters.ts @@ -19,8 +19,6 @@ const sourceFilter = (x: OperationContent, filter: SourceFilter) => { switch (x.kind) { case 'attestation': return 'metadata' in x && x.metadata.delegate === filter.source; - case 'endorsement': - return 'metadata' in x && x.metadata.delegate === filter.source; case 'activate_account': return 'metadata' in x && x.pkh === filter.source; default: diff --git a/packages/taquito/src/subscribe/polling-subcribe-provider.ts b/packages/taquito/src/subscribe/polling-subcribe-provider.ts index 7315791fdc..f8860cf973 100644 --- a/packages/taquito/src/subscribe/polling-subcribe-provider.ts +++ b/packages/taquito/src/subscribe/polling-subcribe-provider.ts @@ -68,7 +68,9 @@ const applyEventFilter = (filter?: EventFilter) => const internalOpResults = tx.metadata.internal_operation_results; if (internalOpResults) { for (const event of internalOpResults) { - if (eventFilter(event, filter?.address, filter?.tag, filter?.excludeFailedOperations)) { + if ( + eventFilter(event, filter?.address, filter?.tag, filter?.excludeFailedOperations) + ) { sub.next({ opHash: op.hash, blockHash: block.hash, @@ -92,7 +94,10 @@ export class PollingSubscribeProvider implements SubscribeProvider { private newBlock$: Observable; - constructor(private context: Context, config: Partial = {}) { + constructor( + private context: Context, + config: Partial = {} + ) { this._config$ = new BehaviorSubject({ ...defaultConfigStreamer, ...config, @@ -131,8 +136,6 @@ export class PollingSubscribeProvider implements SubscribeProvider { const constants = await this.context.readProvider.getProtocolConstants('head'); const blockTime = constants.minimal_block_delay ? constants.minimal_block_delay.multipliedBy(1000) - : constants.time_between_blocks - ? constants.time_between_blocks[0].multipliedBy(1000) : new BigNumber(defaultIntervalTestnetsMainnet); const confirmationPollingInterval = blockTime.dividedBy(3); diff --git a/packages/taquito/src/tz/interface.ts b/packages/taquito/src/tz/interface.ts index 6f639f912e..9e2cfced11 100644 --- a/packages/taquito/src/tz/interface.ts +++ b/packages/taquito/src/tz/interface.ts @@ -7,7 +7,11 @@ export interface TzProvider { * @param address Tezos address you want to get the spendable balance for (eg tz1...) */ getBalance(address: string): Promise; - + /** + * + * @param address Tezos address you want to get the spendable balance for (eg tz1...) + */ + getSpendable(address: string): Promise; /** * * @param address Tezos address you want to get the delegate for (eg tz1...) diff --git a/packages/taquito/src/tz/rpc-tz-provider.ts b/packages/taquito/src/tz/rpc-tz-provider.ts index 120fdf378a..dfb6cd321e 100644 --- a/packages/taquito/src/tz/rpc-tz-provider.ts +++ b/packages/taquito/src/tz/rpc-tz-provider.ts @@ -28,6 +28,14 @@ export class RpcTzProvider extends Provider implements TzProvider { return this.context.readProvider.getBalance(address, 'head'); } + async getSpendable(address: string): Promise { + const addressValidation = validateAddress(address); + if (addressValidation !== ValidationResult.VALID) { + throw new InvalidAddressError(address, invalidDetail(addressValidation)); + } + return this.context.readProvider.getSpendable(address, 'head'); + } + async getDelegate(address: string): Promise { const addressValidation = validateAddress(address); if (addressValidation !== ValidationResult.VALID) { diff --git a/packages/taquito/src/version.ts b/packages/taquito/src/version.ts index c63185deea..7100069571 100644 --- a/packages/taquito/src/version.ts +++ b/packages/taquito/src/version.ts @@ -1,6 +1,6 @@ // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN! export const VERSION = { - "commitHash": "21e50691241b2bd3bddd9ef981b3285b6f3ce55f", - "version": "20.1.2" + "commitHash": "8f78637e9787ae942916332501f41b35d6b98f2d", + "version": "21.0.0" }; diff --git a/packages/taquito/test/batch/rpc-batch-provider.spec.ts b/packages/taquito/test/batch/rpc-batch-provider.spec.ts index 2ad9faee04..f0aec0f7a5 100644 --- a/packages/taquito/test/batch/rpc-batch-provider.spec.ts +++ b/packages/taquito/test/batch/rpc-batch-provider.spec.ts @@ -36,6 +36,7 @@ describe('OperationBatch test', () => { getCounter: jest.Mock; getProtocolConstants: jest.Mock; getBalance: jest.Mock; + getSpendable: jest.Mock; isAccountRevealed: jest.Mock; getChainId: jest.Mock; }; @@ -92,6 +93,7 @@ describe('OperationBatch test', () => { getCounter: jest.fn(), getProtocolConstants: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), isAccountRevealed: jest.fn(), getChainId: jest.fn(), }; diff --git a/packages/taquito/test/contract/rpc-contract-provider.spec.ts b/packages/taquito/test/contract/rpc-contract-provider.spec.ts index d83d04ff1f..04cc34eb00 100644 --- a/packages/taquito/test/contract/rpc-contract-provider.spec.ts +++ b/packages/taquito/test/contract/rpc-contract-provider.spec.ts @@ -58,6 +58,7 @@ describe('RpcContractProvider test', () => { getCounter: jest.Mock; getProtocolConstants: jest.Mock; getBalance: jest.Mock; + getSpendable: jest.Mock; isAccountRevealed: jest.Mock; getChainId: jest.Mock; }; @@ -124,6 +125,7 @@ describe('RpcContractProvider test', () => { getCounter: jest.fn(), getProtocolConstants: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), isAccountRevealed: jest.fn(), getChainId: jest.fn(), }; diff --git a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts b/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts index c236c54c78..831c331191 100644 --- a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts +++ b/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts @@ -42,6 +42,7 @@ describe('RPCEstimateProvider test signer', () => { let mockRpcClient: { getScript: jest.Mock; getBalance: jest.Mock; + getSpendable: jest.Mock; getStorage: jest.Mock; getBlockHeader: jest.Mock; getManagerKey: jest.Mock; @@ -74,6 +75,7 @@ describe('RPCEstimateProvider test signer', () => { runOperation: jest.fn(), simulateOperation: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), getBlock: jest.fn(), getScript: jest.fn(), getManagerKey: jest.fn(), @@ -1124,6 +1126,7 @@ describe('RPCEstimateProvider test wallet', () => { let mockRpcClient: { getScript: jest.Mock; getBalance: jest.Mock; + getSpendable: jest.Mock; getStorage: jest.Mock; getBlockHeader: jest.Mock; getManagerKey: jest.Mock; @@ -1152,6 +1155,7 @@ describe('RPCEstimateProvider test wallet', () => { runOperation: jest.fn(), simulateOperation: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), getBlock: jest.fn(), getScript: jest.fn(), getManagerKey: jest.fn(), diff --git a/packages/taquito/test/prepare/prepare-provider.spec.ts b/packages/taquito/test/prepare/prepare-provider.spec.ts index 89b4d309cf..4b51b30001 100644 --- a/packages/taquito/test/prepare/prepare-provider.spec.ts +++ b/packages/taquito/test/prepare/prepare-provider.spec.ts @@ -22,6 +22,7 @@ describe('PrepareProvider test', () => { getCounter: jest.Mock; getProtocolConstants: jest.Mock; getBalance: jest.Mock; + getSpendable: jest.Mock; isAccountRevealed: jest.Mock; getChainId: jest.Mock; }; @@ -51,6 +52,7 @@ describe('PrepareProvider test', () => { getCounter: jest.fn(), getProtocolConstants: jest.fn(), getBalance: jest.fn(), + getSpendable: jest.fn(), isAccountRevealed: jest.fn(), getChainId: jest.fn(), }; diff --git a/packages/taquito/test/read-provider/rpc-read-adapter.spec.ts b/packages/taquito/test/read-provider/rpc-read-adapter.spec.ts index 276c798c91..84face70ae 100644 --- a/packages/taquito/test/read-provider/rpc-read-adapter.spec.ts +++ b/packages/taquito/test/read-provider/rpc-read-adapter.spec.ts @@ -20,6 +20,7 @@ describe('RpcReadAdapter test', () => { let readProvider: RpcReadAdapter; let mockRpcClient: { getBalance: jest.Mock; + getSpendable: jest.Mock; getDelegate: jest.Mock; getProtocols: jest.Mock; getConstants: jest.Mock; @@ -41,6 +42,7 @@ describe('RpcReadAdapter test', () => { beforeEach(() => { mockRpcClient = { getBalance: jest.fn(), + getSpendable: jest.fn(), getDelegate: jest.fn(), getProtocols: jest.fn(), getConstants: jest.fn(), @@ -85,6 +87,19 @@ describe('RpcReadAdapter test', () => { expect(mockRpcClient.getBalance.mock.calls[0][1]).toEqual({ block: `${block}` }); }); + it(`should get the spendable given a pkh at block: ${block}`, async () => { + mockRpcClient.getSpendable.mockResolvedValue(new BigNumber('10000')); + + const result = await readProvider.getSpendable('tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn', block); + expect(result).toBeInstanceOf(BigNumber); + expect(result.toString()).toStrictEqual('10000'); + + expect(mockRpcClient.getSpendable.mock.calls[0][0]).toEqual( + 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn' + ); + expect(mockRpcClient.getSpendable.mock.calls[0][1]).toEqual({ block: `${block}` }); + }); + it(`should get the delegate given a pkh at block: ${block}`, async () => { mockRpcClient.getDelegate.mockResolvedValue('tz1ZfrERcALBwmAqwonRXYVQBDT9BjNjBHJu'); diff --git a/packages/taquito/test/subscribe/polling-subscribe-provider.spec.ts b/packages/taquito/test/subscribe/polling-subscribe-provider.spec.ts index 5ceb3fa25d..8ca8f3cb8a 100644 --- a/packages/taquito/test/subscribe/polling-subscribe-provider.spec.ts +++ b/packages/taquito/test/subscribe/polling-subscribe-provider.spec.ts @@ -52,7 +52,6 @@ describe('Configurations for the PollingSubscribeProvider', () => { it('should set the pollingIntervalMilliseconds property based on the minimal_block_delay constant', async () => { const pollingSubscribeProvider = new PollingSubscribeProvider(mockContext); mockReadProvider.getProtocolConstants.mockResolvedValue({ - time_between_blocks: [new BigNumber('30'), new BigNumber('20')], minimal_block_delay: new BigNumber(15), }); await pollingSubscribeProvider['getConfirmationPollingInterval'](); @@ -63,19 +62,6 @@ describe('Configurations for the PollingSubscribeProvider', () => { ); }); - it('should set the pollingIntervalMilliseconds property based on the time_between_blocks constant', async () => { - const pollingSubscribeProvider = new PollingSubscribeProvider(mockContext); - mockReadProvider.getProtocolConstants.mockResolvedValue({ - time_between_blocks: [new BigNumber('30'), new BigNumber('20')], - }); - await pollingSubscribeProvider['getConfirmationPollingInterval'](); - expect(pollingSubscribeProvider.config.pollingIntervalMilliseconds).toEqual(10000); - expect(pollingSubscribeProvider.config.shouldObservableSubscriptionRetry).toBeFalsy(); - expect(pollingSubscribeProvider.config.observableSubscriptionRetryFunction.prototype).toEqual( - retry().prototype - ); - }); - it('should use default polling interval on error fetching the constants', async () => { const pollingSubscribeProvider = new PollingSubscribeProvider(mockContext); mockReadProvider.getProtocolConstants.mockRejectedValue(new Error()); @@ -88,10 +74,10 @@ describe('Configurations for the PollingSubscribeProvider', () => { ); }); - it('should use default polling interval if time_between_blocks is 0 (sandbox)', async () => { + it('should use default polling interval if minimal_block_delay is 0 (sandbox)', async () => { const pollingSubscribeProvider = new PollingSubscribeProvider(mockContext); mockReadProvider.getProtocolConstants.mockResolvedValue({ - time_between_blocks: [new BigNumber('0'), new BigNumber('0')], + minimal_block_delay: new BigNumber('0'), }); await pollingSubscribeProvider['getConfirmationPollingInterval'](); expect(pollingSubscribeProvider.config.pollingIntervalMilliseconds).toEqual(1000); diff --git a/packages/taquito/test/tz/rpc-tz-provider.spec.ts b/packages/taquito/test/tz/rpc-tz-provider.spec.ts index af0eb87641..7fdcae5655 100644 --- a/packages/taquito/test/tz/rpc-tz-provider.spec.ts +++ b/packages/taquito/test/tz/rpc-tz-provider.spec.ts @@ -25,6 +25,24 @@ describe('RpcTzProvider test', () => { }); }); + describe('getSpendable', () => { + it('calls get spendable from the rpc client', async () => { + const mockRpcClient = { + getSpendable: jest.fn(), + }; + + mockRpcClient.getSpendable.mockResolvedValue(new BigNumber('10000')); + + const provider = new RpcTzProvider(new Context(mockRpcClient as any)); + const result = await provider.getSpendable('tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn'); + expect(result).toBeInstanceOf(BigNumber); + expect(result.toString()).toStrictEqual('10000'); + expect(mockRpcClient.getSpendable.mock.calls[0][0]).toEqual( + 'tz1QZ6KY7d3BuZDT1d19dUxoQrtFPN2QJ3hn' + ); + }); + }); + describe('getDelegate', () => { it('calls get delegate from the rpc client', async () => { const mockRpcClient = { diff --git a/website/package-lock.json b/website/package-lock.json index 6b9770a949..0001fa08ab 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -1,12 +1,12 @@ { "name": "@taquito/website", - "version": "20.1.1", + "version": "21.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@taquito/website", - "version": "20.1.1", + "version": "21.0.0", "dependencies": { "@docusaurus/core": "2.4.3", "@docusaurus/plugin-google-gtag": "2.4.3", @@ -14,8 +14,8 @@ "@docusaurus/theme-live-codeblock": "2.4.3", "@docusaurus/theme-mermaid": "^2.4.3", "@docusaurus/theme-search-algolia": "2.4.3", - "@fortawesome/fontawesome-svg-core": "^6.5.2", - "@fortawesome/free-solid-svg-icons": "^6.5.2", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", "@fortawesome/react-fontawesome": "^0.2.0", "@ledgerhq/hw-transport-webhid": "^6.29.4", "@mdx-js/react": "^1.6.22", @@ -56,7 +56,7 @@ "react-icons": "^4.11.0", "react-slick": "^0.30.2", "react-use-mailchimp-signup": "^2.0.2", - "sass": "^1.80.1", + "sass": "^1.81.0", "sass-loader": "^13.3.2", "stream-browserify": "^3.0.0", "url-loader": "^4.1.1" @@ -70,17 +70,17 @@ }, "../packages/taquito": { "name": "@taquito/taquito", - "version": "20.1.1", + "version": "21.0.0", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/local-forging": "^20.1.1", - "@taquito/michel-codec": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/local-forging": "^21.0.0", + "@taquito/michel-codec": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "rxjs": "^7.8.1" }, @@ -128,13 +128,12 @@ }, "../packages/taquito-beacon-wallet": { "name": "@taquito/beacon-wallet", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@airgap/beacon-dapp": "^4.3.1", - "@airgap/beacon-ui": "^4.3.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", + "@airgap/beacon-dapp": "^4.3.2-beta.0", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", "@testing-library/react": "^16.0.1" }, "devDependencies": { @@ -175,7 +174,7 @@ }, "../packages/taquito-core": { "name": "@taquito/core", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "json-stringify-safe": "^5.0.1" @@ -192,10 +191,10 @@ }, "../packages/taquito-http-utils": { "name": "@taquito/http-utils", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", + "@taquito/core": "^21.0.0", "node-fetch": "^2.7.0" }, "devDependencies": { @@ -233,14 +232,14 @@ }, "../packages/taquito-ledger-signer": { "name": "@taquito/ledger-signer", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@ledgerhq/hw-transport": "^6.31.4", "@stablelib/blake2b": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "buffer": "^6.0.3" }, "devDependencies": { @@ -277,10 +276,10 @@ }, "../packages/taquito-michel-codec": { "name": "@taquito/michel-codec", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1" + "@taquito/core": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -310,12 +309,12 @@ }, "../packages/taquito-michelson-encoder": { "name": "@taquito/michelson-encoder", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "fast-json-stable-stringify": "^2.1.0" }, @@ -352,15 +351,15 @@ }, "../packages/taquito-remote-signer": { "name": "@taquito/remote-signer", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "typedarray-to-buffer": "^4.0.0" }, "devDependencies": { @@ -397,12 +396,12 @@ }, "../packages/taquito-rpc": { "name": "@taquito/rpc", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2" }, "devDependencies": { @@ -438,7 +437,7 @@ }, "../packages/taquito-signer": { "name": "@taquito/signer", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", @@ -447,9 +446,9 @@ "@stablelib/nacl": "^1.0.4", "@stablelib/pbkdf2": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@taquito/core": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "@types/bn.js": "^5.1.5", "bip39": "3.1.0", "elliptic": "^6.6.0", @@ -492,13 +491,13 @@ }, "../packages/taquito-tzip12": { "name": "@taquito/tzip12", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/tzip16": "^20.1.1" + "@taquito/core": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/tzip16": "^21.0.0" }, "devDependencies": { "@types/bluebird": "^3.5.42", @@ -534,15 +533,15 @@ }, "../packages/taquito-tzip16": { "name": "@taquito/tzip16", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/core": "^20.1.1", - "@taquito/http-utils": "^20.1.1", - "@taquito/michelson-encoder": "^20.1.1", - "@taquito/rpc": "^20.1.1", - "@taquito/taquito": "^20.1.1", - "@taquito/utils": "^20.1.1", + "@taquito/core": "^21.0.0", + "@taquito/http-utils": "^21.0.0", + "@taquito/michelson-encoder": "^21.0.0", + "@taquito/rpc": "^21.0.0", + "@taquito/taquito": "^21.0.0", + "@taquito/utils": "^21.0.0", "bignumber.js": "^9.1.2", "crypto-js": "^4.2.0" }, @@ -581,12 +580,12 @@ }, "../packages/taquito-utils": { "name": "@taquito/utils", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { "@stablelib/blake2b": "^1.0.1", "@stablelib/ed25519": "^1.0.3", - "@taquito/core": "^20.1.1", + "@taquito/core": "^21.0.0", "@types/bs58check": "^2.1.2", "bignumber.js": "^9.1.2", "blakejs": "^1.2.1", @@ -629,10 +628,10 @@ }, "../packages/taquito-wallet-connect": { "name": "@taquito/wallet-connect", - "version": "20.1.1", + "version": "21.0.0", "license": "Apache-2.0", "dependencies": { - "@taquito/taquito": "^20.1.1", + "@taquito/taquito": "^21.0.0", "@walletconnect/legacy-modal": "^2.0.0", "@walletconnect/sign-client": "^2.16.2", "@walletconnect/types": "^2.16.2", @@ -5127,33 +5126,33 @@ "license": "Apache-2.0" }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.6.0.tgz", - "integrity": "sha512-xyX0X9mc0kyz9plIyryrRbl7ngsA9jz77mCZJsUkLl+ZKs0KWObgaEBoSgQiYWAsSmjz/yjl0F++Got0Mdp4Rw==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", + "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.6.0.tgz", - "integrity": "sha512-KHwPkCk6oRT4HADE7smhfsKudt9N/9lm6EJ5BVg0tD1yPA5hht837fB87F8pn15D8JfTqQOjhKTktwmLMiD7Kg==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", + "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", "license": "MIT", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.6.0" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.6.0.tgz", - "integrity": "sha512-IYv/2skhEDFc2WGUcqvFJkeK39Q+HyPf5GHUrT/l2pKbtgEIv1al1TKd6qStR5OIwQdN1GZP54ci3y4mroJWjA==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz", + "integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==", "license": "(CC-BY-4.0 AND MIT)", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.6.0" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" @@ -12089,7 +12088,7 @@ }, "peerDependencies": { "@docusaurus/core": "^2.0.0-beta || ^3.0.0-alpha", - "sass": "^1.78.0" + "sass": "^1.81.0" } }, "node_modules/docusaurus-plugin-sass/node_modules/sass-loader": { @@ -12114,7 +12113,7 @@ "peerDependencies": { "fibers": ">= 3.1.0", "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", - "sass": "^1.78.0", + "sass": "^1.81.0", "webpack": "^5.94.0" }, "peerDependenciesMeta": { @@ -14792,9 +14791,9 @@ } }, "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", "license": "MIT" }, "node_modules/import-fresh": { @@ -21508,13 +21507,13 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.80.6", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.6.tgz", - "integrity": "sha512-ccZgdHNiBF1NHBsWvacvT5rju3y1d/Eu+8Ex6c21nHp2lZGLBEtuwc415QfiI1PJa1TpCo3iXwwSRjRpn2Ckjg==", + "version": "1.83.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz", + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", "license": "MIT", "dependencies": { "chokidar": "^4.0.0", - "immutable": "^4.0.0", + "immutable": "^5.0.2", "source-map-js": ">=0.6.2 <2.0.0" }, "bin": { @@ -21545,7 +21544,7 @@ "peerDependencies": { "fibers": ">= 3.1.0", "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0", - "sass": "^1.3.0", + "sass": "^1.81.0", "sass-embedded": "*", "webpack": "^5.0.0" }, diff --git a/website/package.json b/website/package.json index f1d32dec4f..58b132b263 100644 --- a/website/package.json +++ b/website/package.json @@ -21,8 +21,8 @@ "@docusaurus/theme-live-codeblock": "2.4.3", "@docusaurus/theme-mermaid": "^2.4.3", "@docusaurus/theme-search-algolia": "2.4.3", - "@fortawesome/fontawesome-svg-core": "^6.5.2", - "@fortawesome/free-solid-svg-icons": "^6.5.2", + "@fortawesome/fontawesome-svg-core": "^6.7.1", + "@fortawesome/free-solid-svg-icons": "^6.7.1", "@fortawesome/react-fontawesome": "^0.2.0", "@ledgerhq/hw-transport-webhid": "^6.29.4", "@mdx-js/react": "^1.6.22", @@ -63,7 +63,7 @@ "react-icons": "^4.11.0", "react-slick": "^0.30.2", "react-use-mailchimp-signup": "^2.0.2", - "sass": "^1.80.1", + "sass": "^1.81.0", "sass-loader": "^13.3.2", "stream-browserify": "^3.0.0", "url-loader": "^4.1.1" @@ -86,5 +86,5 @@ "last 1 safari version" ] }, - "version": "20.1.2" + "version": "21.0.0" } diff --git a/website/versioned_docs/version-19.0.0/mobile_bundle.md b/website/versioned_docs/version-19.0.0/mobile_bundle.md deleted file mode 100644 index b36c363472..0000000000 --- a/website/versioned_docs/version-19.0.0/mobile_bundle.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Taquito in Native Mobile Environments -id: mobile_bundle -author: Davis Sawali ---- -# Using Taquito in Mobile environments -Taquito works best in Node runtime applications, but some of our users working in native mobile development might not have access to such features. To accommodate for that, we decided to add a separate pure JS bundle that you can import into your native mobile applications. - -Currently the only available bundle is for the `@taquito/local-forging` package. - -The bundle wraps functions in the `@taquito/local-forging` package into a single variable called `taquito_local_forging` - -## Instructions on using the bundle -To use the JS bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases). - -After that, simply copy the `.js` file and the `.map.js` file into your project. - -Example of how to use the `LocalForger` class in a simple HTML script tag: -``` - - -``` \ No newline at end of file diff --git a/website/versioned_docs/version-19.0.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-19.0.0/rpc_nodes_integration_test.md deleted file mode 100644 index 97e1c8d17b..0000000000 --- a/website/versioned_docs/version-19.0.0/rpc_nodes_integration_test.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: RPC tests -author: Roxane Letourneau ---- - -## Steps to run the tests - -1. The RPC nodes' integration tests are disabled by default. -Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json. - - **oxfordnet**: `npm run test:oxfordnet rpc-nodes.spec.ts` - -**When all endpoints are accessible for a node, you will obtain:** - -``` -Test calling all methods from RPC node: https://a-node - ✓ Verify that rpcClient.getBlockHash returns the head block hash (19 ms) - ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (21 ms) - ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (14 ms) - ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (12 ms) - ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (17 ms) - ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (15 ms) - ✓ Verify that rpcClient.getContract returns the complete status of a contract (15 ms) - ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (11 ms) - ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (21 ms) - ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (1090 ms) - ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (16 ms) - ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (1020 ms) - ✓ Verify that rpcClient.getConstants returns all constants from RPC (18 ms) - ✓ Verify that rpcClient.getBlock returns all the information about a block (24 ms) - ✓ Verify that rpcClient.getBlockHeader returns whole block header (15 ms) - ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (17 ms) - ✓ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (14 ms) - ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (25 ms) - ✓ Verify that rpcClient.getEndorsingRights retrieves the list of delegates allowed to endorse a block (19 ms) - ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (10 ms) - ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (39 ms) - ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (11 ms) - ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (11 ms) - ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (13 ms) - ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (10 ms) - ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (11 ms) - ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (2019 ms) - ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (11 ms) - ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (75 ms) - ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (13 ms) - ✓ Verify that rpcClient.getChainId returns chain ID (10 ms) - ✓ Verify that rpcClient.runOperation runs an operation without signature checks (15 ms) - ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (12 ms) - ✓ Verify that rpcClient.runView executes tzip4 views (29 ms) - ✓ Verify that rpcClient.runScriptView executes michelson view (25 ms) - ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (12 ms) - ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (25 ms) - ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (10 ms) - ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (11 ms) - ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (12 ms) - ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (12 ms) - ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (10 ms) - ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (12 ms) - ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (250 ms) - ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (683 ms) -``` - -**Otherwise, you will see which endpoints do not work for a specific node:** - -``` -Test calling all methods from RPC node: https://another-node - ✓ Verify that rpcClient.getBlockHash returns the head block hash (486 ms) - ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (650 ms) - ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (616 ms) - ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (534 ms) - ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (591 ms) - ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (680 ms) - ✓ Verify that rpcClient.getContract returns the complete status of a contract (605 ms) - ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (553 ms) - ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (613 ms) - ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (3074 ms) - ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (674 ms) - ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (612 ms) - ✓ Verify that rpcClient.getConstants returns all constants from RPC (513 ms) - ✓ Verify that rpcClient.getBlock returns all the information about a block (549 ms) - ✓ Verify that rpcClient.getBlockHeader returns whole block header (516 ms) - ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (1472 ms) - ✕ Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block (479 ms) - ✓ Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block (1487 ms) - ✕ Verify that rpcClient.getEndorsingRights retrieves the list of delegates allowed to endorse a block (539 ms) - ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (615 ms) - ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (1670 ms) - ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (487 ms) - ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (471 ms) - ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (462 ms) - ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (590 ms) - ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (631 ms) - ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (600 ms) - ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (654 ms) - ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (1585 ms) - ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (771 ms) - ✓ Verify that rpcClient.getChainId returns chain ID (671 ms) - ✓ Verify that rpcClient.runOperation runs an operation without signature checks (614 ms) - ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (1330 ms) - ✓ Verify that rpcClient.runView executes tzip4 views (1149 ms) - ✓ Verify that rpcClient.runScriptView executes michelson view (1111 ms) - ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (478 ms) - ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (995 ms) - ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (665 ms) - ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (511 ms) - ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (616 ms) - ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (488 ms) - ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (486 ms) - ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (561 ms) - ✓ Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied (1298 ms) - ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (1060 ms) -``` \ No newline at end of file diff --git a/website/versioned_docs/version-19.1.0/maps_bigmaps.md b/website/versioned_docs/version-19.1.0/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/website/versioned_docs/version-19.1.0/maps_bigmaps.md +++ b/website/versioned_docs/version-19.1.0/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/website/versioned_docs/version-19.2.0/maps_bigmaps.md b/website/versioned_docs/version-19.2.0/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/website/versioned_docs/version-19.2.0/maps_bigmaps.md +++ b/website/versioned_docs/version-19.2.0/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/website/versioned_docs/version-20.0.0/maps_bigmaps.md b/website/versioned_docs/version-20.0.0/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/website/versioned_docs/version-20.0.0/maps_bigmaps.md +++ b/website/versioned_docs/version-20.0.0/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/website/versioned_docs/version-20.1.0/maps_bigmaps.md b/website/versioned_docs/version-20.1.0/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/website/versioned_docs/version-20.1.0/maps_bigmaps.md +++ b/website/versioned_docs/version-20.1.0/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/website/versioned_docs/version-19.0.0/ballot.md b/website/versioned_docs/version-21.0.0/ballot.md similarity index 100% rename from website/versioned_docs/version-19.0.0/ballot.md rename to website/versioned_docs/version-21.0.0/ballot.md diff --git a/website/versioned_docs/version-19.0.0/batch-api.md b/website/versioned_docs/version-21.0.0/batch-api.md similarity index 99% rename from website/versioned_docs/version-19.0.0/batch-api.md rename to website/versioned_docs/version-21.0.0/batch-api.md index 9e54d55d2d..1f94b85bbe 100644 --- a/website/versioned_docs/version-19.0.0/batch-api.md +++ b/website/versioned_docs/version-21.0.0/batch-api.md @@ -103,7 +103,7 @@ const batch = await Tezos.wallet.batch() If you prefer having an array that contains objects with the different transactions you want to emit, you can use the `with` method. It allows you to group transactions as objects instead of concatenating function calls. The object you use expects the same properties as the parameter of the corresponding method with an additional `kind` property that indicates the kind of transaction you want to emit (a handy `opKind` enum is [exported from the Taquito package](https://github.com/ecadlabs/taquito/blob/master/packages/taquito-rpc/src/opkind.ts) with the valid values for the `kind` property). ```js -import { OpKind } from '@taquito/taquito'; +import { OpKind, UnitValue } from '@taquito/taquito'; const batch = await Tezos.wallet.batch([ { diff --git a/website/versioned_docs/version-19.0.0/beaconwallet-singleton.md b/website/versioned_docs/version-21.0.0/beaconwallet-singleton.md similarity index 100% rename from website/versioned_docs/version-19.0.0/beaconwallet-singleton.md rename to website/versioned_docs/version-21.0.0/beaconwallet-singleton.md diff --git a/website/versioned_docs/version-19.0.0/cancel_http_requests.md b/website/versioned_docs/version-21.0.0/cancel_http_requests.md similarity index 98% rename from website/versioned_docs/version-19.0.0/cancel_http_requests.md rename to website/versioned_docs/version-21.0.0/cancel_http_requests.md index 78b9187bf0..79a6c3c143 100644 --- a/website/versioned_docs/version-19.0.0/cancel_http_requests.md +++ b/website/versioned_docs/version-21.0.0/cancel_http_requests.md @@ -43,6 +43,7 @@ class CancellableHttpBackend extends HttpBackend { try { const response = await fetch(urlWithQuery, { + keepalive: false, // generally only for Node 19 and above method, headers, body: JSON.stringify(data), diff --git a/website/versioned_docs/version-19.0.0/chatbot.md b/website/versioned_docs/version-21.0.0/chatbot.md similarity index 100% rename from website/versioned_docs/version-19.0.0/chatbot.md rename to website/versioned_docs/version-21.0.0/chatbot.md diff --git a/website/versioned_docs/version-19.0.0/complex_parameters.md b/website/versioned_docs/version-21.0.0/complex_parameters.md similarity index 100% rename from website/versioned_docs/version-19.0.0/complex_parameters.md rename to website/versioned_docs/version-21.0.0/complex_parameters.md diff --git a/website/versioned_docs/version-19.0.0/confirmation_event_stream.md b/website/versioned_docs/version-21.0.0/confirmation_event_stream.md similarity index 100% rename from website/versioned_docs/version-19.0.0/confirmation_event_stream.md rename to website/versioned_docs/version-21.0.0/confirmation_event_stream.md diff --git a/website/versioned_docs/version-19.0.0/consensus_key.md b/website/versioned_docs/version-21.0.0/consensus_key.md similarity index 88% rename from website/versioned_docs/version-19.0.0/consensus_key.md rename to website/versioned_docs/version-21.0.0/consensus_key.md index bda600b95d..af9989bef8 100644 --- a/website/versioned_docs/version-19.0.0/consensus_key.md +++ b/website/versioned_docs/version-21.0.0/consensus_key.md @@ -3,7 +3,7 @@ title: Consensus Keys author: Davis Sawali & Hui-An Yang --- -The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation/preendorsements and attestation/endorsements). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) +The "consensus key" feature allows bakers to use a different key, called the consensus key. It will allow for baking and signing consensus operations (i.e. preattestation and attestation). For more detailed information on consensus keys, refer to [this documentation](https://tezos.gitlab.io/protocols/015_lima.html?highlight=update%20consensus%20key#consensus-key) Starting from Lima protocol, these 2 new operations will be available: diff --git a/website/versioned_docs/version-19.0.0/contract-test-collection.md b/website/versioned_docs/version-21.0.0/contract-test-collection.md similarity index 97% rename from website/versioned_docs/version-19.0.0/contract-test-collection.md rename to website/versioned_docs/version-21.0.0/contract-test-collection.md index f8b7d5bee6..4a332a12f5 100644 --- a/website/versioned_docs/version-19.0.0/contract-test-collection.md +++ b/website/versioned_docs/version-21.0.0/contract-test-collection.md @@ -956,7 +956,7 @@ ledger.set( ); const url = 'https://storage.googleapis.com/tzip-16/fa2-views.json'; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadata = new MichelsonMap(); metadata.set('', bytesUrl); @@ -964,15 +964,15 @@ const operators = new MichelsonMap(); const tokens = new MichelsonMap(); const metadataMap0 = new MichelsonMap(); -metadataMap0.set('', char2Bytes('https://storage.googleapis.com/tzip-16/token-metadata.json')); -metadataMap0.set('name', char2Bytes('Name from URI is prioritized!')); +metadataMap0.set('', stringToBytes('https://storage.googleapis.com/tzip-16/token-metadata.json')); +metadataMap0.set('name', stringToBytes('Name from URI is prioritized!')); const metadataMap1 = new MichelsonMap(); -metadataMap1.set('name', char2Bytes('AliceToken')); -metadataMap1.set('symbol', char2Bytes('ALC')); +metadataMap1.set('name', stringToBytes('AliceToken')); +metadataMap1.set('symbol', stringToBytes('ALC')); metadataMap1.set('decimals', '30'); -metadataMap1.set('extra', char2Bytes('Add more data')); +metadataMap1.set('extra', stringToBytes('Add more data')); const metadataMap2 = new MichelsonMap(); -metadataMap2.set('name', char2Bytes('Invalid token metadata')); +metadataMap2.set('name', stringToBytes('Invalid token metadata')); tokens.set('0', { metadata_map: metadataMap0, total_supply: '20000', @@ -1059,8 +1059,8 @@ const metadataJSON = { }; const metadataBigMap = new MichelsonMap(); -metadataBigMap.set('', char2Bytes('tezos-storage:here')); -metadataBigMap.set('here', char2Bytes(JSON.stringify(metadataJSON))); +metadataBigMap.set('', stringToBytes('tezos-storage:here')); +metadataBigMap.set('here', stringToBytes(JSON.stringify(metadataJSON))); const tacoShopStorageMap = new MichelsonMap(); @@ -1115,7 +1115,7 @@ storage (pair (big_map %metadata string bytes) ```js const url = 'https://storage.googleapis.com/tzip-16/taco-shop-metadata.json'; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1177,7 +1177,7 @@ const urlPercentEncoded = encodeURIComponent( ); const metadataSha256 = '0x7e99ecf3a4490e3044ccdf319898d77380a2fc20aae36b6e40327d678399d17b'; const url = 'sha256://' + metadataSha256 + '/https:' + urlPercentEncoded; -const bytesUrl = char2Bytes(url); +const bytesUrl = stringToBytes(url); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1235,7 +1235,7 @@ storage (pair (big_map %metadata string bytes) ```js const uri = 'ipfs://QmXnASUptTDnfhmcoznFqz3S1Mxu7X1zqo2YwbTN3nW52V'; -const bytesUrl = char2Bytes(uri); +const bytesUrl = stringToBytes(uri); const metadataBigMap = new MichelsonMap(); metadataBigMap.set('', bytesUrl); @@ -1291,8 +1291,8 @@ storage (pair nat (big_map %metadata string bytes)); ```js const metadataBigMAp = new MichelsonMap(); -metadataBigMAp.set('', char2Bytes('tezos-storage:here')); -metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample1))); +metadataBigMAp.set('', stringToBytes('tezos-storage:here')); +metadataBigMAp.set('here', stringToBytes(JSON.stringify(metadataViewsExample1))); const op = await tezos.contract.originate({ code: contractCode, @@ -1340,8 +1340,8 @@ storage (pair nat (big_map %metadata string bytes)); ```js const metadataBigMAp = new MichelsonMap(); -metadataBigMAp.set('', char2Bytes('tezos-storage:here')); -metadataBigMAp.set('here', char2Bytes(JSON.stringify(metadataViewsExample2))); +metadataBigMAp.set('', stringToBytes('tezos-storage:here')); +metadataBigMAp.set('here', stringToBytes(JSON.stringify(metadataViewsExample2))); const op = await tezos.contract.originate({ code: contractCode, @@ -1367,7 +1367,7 @@ license: MIT Transactions to smart contracts operate in the same fashion as transactions to an implicit account, the only difference being the `KT1...` address. You will also receive a transaction hash and have to wait for the transaction to be confirmed. Once confirmed, it can be the right time to update the user's/contract's balance, for example. -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: diff --git a/website/versioned_docs/version-19.0.0/contract_call_parameters.md b/website/versioned_docs/version-21.0.0/contract_call_parameters.md similarity index 100% rename from website/versioned_docs/version-19.0.0/contract_call_parameters.md rename to website/versioned_docs/version-21.0.0/contract_call_parameters.md diff --git a/website/versioned_docs/version-19.0.0/contracts-library.md b/website/versioned_docs/version-21.0.0/contracts-library.md similarity index 100% rename from website/versioned_docs/version-19.0.0/contracts-library.md rename to website/versioned_docs/version-21.0.0/contracts-library.md diff --git a/website/versioned_docs/version-19.0.0/dapp_prelaunch.md b/website/versioned_docs/version-21.0.0/dapp_prelaunch.md similarity index 93% rename from website/versioned_docs/version-19.0.0/dapp_prelaunch.md rename to website/versioned_docs/version-21.0.0/dapp_prelaunch.md index f4c0a892f5..10c0067e5c 100644 --- a/website/versioned_docs/version-19.0.0/dapp_prelaunch.md +++ b/website/versioned_docs/version-21.0.0/dapp_prelaunch.md @@ -11,7 +11,7 @@ author: Claude Barde - Did you enable `Local Pack` in your dapp? Local Pack reduces the search time in bigmaps by 50%, and you can easily add it to your dapp by providing a new instance of the `MichelCodecPacker` class to the `setPackerProvider` method of the `TezosToolkit`. - Are you creating a single instance of the `BeaconWallet` that you can reuse throughout the different components of your dapp? The JavaScript frameworks generally offer a solution to easily share data between components (the Context API in React, Provide/Inject in Vue, or a Svelte store). The instance of the `BeaconWallet` must be saved there in order to use the same one in every component. Creating multiple instances of the `BeaconWallet` may create errors when forging new transactions. - Is your dapp making HTTP requests on update only when necessary? The JavaScript frameworks provide different solutions to rerender the DOM when internal data is updated (React `useEffect`, Vue `beforeUpdate` and Svelte `afterUpdate`). These data may be based on call responses to Tezos nodes or indexers, which is why it is crucial to optimize them. Unnecessary HTTP requests increase the traffic to Tezos nodes and indexer servers and slow down your dapp. -- Does your application wait for a confirmation of an operation, and does it check if the operation was successfull or failed when receiving the transaction receipt? This piece of information is crucial to your users in order to know if the transaction went through or not. +- Does your application wait for a confirmation of an operation, and does it check if the operation was successful or failed when receiving the transaction receipt? This piece of information is crucial to your users in order to know if the transaction went through or not. - Do you display user-friendly error messages, for example, when a transaction fails? A lack of visual feedback when transactions don't go through as expected can be confusing for users. Users must be informed about skipped, backtracked, and failed transactions. - Are you handling big numbers? Because numbers in Michelson are arbitrary-precision, they can become quite long, and JavaScript switches to the scientific notation to represent them, which can be confusing for users. You can use the `bignumber.js` library to handle potentially long numbers coming from the blockchain. - Do you have error reporting enabled on your dapp? An error reporting tool like [BugSnag](https://www.bugsnag.com/platforms/javascript) allows you to understand the issues your users face when using your dapp. diff --git a/website/versioned_docs/version-19.0.0/dapp_template.md b/website/versioned_docs/version-21.0.0/dapp_template.md similarity index 100% rename from website/versioned_docs/version-19.0.0/dapp_template.md rename to website/versioned_docs/version-21.0.0/dapp_template.md diff --git a/website/versioned_docs/version-19.0.0/drain_account.md b/website/versioned_docs/version-21.0.0/drain_account.md similarity index 100% rename from website/versioned_docs/version-19.0.0/drain_account.md rename to website/versioned_docs/version-21.0.0/drain_account.md diff --git a/website/versioned_docs/version-19.0.0/estimate.md b/website/versioned_docs/version-21.0.0/estimate.md similarity index 95% rename from website/versioned_docs/version-19.0.0/estimate.md rename to website/versioned_docs/version-21.0.0/estimate.md index dce6038dc3..f57f2c4b7e 100644 --- a/website/versioned_docs/version-19.0.0/estimate.md +++ b/website/versioned_docs/version-21.0.0/estimate.md @@ -7,6 +7,10 @@ import TabItem from '@theme/TabItem'; Taquito's estimate method can be used to estimate fees, gas, and storage associated with an operation. +:::note +Our estimation of `fee`, `gasLimit` and `storageLimit` is based on the RPC call response to `simulate_operation` plus a small buffer. The context and volume at the time of `simulate_operation` might differ from `preapply/operations` and `injection/operation`, potentially causing errors like `fees_too_low`, `storage_exhausted.operation` and `gas_exhausted.operation`. +::: + ## The `Estimate` object The `Estimate` object has the following properties: diff --git a/website/versioned_docs/version-19.0.0/events.md b/website/versioned_docs/version-21.0.0/events.md similarity index 100% rename from website/versioned_docs/version-19.0.0/events.md rename to website/versioned_docs/version-21.0.0/events.md diff --git a/website/versioned_docs/version-19.0.0/fa2_parameters.md b/website/versioned_docs/version-21.0.0/fa2_parameters.md similarity index 100% rename from website/versioned_docs/version-19.0.0/fa2_parameters.md rename to website/versioned_docs/version-21.0.0/fa2_parameters.md diff --git a/website/versioned_docs/version-19.0.0/failing_noop.md b/website/versioned_docs/version-21.0.0/failing_noop.md similarity index 100% rename from website/versioned_docs/version-19.0.0/failing_noop.md rename to website/versioned_docs/version-21.0.0/failing_noop.md diff --git a/website/versioned_docs/version-19.0.0/failwith_errors.md b/website/versioned_docs/version-21.0.0/failwith_errors.md similarity index 100% rename from website/versioned_docs/version-19.0.0/failwith_errors.md rename to website/versioned_docs/version-21.0.0/failwith_errors.md diff --git a/website/versioned_docs/version-19.0.0/forger.md b/website/versioned_docs/version-21.0.0/forger.md similarity index 100% rename from website/versioned_docs/version-19.0.0/forger.md rename to website/versioned_docs/version-21.0.0/forger.md diff --git a/website/versioned_docs/version-19.0.0/global_constant.md b/website/versioned_docs/version-21.0.0/global_constant.md similarity index 100% rename from website/versioned_docs/version-19.0.0/global_constant.md rename to website/versioned_docs/version-21.0.0/global_constant.md diff --git a/website/versioned_docs/version-19.0.0/images/Tzip16ExecuteView.png b/website/versioned_docs/version-21.0.0/images/Tzip16ExecuteView.png similarity index 100% rename from website/versioned_docs/version-19.0.0/images/Tzip16ExecuteView.png rename to website/versioned_docs/version-21.0.0/images/Tzip16ExecuteView.png diff --git a/website/versioned_docs/version-19.0.0/images/diagramTzip16Metadata.png b/website/versioned_docs/version-21.0.0/images/diagramTzip16Metadata.png similarity index 100% rename from website/versioned_docs/version-19.0.0/images/diagramTzip16Metadata.png rename to website/versioned_docs/version-21.0.0/images/diagramTzip16Metadata.png diff --git a/website/versioned_docs/version-19.0.0/images/github.png b/website/versioned_docs/version-21.0.0/images/github.png similarity index 100% rename from website/versioned_docs/version-19.0.0/images/github.png rename to website/versioned_docs/version-21.0.0/images/github.png diff --git a/website/versioned_docs/version-19.0.0/images/gitlab.png b/website/versioned_docs/version-21.0.0/images/gitlab.png similarity index 100% rename from website/versioned_docs/version-19.0.0/images/gitlab.png rename to website/versioned_docs/version-21.0.0/images/gitlab.png diff --git a/website/versioned_docs/version-19.0.0/increase_paid_storage.md b/website/versioned_docs/version-21.0.0/increase_paid_storage.md similarity index 97% rename from website/versioned_docs/version-19.0.0/increase_paid_storage.md rename to website/versioned_docs/version-21.0.0/increase_paid_storage.md index b15a75c085..b47e0de6e9 100644 --- a/website/versioned_docs/version-19.0.0/increase_paid_storage.md +++ b/website/versioned_docs/version-21.0.0/increase_paid_storage.md @@ -22,7 +22,7 @@ const op = await Tezos.contract.increasePaidStorage({ await op.confirmation(); ``` -- `amount` is the the number of `bytes` you want to increase the paid storage by +- `amount` is the number of `bytes` you want to increase the paid storage by - `destination` is the `KT1` address of the smart contract which storage you would like to increase After waiting for the operation confirmation, you will also have access to various getters of the operation such as `status`, `amount`, `destination`, `fee`, `gasLimit`, `errors`, `storageLimit`, `consumedMilligas`. @@ -105,4 +105,4 @@ const batch = await Tezos.wallet const op = await batch.send(); await op.confirmation(); -``` \ No newline at end of file +``` diff --git a/website/versioned_docs/version-19.0.0/inmemory_signer.md b/website/versioned_docs/version-21.0.0/inmemory_signer.md similarity index 100% rename from website/versioned_docs/version-19.0.0/inmemory_signer.md rename to website/versioned_docs/version-21.0.0/inmemory_signer.md diff --git a/website/versioned_docs/version-19.0.0/lambda_view.md b/website/versioned_docs/version-21.0.0/lambda_view.md similarity index 98% rename from website/versioned_docs/version-19.0.0/lambda_view.md rename to website/versioned_docs/version-21.0.0/lambda_view.md index cf8754e8d4..0f3277dd4a 100644 --- a/website/versioned_docs/version-19.0.0/lambda_view.md +++ b/website/versioned_docs/version-21.0.0/lambda_view.md @@ -54,7 +54,7 @@ Then we call the `read()` method. (Note that we have no longer need a lambda con Tezos.contract .at('KT1MhfAnNbg2oACFBP4VDU5bNY5MZUXdeDWs') .then((contract) => { - return contract.views.getTotalSupply([['Unit']]).read(); + return contract.views.getTotalSupply(UnitValue).read(); }) .then((response) => { console.log(response); diff --git a/website/versioned_docs/version-19.0.0/ledger_integration_test.md b/website/versioned_docs/version-21.0.0/ledger_integration_test.md similarity index 100% rename from website/versioned_docs/version-19.0.0/ledger_integration_test.md rename to website/versioned_docs/version-21.0.0/ledger_integration_test.md diff --git a/website/versioned_docs/version-19.0.0/ledger_signer.md b/website/versioned_docs/version-21.0.0/ledger_signer.md similarity index 100% rename from website/versioned_docs/version-19.0.0/ledger_signer.md rename to website/versioned_docs/version-21.0.0/ledger_signer.md diff --git a/website/versioned_docs/version-19.0.0/liquidity_baking.md b/website/versioned_docs/version-21.0.0/liquidity_baking.md similarity index 100% rename from website/versioned_docs/version-19.0.0/liquidity_baking.md rename to website/versioned_docs/version-21.0.0/liquidity_baking.md diff --git a/website/versioned_docs/version-19.0.0/making_transfers.md b/website/versioned_docs/version-21.0.0/making_transfers.md similarity index 100% rename from website/versioned_docs/version-19.0.0/making_transfers.md rename to website/versioned_docs/version-21.0.0/making_transfers.md diff --git a/website/versioned_docs/version-19.0.0/manager_lambda.md b/website/versioned_docs/version-21.0.0/manager_lambda.md similarity index 100% rename from website/versioned_docs/version-19.0.0/manager_lambda.md rename to website/versioned_docs/version-21.0.0/manager_lambda.md diff --git a/website/versioned_docs/version-19.0.0/maps_bigmaps.md b/website/versioned_docs/version-21.0.0/maps_bigmaps.md similarity index 98% rename from website/versioned_docs/version-19.0.0/maps_bigmaps.md rename to website/versioned_docs/version-21.0.0/maps_bigmaps.md index 6f00ec6e4c..62da606795 100644 --- a/website/versioned_docs/version-19.0.0/maps_bigmaps.md +++ b/website/versioned_docs/version-21.0.0/maps_bigmaps.md @@ -818,7 +818,7 @@ Tezos.contract //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -851,7 +851,7 @@ Tezos.wallet //When called on a bigMap, the get method returns a promise return myStorage['thebigmap'].get({ 0: '10', //nat - 1: 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', //address + 1: 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', //address }); }) .then((valueBigMap) => { @@ -915,9 +915,9 @@ Tezos.contract console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { @@ -945,9 +945,9 @@ Tezos.wallet console.log('Fetching the big map values...\n'); return storage['0'].getMultipleValues([ 'tz3WXYtyDUNL91qfiCJtVUX746QpNv5i5ve5', - 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', + 'tz1PgQt52JMirBUhhkq1eanX8hVd1Fsg71Lr', 'tz1bwsEWCwSEXdRvnJxvegQZKeX5dj6oKEys', - 'tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb', + 'tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx', ]); }) .then((values) => { diff --git a/website/versioned_docs/version-19.0.0/metadata-tzip16.md b/website/versioned_docs/version-21.0.0/metadata-tzip16.md similarity index 95% rename from website/versioned_docs/version-19.0.0/metadata-tzip16.md rename to website/versioned_docs/version-21.0.0/metadata-tzip16.md index 162daa6209..2268343d3e 100644 --- a/website/versioned_docs/version-19.0.0/metadata-tzip16.md +++ b/website/versioned_docs/version-21.0.0/metadata-tzip16.md @@ -356,7 +356,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -375,7 +375,7 @@ Tezos.contract }) .then((result) => { console.log(`Result of the view someJson: ${result}`); - console.log(`Transform result to char: ${bytes2Char(result)}`); + console.log(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` @@ -385,7 +385,7 @@ Tezos.contract ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -404,7 +404,7 @@ Tezos.wallet }) .then((result) => { console.log(`Result of the view someJson: ${result}`); - console.log(`Transform result to char: ${bytes2Char(result)}`); + console.log(`Transform result to char: ${bytesToString(result)}`); }) .catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-21.0.0/michel_codec.md b/website/versioned_docs/version-21.0.0/michel_codec.md new file mode 100644 index 0000000000..010409f11e --- /dev/null +++ b/website/versioned_docs/version-21.0.0/michel_codec.md @@ -0,0 +1,123 @@ +--- +title: Michel Codec +author: Hui-An Yang +--- + +The `taquito/michel-codec` package converts and validates Michelson expressions between JSON-based Michelson and Micheline. It also comes with various functions like `packData`, `packDataBytes`, `unpackData` and `unpackDataBytes` to serialize any value of packable type to its optimized binary representation locally and vice versa, like Michelson instructions `PACK` and `UNPACK`. + +## Parser class +To use the parser class, import and initialize it as follows. + +```ts +import { Parser } from '@taquito/michel-codec' +const p = new Parser() +``` +### Configuration +You can configure the parser class by passing `ParserOptions` through initialization with `expandMacros` and `expandGlobalConstant` properties. + +* `expandMacros` - defaults to true unless you don't want `Parser` class to expand them; you can pass `{ expandMacros: false }` to disable it. ref: Expand [Michelson macros](https://tezos.gitlab.io/whitedoc/michelson.html#macros) during parsing +* `expandGlobalConstant` - expects an object where the keys are global constant hashes and the values are the corresponding JSON Micheline expressions. + +for example + +```ts +import { Parser } from '@taquito/michel-codec' + +const parserOptions: ParserOptions = { + expandMacros: true, + expandGlobalConstant: { + 'expr...': { prim: 'DROP', args: [{ int: '2' }] } + } +} +const p = new Parser(parserOptions); +``` + +### parseJSON & emitMicheline - Parse JSON Michelson and convert it to Micheline +* `parseJSON` - takes a JSON-encoded Michelson, validates it, strips away unneeded properties and expands macros based on your configuration. +* `emitMicheline` takes a parsed JSON Michelson object and converts it to a Micheline expression with formatting options. + +```js live noInline +// import { Parser, emitMicheline } from '@taquito/michel-codec' + +const p = new Parser(); +Tezos.contract + .at("KT1BJadpDyLCACMH7Tt9xtpx4dQZVKw9cDF7") + .then(contract => { + const code = p.parseJSON(contract.script.code); + console.log("Pretty print Michelson smart contract:"); + console.log(emitMicheline(code, {indent:" ", newline: "\n",})); + + const storage = p.parseJSON(contract.script.storage); + console.log("Pretty print Storage:"); + console.log(emitMicheline(storage, {indent:" ", newline: "\n",})); + }) + .catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); +``` + +### parseMichelineExpression - Parse Micheline and convert it to JSON Michelson +Takes a Micheline expression in the form of script or data and converts it to JSON Michelson + +```js live noInline +// import { Parser } from '@taquito/michel-codec' + +const p = new Parser(); + +const michelineScript = `{parameter unit; storage unit; code {CDR; NIL operation; PAIR};}` +const script = p.parseMichelineExpression(michelineScript); +console.log('JSON Michelson script: ' + JSON.stringify(script) + '\n'); + +const michelineData = `(IF_LEFT { IF_LEFT { SWAP ; SUB } { ADD } })`; +const data = p.parseMichelineExpression(michelineData); +console.log('JSON Michelson data: ' + JSON.stringify(data)); +``` + +## PACK and UNPACK locally + +### packData & packDataBytes - Pack Michelson data +Serialize any value of packable type to its optimized binary representation identical to the one used by PACK Michelson instructions. +Without a type definition (not recommended), `packData` and `packDataBytes` will encode the data as a binary form of a generic Michelson expression. +Type definition allows types like `timestamp`, `address` and other base58 representable types to be encoded to corresponding optimized binary forms borrowed from the Tezos protocol. + +```ts +// import { packData, packDataBytes } from '@taquito/michel-codec' + +const data: MichelsonData = { string: 'KT1RvkwF4F7pz1gCoxkyZrG1RkrxQy3gmFTv%foo' }; +const typ: MichelsonType = { prim: 'address' }; + +const packed = packData(data, typ); +// 050a0000001901be41ee922ddd2cf33201e49d32da0afec571dce300666f6f + +const packedBytes = packDataBytes(data, typ); +// { bytes: "050a0000001901be41ee922ddd2cf33201e49d32da0afec571dce300666f6f" } +``` + +### unpackData & unpackDataBytes - Unpack Michelson data +Deserialize a byte array into its corresponding Michelson value. +Without a type definition (not recommended), the binary data will be treated as a binary form of a generic Michelson expression and returned as is. +Type definition allows some types, like `timestamp` and `address` and others, usually encoded in optimized binary forms, to be transformed back to their string representations like base58 and ISO timestamps. + +```ts +// import { unpackData, unpackDataBytes } from '@taquito/michel-codec' +const type: MichelsonType = { prim: 'timestamp' }; + +const src1 = [0x05, 0x00, 0xa7, 0xe8, 0xe4, 0xd8, 0x0b]; +const data1 = unpackData(src1, type); +// { string: "2019-09-26T10:59:51Z" } + +const src2 = { bytes: '0500a7e8e4d80b' }; +const data2 = unpackDataBytes(src2, type); +// { string: "2019-09-26T10:59:51Z" } +``` + +Alternatively, the same binary data without passing a type definition to `unpackData`, `unpackDataBytes` will not be deserialized correctly +```ts +// import { unpackData, unpackDataBytes } from '@taquito/michel-codec' + +const src1 = [0x05, 0x00, 0xa7, 0xe8, 0xe4, 0xd8, 0x0b]; +const data1 = unpackData(src1); +// { int: "1569495591" } + +const src2 = { bytes: '0500a7e8e4d80b' }; +const data2 = unpackDataBytes(src2); +// { int: "1569495591" } +``` diff --git a/website/versioned_docs/version-19.0.0/michelson_encoder.md b/website/versioned_docs/version-21.0.0/michelson_encoder.md similarity index 80% rename from website/versioned_docs/version-19.0.0/michelson_encoder.md rename to website/versioned_docs/version-21.0.0/michelson_encoder.md index 73ae5050dd..d48294ae63 100644 --- a/website/versioned_docs/version-19.0.0/michelson_encoder.md +++ b/website/versioned_docs/version-21.0.0/michelson_encoder.md @@ -7,6 +7,11 @@ The purpose of the `Michelson-Encoder` package is to create an abstraction over Its integration into the main `Taquito` package makes it easier to write the storage when deploying a contract and the parameter when calling a contract entry-point. +:::info +With the release of Taquito vevsion 20.0.0, we have made a breaking change in the Michelson Encoder package. +Please check the [Breaking Change to Field Numbering](#breaking-change-to-field-numbering) section of this document for more information and how to enable the old behavior. +::: + ## How it works? There are three main classes in the Michelson Encoder: @@ -264,12 +269,16 @@ const storageType = { ] }; const storageSchema = new Schema(storageType); -const typecheck = storageSchema.Typecheck({ - stored_counter: 10, - threshold: 5, - keys: ['edpkuLxx9PQD8fZ45eUzrK3yhfDZJHhBuK4Zi49DcEGANwd2rpX82t'] -}) -console.log(typecheck); +try { + storageSchema.Typecheck({ + stored_counter: 10, + threshold: 5, + keys: ['edpkuLxx9PQD8fZ45eUzrK3yhfDZJHhBuK4Zi49DcEGANwd2rpX82t'] + }) + console.log('Storage object is valid'); +} catch (e) { + console.log(`Storage is not valid: ${e}`); +} ``` ### The Encode method @@ -533,3 +542,106 @@ const storageSchema = new Schema({ const mixedSchema = storageSchema.ExtractSchema(); console.log(JSON.stringify(mixedSchema, null, 2)); ``` + +## Breaking Change to Field Numbering {#breaking-change-to-field-numbering} +When having nested `pair`s or unions (`or`), Taquito assigns numbers to fields when an annotation is not present. +In previous versions of Taquito, the nested object's fields were numbered were a continuation of the parent object's fields. +For example, the following schema: + +```js live noInline +const param = { + prim: 'or', + args: [ + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%transfer'] + }, + { + prim: 'or', + args: [ + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%approve'] + }, + { + prim: 'pair', + args: [{ prim: 'address' }, { prim: 'nat' }], + annots: ['%mint'] + } + ] + } + ], + annots: [':_entries'] +}; +const parameterSchema = new ParameterSchema(param); +Token.fieldNumberingStrategy = "Legacy"; //To bring back the old behavior +const value = parameterSchema.generateSchema(); +console.log(JSON.stringify(value, null, 2)); +Token.fieldNumberingStrategy = 'Latest'; //To restore the default (new) behavior +``` + +Please run the code above and check the output. + +Please note how nested field numbers are not predictable. The field numbers are assigned in the order their parent were encountered during the traversal of the tree. For instance, in the above example, `approve` would get a field number of `1`. Because it has annotations, the field number is not used. But its nested fields would be numbered starting from `1` and not `2`. + +While this behavior is not an error, it is prone to unexpected changes when the schema is modified. Also, predicting the field number of a specific field is not straightforward. + +With the release of Taquito version 20.0.0, we have made a breaking change in the Michelson Encoder package. The field numbering is now predictable and consistent. +The field numbers for each nested object (`Or`/`Pair`) are now reset from zero. You can see that by commenting out the line: `Token.fieldNumberingStrategy = "Legacy";` and running the code again. + +Below you can see a diff of the new versus old behavior: + +```diff +{ + "__michelsonType": "or", + "schema": { + "transfer": { + "__michelsonType": "pair", + "schema": { + "0": { + "__michelsonType": "address", + "schema": "address" + }, + "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + }, + "approve": { + "__michelsonType": "pair", + "schema": { +- "1": { ++ "0": { + "__michelsonType": "address", + "schema": "address" + }, +- "2": { ++ "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + }, + "mint": { + "__michelsonType": "pair", + "schema": { +- "2": { ++ "0": { + "__michelsonType": "address", + "schema": "address" + }, +- "3": { ++ "1": { + "__michelsonType": "nat", + "schema": "nat" + } + } + } + } +} +``` +You can enable the old behavior by setting the `Token.fieldNumberingStrategy = 'Legacy'`. Please note that this value should stay the same for the whole application. +The possible values are: `type FieldNumberingStrategy = 'Legacy' | 'ResetFieldNumbersInNestedObjects' | 'Latest';` For new applications, we recommend using the default value `Latest`. diff --git a/website/versioned_docs/version-19.0.0/michelsonmap.md b/website/versioned_docs/version-21.0.0/michelsonmap.md similarity index 100% rename from website/versioned_docs/version-19.0.0/michelsonmap.md rename to website/versioned_docs/version-21.0.0/michelsonmap.md diff --git a/website/versioned_docs/version-19.0.0/multisig_doc.md b/website/versioned_docs/version-21.0.0/multisig_doc.md similarity index 100% rename from website/versioned_docs/version-19.0.0/multisig_doc.md rename to website/versioned_docs/version-21.0.0/multisig_doc.md diff --git a/website/versioned_docs/version-19.0.0/on_chain_views.md b/website/versioned_docs/version-21.0.0/on_chain_views.md similarity index 100% rename from website/versioned_docs/version-19.0.0/on_chain_views.md rename to website/versioned_docs/version-21.0.0/on_chain_views.md diff --git a/website/versioned_docs/version-19.0.0/operation_flow.md b/website/versioned_docs/version-21.0.0/operation_flow.md similarity index 100% rename from website/versioned_docs/version-19.0.0/operation_flow.md rename to website/versioned_docs/version-21.0.0/operation_flow.md diff --git a/website/versioned_docs/version-19.0.0/ophash_before_injecting.md b/website/versioned_docs/version-21.0.0/ophash_before_injecting.md similarity index 100% rename from website/versioned_docs/version-19.0.0/ophash_before_injecting.md rename to website/versioned_docs/version-21.0.0/ophash_before_injecting.md diff --git a/website/versioned_docs/version-19.0.0/originate.md b/website/versioned_docs/version-21.0.0/originate.md similarity index 96% rename from website/versioned_docs/version-19.0.0/originate.md rename to website/versioned_docs/version-21.0.0/originate.md index a595cc38fa..aa0fe1efce 100644 --- a/website/versioned_docs/version-19.0.0/originate.md +++ b/website/versioned_docs/version-21.0.0/originate.md @@ -46,10 +46,18 @@ importKey(Tezos, "p2sk2obfVMEuPUnadAConLWk7Tf4Dt3n4svSgJwrgpamRqJXvaYcg1") import { BeaconWallet } from '@taquito/beacon-wallet'; import { TezosToolkit } from '@taquito/taquito'; const Tezos = new TezosToolkit('https://ghostnet.tezos.ecadinfra.com'); -const option = { name: "nameOfWallet", network: { type: 'ghostnet' }} -const wallet = new BeaconWallet(option) -await wallet.requestPermissions() -Tezos.setWalletProvider(wallet) +const option = { name: "nameOfWallet", network: { type: 'ghostnet' }, enableMetrics: true}; +const wallet = new BeaconWallet(option); + +await wallet.client.subscribeToEvent( + BeaconEvent.ACTIVE_ACCOUNT_SET, + async (account) => { + // An active account has been set, update the dApp UI + console.log(`${BeaconEvent.ACTIVE_ACCOUNT_SET} triggered: `, account); + }, + +await wallet.requestPermissions(); +Tezos.setWalletProvider(wallet); ``` diff --git a/website/versioned_docs/version-21.0.0/package_bundle.md b/website/versioned_docs/version-21.0.0/package_bundle.md new file mode 100644 index 0000000000..5324905d10 --- /dev/null +++ b/website/versioned_docs/version-21.0.0/package_bundle.md @@ -0,0 +1,36 @@ +--- +title: Client-Side Environments +id: package_bundle +author: Davis Sawali +--- +# Using Taquito in Client-Side Environments +While Taquito works best in Node runtime applications, some of our users working in client-side development might not have access to such features. To accommodate for that, we have decided to provide separate pure JavaScript bundles that you can import into your client-side environment. + +Currently, the available bundles are `@taquito/local-forging` and `@taquito/beacon-wallet` packages. + +The bundle wraps functions from the `@taquito/local-forging` package into a single variable called `taquito_local_forging`, and from the `@taquito/beacon-wallet` package into a single variable called `taquito_beacon_wallet`. + +## Instructions for Using the Bundle + +To use the JavaScript bundle for your project, download the zip file under `Assets` from your preferred Taquito [release](https://github.com/ecadlabs/taquito/releases). + +After that, simply copy the `.js` file and the `.map.js` file into your project. + +Example of how to use the `LocalForger` class in a simple HTML script tag: +``` + + +``` +Example of how to use the `BeaconWallet` class in a simple HTML script tag: + +``` + + +``` \ No newline at end of file diff --git a/website/versioned_docs/version-19.0.0/prepare.md b/website/versioned_docs/version-21.0.0/prepare.md similarity index 100% rename from website/versioned_docs/version-19.0.0/prepare.md rename to website/versioned_docs/version-21.0.0/prepare.md diff --git a/website/versioned_docs/version-19.0.0/proposal_and_ballot.md b/website/versioned_docs/version-21.0.0/proposal_and_ballot.md similarity index 100% rename from website/versioned_docs/version-19.0.0/proposal_and_ballot.md rename to website/versioned_docs/version-21.0.0/proposal_and_ballot.md diff --git a/website/versioned_docs/version-19.0.0/quick_start.md b/website/versioned_docs/version-21.0.0/quick_start.md similarity index 99% rename from website/versioned_docs/version-19.0.0/quick_start.md rename to website/versioned_docs/version-21.0.0/quick_start.md index 3d084d83c0..2425e085a7 100644 --- a/website/versioned_docs/version-19.0.0/quick_start.md +++ b/website/versioned_docs/version-21.0.0/quick_start.md @@ -53,7 +53,7 @@ Alternatively, you can use a `WalletProvider` to interact with a wallet. Please ## Examples -### Get the current Tezos balance for an address +### Get the current Tezos spendable balance for an address ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; diff --git a/website/versioned_docs/version-19.0.0/rpc-cache.md b/website/versioned_docs/version-21.0.0/rpc-cache.md similarity index 100% rename from website/versioned_docs/version-19.0.0/rpc-cache.md rename to website/versioned_docs/version-21.0.0/rpc-cache.md diff --git a/website/versioned_docs/version-19.0.0/rpc_nodes.md b/website/versioned_docs/version-21.0.0/rpc_nodes.md similarity index 74% rename from website/versioned_docs/version-19.0.0/rpc_nodes.md rename to website/versioned_docs/version-21.0.0/rpc_nodes.md index 8f60271ecf..343ac4fa70 100644 --- a/website/versioned_docs/version-19.0.0/rpc_nodes.md +++ b/website/versioned_docs/version-21.0.0/rpc_nodes.md @@ -23,23 +23,26 @@ values={[ | Provider | Net | URL | Header | |------------------|--------------|------------------------------------------|---------------------------------------------------------------------------------| -| ECAD Labs | Mainnet | https://mainnet.tezos.ecadinfra.com | [Check](https://mainnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | -| ECAD Labs | Ghostnet | https://ghostnet.tezos.ecadinfra.com | [Check](https://ghostnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | -| ECAD Labs | Oxfordnet | https://oxfordnet.ecadinfra.com | [Check](https://oxfordnet.ecadinfra.com/chains/main/blocks/head/header) | +| ECAD Labs | Mainnet | https://mainnet.tezos.ecadinfra.com | [Check](https://mainnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | +| ECAD Labs | Ghostnet | https://ghostnet.tezos.ecadinfra.com | [Check](https://ghostnet.tezos.ecadinfra.com/chains/main/blocks/head/header) | | SmartPy | Mainnet | https://mainnet.smartpy.io | [Check](https://mainnet.smartpy.io/chains/main/blocks/head/header) | | SmartPy | Ghostnet | https://ghostnet.smartpy.io | [Check](https://ghostnet.smartpy.io/chains/main/blocks/head/header) | | Tezos Foundation | Mainnet | https://rpc.tzbeta.net/ | [Check](https://rpc.tzbeta.net/chains/main/blocks/head/header) | -| Marigold | Mainnet | https://mainnet.tezos.marigold.dev/ | [Check](https://mainnet.tezos.marigold.dev/chains/main/blocks/head/header) | -| Marigold | Ghostnet | https://ghostnet.tezos.marigold.dev/ | [Check](https://ghostnet.tezos.marigold.dev/chains/main/blocks/head/header) | -| Marigold | Oxfordnet | https://oxfordnet.tezos.marigold.dev/ | [Check](https://oxfordnet.tezos.marigold.dev/chains/main/blocks/head/header) | - +| Tezos Foundation | Ghostnet | https://rpc.ghostnet.teztnets.com/ | [Check](https://rpc.ghostnet.teztnets.com/chains/main/blocks/head/header) | +| Tezos Foundation | Parisnet | https://rpc.pariscnet.teztnets.com/ | [Check](https://rpc.pariscnet.teztnets.com/chains/main/blocks/head/header) | +| Tezos Foundation | Quebecnet | https://rpc.quebecnet.teztnets.com/ | [Check](https://rpc.quebecnet.teztnets.com/chains/main/blocks/head/header) | +| Tzkt | Mainnet | https://rpc.tzkt.io/mainnet/ | [Check](https://rpc.tzkt.io/mainnet/chains/main/blocks/head/header) | +| Tzkt | Ghostnet | https://rpc.tzkt.io/ghostnet | [Check](https://rpc.tzkt.io/ghostnet/chains/main/blocks/head/header) | +| Tzkt | Parisnet | https://rpc.tzkt.io/parisnet | [Check](https://rpc.tzkt.io/parisnet/chains/main/blocks/head/header) | +| Tzkt | Quebecnet | https://rpc.tzkt.io/quebecnet | [Check](https://rpc.tzkt.io/quebecnet/chains/main/blocks/head/header) | + +https://api.mainnet.tzkt.io/ *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 | |------------------|---------------------------------------------| -| TzPro | https://tzpro.io/ | | MIDL.dev | https://midl.dev/tezos-rpc/ | | Exaion | https://node.exaion.com | diff --git a/website/versioned_docs/version-21.0.0/rpc_nodes_integration_test.md b/website/versioned_docs/version-21.0.0/rpc_nodes_integration_test.md new file mode 100644 index 0000000000..ca05174dfc --- /dev/null +++ b/website/versioned_docs/version-21.0.0/rpc_nodes_integration_test.md @@ -0,0 +1,129 @@ +--- +title: RPC tests +author: Roxane Letourneau +--- + +## Steps to run the tests + +1. The RPC nodes' integration tests are disabled by default. +Remove `./rpc-nodes.spec.ts` from `"testPathIgnorePatterns"` in the package.json. + + **quebecnet**: `npm run test:quebecnet-secret-key integration-tests/__tests__/rpc/nodes.spec.ts` + +**When all endpoints are accessible for a node, you will obtain:** + +``` + Test calling all methods from RPC node: https://rpc.quebecnet.teztnets.com + ✓ Verify that rpcClient.getBlockHash returns the head block hash (61 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (61 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (57 ms) + ✓ Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds (83 ms) + ✓ Verify that rpcClient.getBalanceAndFrozenBonds for knownBaker returns the full balance (58 ms) + ✓ Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (55 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (55 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (57 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (62 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (61 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (62 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (57 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (56 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (307 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (57 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (60 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (60 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (60 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (56 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (57 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (57 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (54 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (54 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (84 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (52 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (53 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (54 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (66 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (57 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (124 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (58 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (56 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (62 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (79 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (113 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (108 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (62 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (118 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (55 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (64 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (56 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (63 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (55 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (56 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.quebecnet.teztnets.com (56 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (280 ms) + ○ skipped Verify that rpcClient.getAllDelegates returns all delegates from RPC + ○ skipped Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block + ○ skipped Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block +``` + +**Otherwise, you will see which endpoints do not work for a specific node:** + +``` + Test calling all methods from RPC node: http://localhost:20000 + ✓ Verify that rpcClient.getBlockHash returns the head block hash (61 ms) + ✓ Verify that rpcClient.getLiveBlocks returns the ancestors of the head block (61 ms) + ✓ Verify that rpcClient.getBalance for knownBaker returns the spendable balance excluding frozen bonds (57 ms) + ✓ Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds (83 ms) + ✓ Verify that rpcClient.getBalanceAndFrozenBonds for knownBaker returns the full balance (58 ms) + ✓ Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getFullBalance for knownBaker returns the full balance (56 ms) + ✓ Verify that rpcClient.getStakedBalance for knownBaker returns the staked balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFinalizableBalance for knownBaker returns the unstaked finalizable balance (55 ms) + ✓ Verify that rpcClient.getUnstakedFrozenBalance for knownBaker returns the unstaked frozen balance (55 ms) + ✓ Verify that rpcClient.getUnstakeRequests for knownBaker returns the unstaked requests (55 ms) + ✓ Verify that rpcClient.getStorage for knownContract returns the data of a contract (57 ms) + ✓ Verify that rpcClient.getScript for know contract returns the code and data of a contract (62 ms) + ✓ Verify that rpcClient.getNormalizedScript for known contract returns the script of the contract and normalize it using the requested unparsing mode (61 ms) + ✓ Verify that rpcClient.getContract returns the complete status of a contract (62 ms) + ✓ Verify that rpcClient.getManagerKey for known baker returns the manager key of the contract (57 ms) + ✓ Verify that rpcClient.getDelegate for known baker returns the delegate of the contract (56 ms) + ✓ Verify that rpcClient.getBigMapExpr for encoded expression returns the value associated with a key in a big map (307 ms) + ✓ Verify that rpcClient.getDelegates for known baker returns information about a delegate from RPC (57 ms) + ✓ Verify that rpc.getVotingInfo for known baker returns voting information about a delegate from RPC (60 ms) + ✓ Verify that rpcClient.getConstants returns all constants from RPC (60 ms) + ✓ Verify that rpcClient.getBlock returns all the information about a block (60 ms) + ✓ Verify that rpcClient.getBlockHeader returns whole block header (56 ms) + ✓ Verify that rpcClient.getBlockMetadata returns all metadata associated to the block (57 ms) + ✓ Verify that rpcClient.getBallotList returns ballots casted so far during a voting period (57 ms) + ✓ Verify that rpcClient.getBallots returns sum of ballots casted so far during a voting period (54 ms) + ✓ Verify that rpcClient.getCurrentPeriod returns current period kind (54 ms) + ✓ Verify that rpcClient.getCurrentProposal returns current proposal under evaluation (84 ms) + ✓ Verify that rpcClient.getCurrentQuorum returns current expected quorum (52 ms) + ✓ Verify that rpcClient.getVotesListings returns list of delegates with their voting weight, in number of rolls (53 ms) + ✓ Verify that rpcClient.getProposals returns list of proposals with number of supporters (54 ms) + ✓ Verify that rpcClient.forgeOperations forges an operation and returns the unsigned bytes (66 ms) + ✓ Verify that rpcClient.injectOperation injects an operation in node and broadcast it (57 ms) + ✓ Verify that rpcClient.preapplyOperations simulates the validation of an operation (124 ms) + ✓ Verify that rpcClient.getEntrypoints for known contract returns list of entrypoints of the contract (58 ms) + ✓ Verify that rpcClient.getChainId returns chain ID (56 ms) + ✓ Verify that rpcClient.runOperation runs an operation without signature checks (62 ms) + ✓ Verify that rpcClient.simulateOperation simulates an operation without signature checks (79 ms) + ✓ Verify that rpcClient.runView executes tzip4 views (113 ms) + ✓ Verify that rpcClient.runScriptView executes michelson view (108 ms) + ✓ Verify that rpcClient.getSuccessorPeriod will get the voting period of next block (62 ms) + ✓ Verify that rpcClient.getSaplingDiffById will access the value associated with a sapling state ID (118 ms) + ✓ Verify that rpcClient.getSaplingDiffByContract will access the value associated with a sapling state (55 ms) + ✓ Verify that rpcClient.getProtocols will list past and present Tezos protocols (64 ms) + ✓ Verify that rpcClient.getStorageUsedSpace will retrieve the used space of a contract storage (56 ms) + ✓ Verify that rpcClient.getStoragePaidSpace will retrieve the paid space of a contract storage (63 ms) + ✓ Verify that rpcClient.ticketBalance will retrieve the specified ticket owned by the given contract (55 ms) + ✓ Verify that rpcClient.allTicketBalances will retrieve all tickets owned by the given contract (56 ms) + ✓ Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for https://rpc.quebecnet.teztnets.com (56 ms) + ✓ Verify that rpcClient.getPendingOperations v2 will retrieve the pending operations in mempool with property validated (280 ms) + ○ skipped Verify that rpcClient.getAllDelegates returns all delegates from RPC + ○ skipped Verify that rpcClient.getBakingRights retrieves the list of delegates allowed to bake a block + ○ skipped Verify that rpcClient.getAttestationRights retrieves the list of delegates allowed to attest a block +``` \ No newline at end of file diff --git a/website/versioned_docs/version-19.0.0/rpc_package.md b/website/versioned_docs/version-21.0.0/rpc_package.md similarity index 95% rename from website/versioned_docs/version-19.0.0/rpc_package.md rename to website/versioned_docs/version-21.0.0/rpc_package.md index b35eb99163..ad4e963c92 100644 --- a/website/versioned_docs/version-19.0.0/rpc_package.md +++ b/website/versioned_docs/version-21.0.0/rpc_package.md @@ -24,7 +24,7 @@ const client = new RpcClient(' https://ghostnet.tezos.ecadinfra.com/', 'NetXLH1u The `RpcClient` constructor takes the URL of the node you want to use and the chain ID. ```js -/* Fetching the balance of an account +/* Fetching the spendable balance of an account * using the client set up above */ const balance = await client.getBalance('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'); @@ -113,4 +113,4 @@ const view = await client.runView({ ## Full documentation -You can find the full documentation at the following address: [https://taquito.io/typedoc/classes/\_taquito_rpc.rpcclient.html](https://taquito.io/typedoc/classes/_taquito_rpc.rpcclient.html) +You can find the full documentation at the following address: [https://taquito.io/typedoc/classes/_taquito_rpc.RpcClient](https://taquito.io/typedoc/classes/_taquito_rpc.RpcClient) diff --git a/website/versioned_docs/version-19.0.0/sapling.md b/website/versioned_docs/version-21.0.0/sapling.md similarity index 100% rename from website/versioned_docs/version-19.0.0/sapling.md rename to website/versioned_docs/version-21.0.0/sapling.md diff --git a/website/versioned_docs/version-19.0.0/sapling_in_memory_spending_key.md b/website/versioned_docs/version-21.0.0/sapling_in_memory_spending_key.md similarity index 100% rename from website/versioned_docs/version-19.0.0/sapling_in_memory_spending_key.md rename to website/versioned_docs/version-21.0.0/sapling_in_memory_spending_key.md diff --git a/website/versioned_docs/version-19.0.0/sapling_in_memory_viewing_key.md b/website/versioned_docs/version-21.0.0/sapling_in_memory_viewing_key.md similarity index 100% rename from website/versioned_docs/version-19.0.0/sapling_in_memory_viewing_key.md rename to website/versioned_docs/version-21.0.0/sapling_in_memory_viewing_key.md diff --git a/website/versioned_docs/version-19.0.0/set_delegate.md b/website/versioned_docs/version-21.0.0/set_delegate.md similarity index 100% rename from website/versioned_docs/version-19.0.0/set_delegate.md rename to website/versioned_docs/version-21.0.0/set_delegate.md diff --git a/website/versioned_docs/version-19.0.0/signing.md b/website/versioned_docs/version-21.0.0/signing.md similarity index 68% rename from website/versioned_docs/version-19.0.0/signing.md rename to website/versioned_docs/version-21.0.0/signing.md index edfa044e48..02317cfccc 100644 --- a/website/versioned_docs/version-19.0.0/signing.md +++ b/website/versioned_docs/version-21.0.0/signing.md @@ -4,6 +4,9 @@ id: signing author: Claude Barde --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + Signing arbitrary chunks of data is a common practice in a blockchain environment and is usually done to prove that a user has access to a certain account or that a message comes from a certain account. This practice is still new on Tezos and the use cases are rare. However, as the interactions between users and smart contracts increase, knowing how to sign data and send the signature to a smart contract can set you one step ahead in your knowledge of the Tezos blockchain. @@ -48,12 +51,12 @@ const formattedInput: string = [ ].join(' '); ``` -After formatting the string properly, you can convert it into bytes, for example, with the `char2Bytes` function of the `@taquito/utils` package: +After formatting the string properly, you can convert it into bytes, for example, with the `stringToBytes` function of the `@taquito/utils` package: ```js -import { char2Bytes } from '@taquito/utils'; +import { stringToBytes } from '@taquito/utils'; -const bytes = char2Bytes(formattedInput); +const bytes = stringToBytes(formattedInput); const bytesLength = (bytes.length / 2).toString(16); const addPadding = `00000000${bytesLength}`; const paddedBytesLength = addPadding.slice(addPadding.length - 8); @@ -90,7 +93,7 @@ The wallet will return an object with a `signature` property that holds our sign Here is the full code to sign data with a wallet: ```ts -import { char2Bytes } from '@taquito/utils'; +import { stringToBytes } from '@taquito/utils'; import { RequestSignPayloadInput, SigningType } from '@airgap/beacon-sdk'; // The data to format @@ -107,7 +110,7 @@ const formattedInput: string = [ ].join(' '); // The bytes to sign -const bytes = char2Bytes(formattedInput); +const bytes = stringToBytes(formattedInput); const bytesLength = (bytes.length / 2).toString(16); const addPadding = `00000000${bytesLength}`; const paddedBytesLength = addPadding.slice(addPadding.length - 8); @@ -141,9 +144,90 @@ const isVerified = verifySignature( ); ``` +## Generating a TZIP-32 message signature + +The community have proposed [TZIP-32](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-message-signing/tzip-32.md)(draft), Off-Chain Message Signing, which aims to define a formal message signing standard that is simple, secure, extendable and compatible with hardware wallets. TZIP-32 can be further used in [TZIP-33](https://gitlab.com/tezos/tzip/-/blob/6483efc9e591960effe76f4ae996ec187bf13bf4/drafts/current/draft-sign-in-with-tezos.md)(draft) which is a [CAIP-122](https://chainagnostic.org/CAIPs/caip-122) compliant sign-in with Tezos standard. + +**Message encoding** + +This is the schema to encode the message into bytes, please read the [TZIP-32](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-message-signing/tzip-32.md) for more detail. + +| Name | Size | Contents | +|-----------------------|----------|-------------------------| +| magic_string | 30 bytes | bytes | +| # Bytes in next field | 1 byte | unsigned 8-bit integer | +| interface | variable | bytes | +| character_encoding | 1 byte | unsigned 8-bit integer | +| # Bytes in next field | 2 bytes | unsigned 16-bit integer | +| message | Variable | bytes | + +**Examples of signing TZIP-32 message on contractAPI and walletAPI** + +The Off-Chain Message Signing magic bytes is `0x80` defined in [TZIP-31](https://gitlab.com/tezos/tzip/-/blob/71be45d3ae2e15cec5c7a2f84feb88aac58fbe5e/drafts/current/draft-signer-requests/tzip-31.md)(draft). + + + + +```js live noInline +// import { TezosToolkit } from '@taquito/taquito' +// import { InMemorySigner } from '@taquito/signer' +// import { stringToBytes, num2PaddedHex } from '@taquito/utils'; +// const Tezos = new TezosToolkit('https://ghostnet.tezos.ecadinfra.com'); + +let magicByte = '0x80' +let magicString = 'tezos signed offchain message' +let interface_ = 'tzip://32' +let characterEncoding = '0' +let message = 'Hello world!' + +let bytes = stringToBytes(magicString) + num2PaddedHex(interface_.length, 8) + stringToBytes(interface_) + num2PaddedHex(Number(characterEncoding), 8) + num2PaddedHex(message.length, 16) + stringToBytes(message) + +InMemorySigner.fromSecretKey('edsk2rKA8YEExg9Zo2qNPiQnnYheF1DhqjLVmfKdxiFfu5GyGRZRnb') + .then((theSigner) => { + Tezos.setProvider({ signer: theSigner }); + return Tezos.signer.sign(bytes, new Uint8Array([parseInt(magicByte, 16)])) + }) + .then(signed => { + console.log(JSON.stringify(signed, null, 2)); + }) + .catch((error) => console.log(`Error: ${error} ${JSON.stringify(error, null, 2)}`)); +``` + + + + +```js live noInline wallet +// import { TezosToolkit } from '@taquito/taquito' +// import { InMemorySigner } from '@taquito/signer' +// import { stringToBytes, num2PaddedHex } from '@taquito/utils'; +// const Tezos = new TezosToolkit('https://ghostnet.tezos.ecadinfra.com'); + +let magicByte = '0x80' +let magicString = 'tezos signed offchain message' +let interface_ = 'tzip://32' +let characterEncoding = '0' +let message = 'Hello world!' + +let bytes = stringToBytes(magicString) + num2PaddedHex(interface_.length, 8) + stringToBytes(interface_) + num2PaddedHex(Number(characterEncoding), 8) + num2PaddedHex(message.length, 16) + stringToBytes(message) + +const payload = { + signingType: SigningType.RAW, + payload: magicByte + bytes +} +wallet.client.requestSignPayload(payload).then(signed => console.log(JSON.stringify(signed, null, 2))) +``` + + + + ## Signing Michelson data -Taquito also offers the possibility to sign Michelson code. This feature can be useful, for example, if you need to send a lambda to a contract to be executed but want to restrict the number of users who can submit a lambda by verifiying the signer's address. The signing of Michelson code requires the use of the `michel-codec` package: +Taquito also offers the possibility to sign Michelson code. This feature can be useful, for example, if you need to send a lambda to a contract to be executed but want to restrict the number of users who can submit a lambda by verifying the signer's address. The signing of Michelson code requires the use of the `michel-codec` package: ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; diff --git a/website/versioned_docs/version-19.0.0/smart_rollups.md b/website/versioned_docs/version-21.0.0/smart_rollups.md similarity index 52% rename from website/versioned_docs/version-19.0.0/smart_rollups.md rename to website/versioned_docs/version-21.0.0/smart_rollups.md index ee293057e2..c29f0caa83 100644 --- a/website/versioned_docs/version-19.0.0/smart_rollups.md +++ b/website/versioned_docs/version-21.0.0/smart_rollups.md @@ -1,6 +1,6 @@ --- title: Smart Rollups -author: Davis Sawali +author: Davis Sawali & Andrew Skubarenko --- # Smart Optimistic Rollups @@ -30,7 +30,7 @@ await op.confirmation(); - `kernel` is passed as a hexadecimal string examples can be found at [this tezos docs endpoint](https://tezos.gitlab.io/active/smart_rollups.html) - `parametersType` is a MichelsonV1Expression to define the type. -For more information in regards to Smart Rollup Origination please refer to the this [link](https://tezos.gitlab.io/active/smart_rollups.html#origination) +For more information in regards to Smart Rollup Origination please refer to this [link](https://tezos.gitlab.io/active/smart_rollups.html#origination) ## `smart_rollup_add_messages` @@ -62,4 +62,37 @@ const op = await Tezos.contract.smartRollupAddMessages({ await op.confirmation(); ``` -- `message` property receives an array of encoded outbox messages. \ No newline at end of file + +- `message` property receives an array of encoded outbox messages. + +## `smart_rollup_execute_outbox_message` + +The `Smart Rollup Execute Outbox Message` operation allows users to execute a transaction from a smart rollup to a smart contract on L1. + +### Usage + +To execute an outbox message you need the Smart Rollup address (`sr1` address), a serialized output proof, and a commitment hash. +You may obtain the serialized output proof and commitment hash through an RPC call to the Smart Rollup Node at the following URL: +`/global/block/head/helpers/proofs/outbox/${outboxMessageLevel}/messages?index=${outboxMessageIndex}` +Where: +* `outboxMessageLevel` is the Tezos level of the outbox message; +* `outboxMessageIndex` is the index (number) of the outbox message. + +The outbox message can only be executed when the corresponding commitment is cemented. + +### Example +```typescript +const op = await Tezos.contract.smartRollupExecuteOutboxMessage({ + rollup: 'sr1JZsZT5u27MUQXeTh1aHqZBo8NvyxRKnyv', + cementedCommitment: 'src13rFpXGRRwQTPRcvTA8Ka5avJMt6MCrCEodDTCvD65BVVEoShoh', + outputProof: '0300022a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc42a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc40005820764757261626c65d0fd4fa3d7652e389a9c14bbb6e953dfc6f24a9ccdecc03eeeccfcc0075501707203746167c00800000004536f6d650003c08fb36af2c3a3c484ef7def3b75bad4d006ca0c06352b49d50d536911cfbbacca820576616c7565810370766d8107627566666572738205696e707574820468656164c00100066c656e677468c00100066f75747075740004820132810a6c6173745f6c6576656cc004002c8f830133810f76616c69646974795f706572696f64c00400013b0082013181086f7574626f786573010e600107270103b5c08970095f2f084b393b1093c43734c9b8371807d58c3f5bd5098928d471b63b610101d000ec0071003200120009c075e2f509c2fb0a2df579d7bfb4d5485f535bb008ab32b1c1864e32bf668e87850004c0de4fa8f44890700c27f5bec943e3a52d9358b6546c5ed9536357d796584082ce0003820732393136393038820468656164c00100066c656e677468c0010007323932303239330003810468656164c001008208636f6e74656e7473810130c0d3000000cf00000000ca07070a0000001600000ff91d3da1fbeb517f3013deb5f53ceb3c79b2ec07070a0000001601a6938a03cf1d7652a7b871bd9c7c36b4655fa8030007070707000005090a0000005f05020000005907040100000010636f6e74726163745f616464726573730a0000001c050a000000160155275f943ba305902a52dbf648236db528e0f015000704010000000a746f6b656e5f747970650a0000000b0501000000054641312e32000101a6938a03cf1d7652a7b871bd9c7c36b4655fa80300000000087769746864726177066c656e677468c00101c01540203d8ed40eb550a640e0a93959284db1db2ae7a22d95cfcb7bf90655606ac0b7669db7270cf56b96a65db8a095be7800b68185ef3b2998ec2c62c5d2127574c00a83cbf5571a4df7c7fb7ad52c0e2488e7806cfcff0006b43d9abedc9c3f890dc09ae7b17d5faebe09f353bc3f7e1a67fed29710f70052e555e639a40932b16219c00df2b1cf98a44ba1724099c701f01f30db27c9f2b2f275c645a542141dc57d1bc0419dbdeb356925d5159c7ffb0b45fab6a2f68038106a1ded29485d5c83f076a4c007b1745e44e8f29e61de390bb77fde5f5c2930acb453b6dedfcb07e764e469e0c02bb1d1c11668833303d590910b72528ccc5ab8afda97f8494ca98c35eb6303f90134810d6d6573736167655f6c696d6974c002a401047761736dd02cdd11922873ef08de5097a6434a4404a4230a17b01c9c37a2647084270ee0632a083d060899be3e474393bcbac905b943eeee8230fbc15e67350880277eadc4002c8f650000000000ca07070a0000001600000ff91d3da1fbeb517f3013deb5f53ceb3c79b2ec07070a0000001601a6938a03cf1d7652a7b871bd9c7c36b4655fa8030007070707000005090a0000005f05020000005907040100000010636f6e74726163745f616464726573730a0000001c050a000000160155275f943ba305902a52dbf648236db528e0f015000704010000000a746f6b656e5f747970650a0000000b0501000000054641312e32000101a6938a03cf1d7652a7b871bd9c7c36b4655fa80300000000087769746864726177' +}); + +await op.confirmation(); +console.log(op.hash); +// Output: onyjJoL7TeSLy1AjWuLQVRqTWVc7pRhq4VhDyMQXXMTjuv7pEtV +``` + +- `rollup` is a rollup address (`sr1` address) +- `cementedCommitment` is a hash of cemented commitment +- `outputProof` is a serialized output proof containing the transaction to be executed on L1. diff --git a/website/versioned_docs/version-19.0.0/smartcontracts.md b/website/versioned_docs/version-21.0.0/smartcontracts.md similarity index 100% rename from website/versioned_docs/version-19.0.0/smartcontracts.md rename to website/versioned_docs/version-21.0.0/smartcontracts.md diff --git a/website/versioned_docs/version-21.0.0/staking.md b/website/versioned_docs/version-21.0.0/staking.md new file mode 100644 index 0000000000..bd3eae83fc --- /dev/null +++ b/website/versioned_docs/version-21.0.0/staking.md @@ -0,0 +1,164 @@ +--- +title: Staking and Adaptive Issuance +author: Alireza Haghshenas +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Staking and Adaptive Issuance + +Staking is an update to the "Proof of Stake" Mechanism in Tezos. + +Before Staking, the only way for Tez holders to participate in the network was by delegating their tokens to a baker. Delegated funds contributed to a delegate's voting and baking power, but were not subject to staking: they could not be slashed in case the baker misbehaved. This is a useful feature for many users, but limits the total amount of staked tez to the amount of tez that bakers themselves hold. In other words, participating in the "Proof of Stake" mechanism required setting up and maintaining a baker, which is a significant barrier to entry for many users. + +Staking changes this by allowing any user to participate in the "Proof of Stake" mechanism without setting up a baker. Users can now stake their tokens to their delegates, and their staked tokens will be subject to slashing in case of delegate/baker's misbehaviour. This allows the total amount of staked Tez to be much higher than the amount of tez that bakers themselves hold, which in turn increases the security of the network. + +Users can control their staked funds using the `stake`, `unstake`, and `finalize_unstake` operations. These are implemented as pseudo-entrypoints, and the parameters are passed to a transfer operation with the same destination as the sender. + +To accept staked funds, a delegate needs to have opted in to staking. This is done by `set_delegate_parameters`. This part is not supported by Taquito, as it is not a dApp operation. More information [here](https://tezos.gitlab.io/paris/adaptive_issuance.html#staking-policy-configuration). + +# Staking Funds +To stake your funds, you need to call the `stake` operation. +Before you can stake your funds, two conditions should be met: +1. You need yor have delegated your funds to a delegate before you can stake them (by calling [`setDelegate`](#set_delegate)) +1. Your delegate should accept staking by calling `set_delegate_parameters` + + + + + +```javascript + +const op = await Tezos.contract.stake({ + amount: 100, + mutez: false + }); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.stake({ + amount: 100, + mutez: false + }).send(); + await op.confirmation(); + +``` + + + + +# Unstaking Funds + +To unstake your funds, you need to call the `unstake` operation. This will change your fund's status to "Unstaked + Frozen" +The unstaked funds will still be frozen (and subject to slashing for 4 cycles). After that, your funds will be in "Unstaked + Finalizable" state. + + + + +```javascript + +const op = await Tezos.contract.unstake({ + amount: 50, + mutez: false + }); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.unstake({ + amount: 50, + mutez: false + }).send(); + await op.confirmation(); + +``` + + + + +# Finalizing Unstake + +To finalize your unstaked funds, you need to call the `finalize_unstake` operation. This will change your fund's status back to "spendable". + + + + +```javascript + +const op = await Tezos.contract.finalizeUnstake(); + await op.confirmation(); + +``` + + + + +```javascript + +const op = await Tezos.wallet.finalizeUnstake().send(); + await op.confirmation(); + +``` + + + + +# Additional Info and Some Notes + +## Cycle +A cycle is 24576 blocks in Paris protocol (will be 30720 in Quebec), and 10 seconds per block in Paris (will be 8 in Quebec). This means a cycle is about 2.8 days (and will stay the same after Quebec). This might change with the activation of newer protocols. + +## Overstaking +A delegate can set the maximum amount of staking they can accept, as a multiply of their own balance. If a delegate's limit is exceeded, the exceeding stake is automatically considered as delegation for the delegate's baking and voting power calculation, but it does remain slashable. That means it's your responsibility to make sure you're not overstaking. Remember that overstaking can even happen after you have staked successfully, because your delegate changes their own balance, or their staking parameter. + + +## Changing Delegate +When you change your delegate, your funds will be automatically unstaked. You will have to wait for 4 cycles before you can stake them again. + +## No need to finalize_unstake in some cases +The `stake` and `unstake` operations will automatically finalize all currently finalizable funds. + +## Adaptive Issuance +A concept related to staking is adaptive issuance. Adaptive issuance is a mechanism that adjusts the block reward based on the total amount of staked tez. In short, the reward will be adjusted to keep the staked funds about 50% of the total supply. To read more about the mechanism, you can check [this document](https://tezos.gitlab.io/quebec/adaptive_issuance.html#adaptive-issuance). + +## Staking Rewards +In delegation, rewards were given to the baker, and it was the baker's responsibility to distribute the rewards to the delegators. In staking, the rewards are given directly to the staker. However, rewards are not given immediately, but are distributed through staked (frozen) balance, and the user can spend the reward along with their initial stake when they `unstake` and `finalize_unstake`. + +## Lifetime of Staked Funds + +Before you stake some of your Tez, it is in "Spendable" state. When you stake it, it will be in "Staked" state. When you unstake it, it will be in "Unstaked + Frozen" state, this fund is still subject to slashing. After 4 cycles, it will be in "Unstaked + Finalizable" state. You can finalize it to make it "Spendable" again. + +```mermaid +graph LR +A[Spendable] -- "stake(amount)" --> B[Staked] +B -- "unstake(amount)" --> C[Unstaked + Frozen] +C -- wait 4 cycles --> D[Unstaked + Finalizable] +D -- finalize_unstake --> A +``` diff --git a/website/versioned_docs/version-19.0.0/storage_annotations.md b/website/versioned_docs/version-21.0.0/storage_annotations.md similarity index 100% rename from website/versioned_docs/version-19.0.0/storage_annotations.md rename to website/versioned_docs/version-21.0.0/storage_annotations.md diff --git a/website/versioned_docs/version-19.0.0/taquito_utils.md b/website/versioned_docs/version-21.0.0/taquito_utils.md similarity index 100% rename from website/versioned_docs/version-19.0.0/taquito_utils.md rename to website/versioned_docs/version-21.0.0/taquito_utils.md diff --git a/website/versioned_docs/version-19.0.0/testing_strategies.md b/website/versioned_docs/version-21.0.0/testing_strategies.md similarity index 100% rename from website/versioned_docs/version-19.0.0/testing_strategies.md rename to website/versioned_docs/version-21.0.0/testing_strategies.md diff --git a/website/versioned_docs/version-19.0.0/tezbridge_signer.md b/website/versioned_docs/version-21.0.0/tezbridge_signer.md similarity index 100% rename from website/versioned_docs/version-19.0.0/tezbridge_signer.md rename to website/versioned_docs/version-21.0.0/tezbridge_signer.md diff --git a/website/versioned_docs/version-19.0.0/tezos_domains.md b/website/versioned_docs/version-21.0.0/tezos_domains.md similarity index 89% rename from website/versioned_docs/version-19.0.0/tezos_domains.md rename to website/versioned_docs/version-21.0.0/tezos_domains.md index 61ad586e00..f2d5b8cfc9 100644 --- a/website/versioned_docs/version-19.0.0/tezos_domains.md +++ b/website/versioned_docs/version-21.0.0/tezos_domains.md @@ -16,7 +16,7 @@ If you have an address and you want to find the domain tied to it, the storage o ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { bytes2Char } from "@taquito/utils"; +import { bytesToString } from "@taquito/utils"; const domainContractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -27,7 +27,7 @@ const fetchTezosDomainFromAddress = async (address: string): Promise => const storage: any = await contract.storage(); const domain = await storage.store.reverse_records.get(address); if (domain) { - return bytes2Char(domain.name); + return bytesToString(domain.name); } else { return address; } @@ -37,7 +37,7 @@ const fetchTezosDomainFromAddress = async (address: string): Promise => 2 things to remember when you are looking for a Tezos domain in the storage of the contract: - the `reverse_records` bigmap is nested inside the `store` property -- the domain name is stored as bytes, so you can use the `bytes2Char` function from `@taquito/utils` to decode it as a string. +- the domain name is stored as bytes, so you can use the `bytesToString` function from `@taquito/utils` to decode it as a string. If we call the `fetchTezosDomainFromAddress` function with `tz1aauXT4uM8ZB3ouu5JrAenEMQdqfvDUSNH`, it will return `taquito.tez`. @@ -47,7 +47,7 @@ It is also possible to look up a domain name to find the address it references. ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { char2Bytes } from "@taquito/utils"; +import { stringToBytes } from "@taquito/utils"; const contractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -56,7 +56,7 @@ const fetchAddressFromTezosDomain = async (domainName: string): Promise const Tezos = new TezosToolkit("https://mainnet.tezos.ecadinfra.com"); const contract = await Tezos.wallet.at(contractAddress); const storage: any = await contract.storage(); - const domain = await storage.store.records.get(char2Bytes(domainName)); + const domain = await storage.store.records.get(stringToBytes(domainName)); if (domain) { return domain.address; // address that the domain points to // return domain.owner; // address that owns the domainName @@ -76,7 +76,7 @@ To find the expiry date, you can check the `expiry_map` bigmap under the `store` ```typescript import { TezosToolkit } from "@taquito/taquito"; -import { char2Bytes } from "@taquito/utils"; +import { stringToBytes } from "@taquito/utils"; const contractAddress = "KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS"; @@ -85,7 +85,7 @@ const fetchExpiryDate = async (domainName: string): Promise => { const Tezos = new TezosToolkit("https://mainnet.tezos.ecadinfra.com"); const contract = await Tezos.wallet.at(contractAddress); const storage: any = await contract.storage(); - const expiryDate = await storage.store.expiry_map.get(char2Bytes(domainName)); + const expiryDate = await storage.store.expiry_map.get(stringToBytes(domainName)); if (expiryDate) { return expiryDate; } else { diff --git a/website/versioned_docs/version-19.0.0/tickets.md b/website/versioned_docs/version-21.0.0/tickets.md similarity index 100% rename from website/versioned_docs/version-19.0.0/tickets.md rename to website/versioned_docs/version-21.0.0/tickets.md diff --git a/website/versioned_docs/version-21.0.0/timelock.md b/website/versioned_docs/version-21.0.0/timelock.md new file mode 100644 index 0000000000..cd241bf121 --- /dev/null +++ b/website/versioned_docs/version-21.0.0/timelock.md @@ -0,0 +1,221 @@ +--- +title: Timelock (BETA) +author: Davis Sawali & Hui-An Yang +--- + +:::warning +This feature is a work in progress and might go through refinements in the near future. We encourage Taquito users to try this feature and reach out to us if you have any issues or concerns. +::: + +Timelock is a cryptographic primitive that can be used as a part of a commit & reveal scheme, it provides a guarantee that the information associated to the commit phase is eventually revealed. + +## Commit & Reveal +A classic commit & reveal scheme consists of these 2 stepsL +- Before the deadline, each participant makes a decision and publishes a commitment, which is proof that they have made a decision that they are unable to change. The proof is the hash of the data they have decided on. +- After the deadline, each participant reveals the data corresponding to their commitment. Other participants will be able to check that the hash of this data is indeed the same as the previous commitment + +This scheme makes it possible to prove a certain decision was made before the information is revealed. This information might be the decision of other participants, or some external independent information. + +above excerpt, taken from [here](https://docs.tezos.com/smart-contracts/data-types/crypto-data-types#classical-commit--reveal-scheme) + +## Taquito Implementation + +### Creating a chest +``` +import { Chest } from '@taquito/timelock' + +const time = 10000; +const payload = new TextEncoder().encode('message'); +const { chest, key } = Chest.newChestAndKey(payload, time); + +const chestBytes = chest.encode(); +const keyBytes = key.encode(); +``` + +### Create a chest from an existing Timelock +``` +import { Chest, Timelock } from '@taquito/timelock'; + +// ... +const time = 10000; +const precomputedTimelock = Timelock.precompute(time); // can be cached +const { chest, key } = Chest.fromTimelock(payload, time, precomputedTimelock); + +const chestBytes = chest.encode(); +const keyBytes = key.encode(); +``` + +### Opening a chest with an existing key +``` +import { Chest, ChestKey} from '@taquito/timelock'; + +//... +const time = 10000; +const [chest] = Chest.fromArray(chestBytes); +const [chestKey] = ChestKey.fromArray(chestKeyBytes); +const data = chest.open(chestKey, time); + +``` + +**Important Notes**: +- `time` param being passed should not be mistaken with the 'time' it takes for a chest to open in Timelocks. The `time` param here relates to a complexity relating to the number of power by modulo operations required to compute the key. Without getting too much into the weeds, we recommend using a value of `10000` and adjust accordingly. +- `payload` relates to the message payload you would like to lock in a chest + +## Coinflip Contract Example +This example is an excerpt from [Tezos docs](https://tezos.gitlab.io/active/timelock.html?highlight=timelock#example) and contracts are taken from [timelock_flip.tz](https://gitlab.com/tezos/tezos/-/blob/master/src/proto_alpha/lib_protocol/contracts/timelock_flip.tz). + +This game emulates a time constrained "guess who" game using timelocks. The goal of the game is for the challenger to guess which value was stored by the administrator. The challenger has one guess, and must submit it within 10 blocks of the game initialization. + +Please note that the contract used in this example is for educational purposes only and might not be secure. + +Its storage consists of 4 values, `level` and `chest` that relates to the initial value stored in the timelock during the start of the game. `guess` that relates to what value the player guesses to be the result of the coinflip, and `result` that indicates the status of the game. + +### Contract in Micheline +``` +storage (pair (nat %level) chest (bytes %guess) (bytes %result)); +parameter ( or (chest %initialize_game) (or (bytes %guess) (chest_key %finish_game))); +code { UNPAIR 5; + IF_LEFT { # If we receive a chest, + # we reinitialise the storage + # with the new chest and current level. + DIP {DROP 4}; + PUSH bytes 0xA0; + DUP; + PAIR; + SWAP; + LEVEL; + PAIR 3} + { IF_LEFT { # If we receive a guess, + SWAP; + DUP; + PUSH nat 10; + ADD; + LEVEL; + COMPARE; + LE; + IF { # we store the guess if current level < stored level + 10 + DIP 2 {PUSH bytes 0xB0}; + DIP {PAIR; SWAP; PAIR}; + PAIR; + DIP {DROP 2}; + } + { # else we keep the storage unchanged. + SWAP; + DROP; + PAIR 4}; + } + { # If we receive a chest_key, + # we open the chest. + DIP 4 {DROP}; + DUP 3; + SWAP; + DIP 2 {PUSH nat 1024}; + OPEN_CHEST; + IF_SOME { # If the chest opens successfully, + # we compare the guess with the locked value. + DUP 4; + COMPARE; + EQ; + IF { # If they are equal we store 0x00 + PUSH bytes 0x00} + { # else we store 0x01 + PUSH bytes 0x01}} + { # We store 0x10 in case of failure + PUSH bytes 0x10}; + DIG 3; + PAIR; + DIG 2; + PAIR; + DIG 1; + PAIR; + }; + }; + NIL operation; + PAIR; + } +``` + +### Originate the coinflip contract +Let's originate the contract with initial storage values `level` of 0, a stub chest, `guess` value of 'ff' and `result` 'ff'. + +`timelockCode` and `timelockStorage` can be found [here](https://github.com/ecadlabs/taquito/blob/master/integration-tests/data/timelock-flip-contract.ts) + +``` +// import { TezosToolkit } from '@taquito/taquito'; +// import { Chest } from '@taquito/timelock'; +// import { stringToBytes } from '@taquito/utils'; +// import { timelockCode, timelockStorage } from './timelock-flip-contract'; + +// const Tezos = new TezosToolkit('https://ghostnet.tezos.ecadinfra.com'); + +const originate = await Tezos.contract.originate({ code: timelockCode, init: timelockStorage }); +await originate.confirmation() +contract = await originate.contract(); +const originateStorage: any = await contract.storage() + +// originateStorage = { +// '1': 'caa0f4fdc993f1c39f8e89d6e29df8d09685b6faeccd99ddc99cc9ad9381f3ca86c8a7b98590da80eeefec83f4ebf8e7fcfc92daeee5d5d8cfdedfdbcdd0849a9cf793e8fbc6c389e6f3e783caf7a3b7bea69c81acb9d3afc9b9a186f8f4fda4d0a8a9d0b6dbac88e3f4cef6d0fe81c8afde84bf99d0e48ec589e8f8b587fda9f8ee85ef89a5ddc9eccdf3fc8df8c894c8e7dfceff9bc7a482cb83f78caaa6989d9db1a68ff7b99aa490eca285ff87a1b3ecf8d7b7d0f992f0d4aad2b7e7a3ba9fc794d5d098cfa7b79fdefda19b84e78fd98dec8fb18aaee9cc92b8d49f90e5cab2ab86ad9f9c8ced94d1bdecb38cd5b7e59ca5e9ec9face6fcacc9cab3adad97e0df99d7f8b1b0f9fbeab892c8989091c3b1b7ec98aaa7918acfe081e9d6fd98f3d0c201ae8e0f0470e26cfd98d461a07d506a0ec5f45dcbaed3b43a000000113f7d9ccf48b510e34b2c32532e3874f354', +// level: BigNumber { s: 1, e: 0, c: [ 0 ] }, +// guess: 'ff', +// result: 'ff' +// } +``` + +### Initialize the game +Let us now generate `chest` and `chestKey` with a complexity of `1024`, and a payload message 'hi'. + +Make a contract call to initialize the game, and the contract will update the storage values for `level` to be at head block, `chest` to point to the `chest` we generated, and both `guess` and `result` as 'a0'. + +``` +... +const time = 1024 +const message = 'hi' +const payload = new TextEncoder().encode(message); +const { chest, Key } = Chest.newChestAndKey(payload, time); +let init = await contract.methodsObject.initialize_game(chest.encode()).send() +await init.confirmation() +const initStorage: any = await contract.storage() + +// initStorage = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: 'a0', +// result: 'a0' +// } +``` + +### Submitting our guess +Let us now make a contract call to the `guess` entrypoint with a payload message 'hi' that will update the storage values of `guess` to `6869`, and `result` to 'b0'. + +``` +... +let guess1 = await contract.methodsObject.guess(stringToBytes(message)).send() +await guess1.confirmation() +const storageGuess: any = await contract.storage() + +// storageGuess = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: '6869', +// result: 'b0' +// } +``` + +### Revealing the time-locked value with `chestKey` +We can now make a contract call to the `finish_game` entrypoint with a `chestKey` to open the timelock. If successful, the contract will compare the value of `guess` to the timelock message. If the bytes are equal, the message is updated to `0x00`. If false, it would be updated to `0x01`. + +If the chest opening fails, the message will be updated to `0x10`. + +``` +... +let finish = await contract.methodsObject.finish_game(key.encode()).send() +await finish.confirmation() +const storageFinish: any = await contract.storage() + +// storageFinish = { +// '1': 'd3b9d5b9f5e6ece3a2df808cf5b29faf9ff0cf97b6c4c09fa0f8b79d83fdbcf5e8babccf90f9a29edb8ec1beaeb09eeeacd3f0998cd0a0e7e8c997d8afe0fee1f992f498d6d4d5fff39bdbfac3c2f194bebdf886d586bfdea8bbe0bac3aeb9f7daa4cdd6fda58d83f7c7f29affaa98e5c4cfd8da92c8ace4ce8f93e68486c18384a9bc85a7a9d0e7dace83ebeec4dde9e6f7dee388f0f49396bbe7c6faa1fe9debcef8bbb0d4cfe99e9cf897e8d4d7f586d895adafc9fdf3bfa386ff8d998af7f6c2c3b8eee9f188d9ddaab9da9797acd9f496e7b0d4a5a888ec9599cf95bdcd828df4f98e8e97f0d493c7bc84e9b3d1f5d2f2abf4f4b9dec2c88fa7c4b3f4fae1a4a7b7c0e1a182a495e8a9fdcee7b3cccdbd95f7eca5ac82c5f695bbd4e3d4d4d2b9d10945902c927e25e24e2390c8adee79fcbf989f3c06d260bcc300000012fa6f8fc2a7fc18bc30e1e491f8995e0dbf13', +// level: BigNumber { s: 1, e: 6, c: [ 1140114 ] }, +// guess: '6869', +// result: '00' +// } +``` diff --git a/website/versioned_docs/version-19.0.0/transaction_limits.md b/website/versioned_docs/version-21.0.0/transaction_limits.md similarity index 100% rename from website/versioned_docs/version-19.0.0/transaction_limits.md rename to website/versioned_docs/version-21.0.0/transaction_limits.md diff --git a/website/versioned_docs/version-19.0.0/tutorial.md b/website/versioned_docs/version-21.0.0/tutorial.md similarity index 96% rename from website/versioned_docs/version-19.0.0/tutorial.md rename to website/versioned_docs/version-21.0.0/tutorial.md index 84905bdf3f..7084ccdb3a 100644 --- a/website/versioned_docs/version-19.0.0/tutorial.md +++ b/website/versioned_docs/version-21.0.0/tutorial.md @@ -105,7 +105,7 @@ tezosToolkit.tz.getBalance("tz1YvE7Sfo92ueEPEdZceNWd5MWNeMNSt16L").then(balance }); ``` -Running `npx ts-node index.ts` should now show the balance of the specified address. This balance is in units of Mutez (micro Tez). Tez is the currency of Tezos, its code is `XTZ`, and the symbol is `ꜩ`. 1 Tez is 1,000,000 Mutez. +Running `npx ts-node index.ts` should now show the spendable balance of the specified address. This balance is in units of Mutez (micro Tez). Tez is the currency of Tezos, its code is `XTZ`, and the symbol is `ꜩ`. 1 Tez is 1,000,000 Mutez. Congratulations! You have just interacted with the Tezos blockchain using Taquito. In the next section, we will establish a high-level understanding of the blockchain, Tezos, dApps, and Taquito. If you are already familiar with these concepts, you can skip to [Sending a Transfer operation to the blockchain using Taquito](#sending-operations). @@ -239,7 +239,7 @@ For the purpose of this section, I have created a new address and funded it on t
How to create my own public/private key pair? - + Most users can simply use a wallet to create addresses. This is useful for dApps that run inside a browser. If you are running a dApp as a desktop, mobile, or server process, you can create your own key pair. Here is how you can do it: ```bash @@ -409,7 +409,7 @@ git commit -m "initial commit" In the next step, we add Taquito and Beacon SDK to the React app, and create a minimal UI to connect to the wallet and transfer ꜩ. ```bash -npm i @taquito/taquito @taquito/beacon-wallet +npm i @taquito/taquito @taquito/beacon-wallet @airgap/beacon-dapp ``` Open the file `index.html` and make the following changes: @@ -501,6 +501,7 @@ const ConnectButton = ({ name: "My dApp", preferredNetwork: NetworkType.GHOSTNET, disableDefaultEvents: false, + enableMetrics: true, }); Tezos.setWalletProvider(wallet); setWallet(wallet); @@ -601,52 +602,21 @@ export default Transfer; The libraries Taquito and Beacon SDK are designed to run in a Node.js environment. However, we are running them in a browser. This causes some issues. For example, the Beacon SDK uses the Node.js `buffer`, `stream`, and `util` modules. These modules are not available in the browser. Fortunately, there are browser-compatible versions of these modules. We can use these versions instead of the Node.js versions. To do this, we need to install the following packages: ```bash -npm i buffer stream-browserify util +npm i -D vite-plugin-node-polyfills ``` -Now we need to tell Vite to use these packages instead of the Node.js versions. To do this, open the file `vite.config.ts` and add the following code: +Now we need to tell Vite to use this plugin. To do this, open the file `vite.config.ts` and add the following code: -```tsx +```ts import { defineConfig } from 'vite' -import react from "@vitejs/plugin-react"; +import react from '@vitejs/plugin-react' +import { nodePolyfills } from 'vite-plugin-node-polyfills' export default defineConfig({ - define: { - global: {}, - }, - build: { - commonjsOptions: { - transformMixedEsModules: true, - }, - }, - plugins: [react()], - resolve: { - alias: { - buffer: "buffer", - stream: "stream-browserify", - util: "util", - }, - }, + plugins: [react(), nodePolyfills()], }); ``` -Also, create a file named `src/polyfills.ts` and add the following code: - -```tsx -import { Buffer } from "buffer"; - -globalThis.Buffer = Buffer; -``` -Also, make the following modification to the file `index.html`: - -```diff -
-+ - - - -``` - ### Running the dApp Make sure that the command `npm run dev` is still running in the terminal, and that there are no build errors. diff --git a/website/versioned_docs/version-19.0.0/tutorial_links.md b/website/versioned_docs/version-21.0.0/tutorial_links.md similarity index 100% rename from website/versioned_docs/version-19.0.0/tutorial_links.md rename to website/versioned_docs/version-21.0.0/tutorial_links.md diff --git a/website/versioned_docs/version-19.0.0/tzip12.md b/website/versioned_docs/version-21.0.0/tzip12.md similarity index 92% rename from website/versioned_docs/version-19.0.0/tzip12.md rename to website/versioned_docs/version-21.0.0/tzip12.md index b59f951c26..bcbc463059 100644 --- a/website/versioned_docs/version-19.0.0/tzip12.md +++ b/website/versioned_docs/version-21.0.0/tzip12.md @@ -144,7 +144,7 @@ values={[ ```js live noInline // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -161,10 +161,10 @@ Tezos.contract.at(contractAddress, tzip16) return views['token_metadata']().executeView(tokenId) }).then (result => { console.log('Result of the view token_metadata:'); - console.log(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - console.log(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - console.log(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - console.log(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + console.log(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + console.log(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + console.log(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + console.log(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` @@ -173,7 +173,7 @@ Tezos.contract.at(contractAddress, tzip16) ```js live noInline wallet // import { TezosToolkit } from '@taquito/taquito'; -// import { Tzip16Module, tzip16, bytes2Char } from "@taquito/tzip16"; +// import { Tzip16Module, tzip16, bytesToString } from "@taquito/tzip16"; // const Tezos = new TezosToolkit('rpc_url'); Tezos.addExtension(new Tzip16Module()); @@ -190,10 +190,10 @@ Tezos.wallet.at(contractAddress, tzip16) return views['token_metadata']().executeView(tokenId) }).then (result => { console.log('Result of the view token_metadata:'); - console.log(`name: ${bytes2Char((Object.values(result)[1]).get('name'))}`); - console.log(`decimals: ${bytes2Char((Object.values(result)[1]).get('decimals'))}`); - console.log(`symbol: ${bytes2Char((Object.values(result)[1]).get('symbol'))}`); - console.log(`extra: ${bytes2Char((Object.values(result)[1]).get('extra'))}`); + console.log(`name: ${bytesToString((Object.values(result)[1]).get('name'))}`); + console.log(`decimals: ${bytesToString((Object.values(result)[1]).get('decimals'))}`); + console.log(`symbol: ${bytesToString((Object.values(result)[1]).get('symbol'))}`); + console.log(`extra: ${bytesToString((Object.values(result)[1]).get('extra'))}`); }) .catch(error => console.log(`Error: ${JSON.stringify(error, null, 2)}`)); ``` diff --git a/website/versioned_docs/version-19.0.0/tzip16-sequence-diagram.md b/website/versioned_docs/version-21.0.0/tzip16-sequence-diagram.md similarity index 100% rename from website/versioned_docs/version-19.0.0/tzip16-sequence-diagram.md rename to website/versioned_docs/version-21.0.0/tzip16-sequence-diagram.md diff --git a/website/versioned_docs/version-19.0.0/validators.md b/website/versioned_docs/version-21.0.0/validators.md similarity index 100% rename from website/versioned_docs/version-19.0.0/validators.md rename to website/versioned_docs/version-21.0.0/validators.md diff --git a/website/versioned_docs/version-19.0.0/version.md b/website/versioned_docs/version-21.0.0/version.md similarity index 92% rename from website/versioned_docs/version-19.0.0/version.md rename to website/versioned_docs/version-21.0.0/version.md index c822090911..efed468441 100644 --- a/website/versioned_docs/version-19.0.0/version.md +++ b/website/versioned_docs/version-21.0.0/version.md @@ -2,6 +2,275 @@ title: Versions author: Jev Bjorsell --- + +# Taquito v21.0.0 +## Summary + +### Quebec Protocol Support + +### New Features +`@taquito/rpc` - Added `getSpendable`, `getBalanceAndFrozenBonds` and `getSpendableAndFrozenBonds` rpc endpoint #3023 + +### Improvement +`@taquito/rpc` - Updated `getPendingOperations` with param `source` and `operationHash` #3034 +`@taquito/rpc` - Added Quebec protocol constant, `ConstantsResponseProto021`, to `ConstantsResponse` #3037 +`@taquito/rpc` - Removed endorsement compatibility (still kept rpc types and readProvider for user querying old blocks) #3036 + +### Documentation +Updated documentation with Quebec support #3068 +Fixed maps_bigmaps live code example bugs #3068 + +### Internals +Updated dependencies #3068 +Updated Taquito test dapp with Quebec support #3068 + +# Taquito v20.1.2 +## Summary + +### Node.js add support of v18 +There is a [node.js confirmed HTTP bug](https://github.com/nodejs/node/issues/47228) from v19 that occasionally causes HTTP requests to fail with a socket hang-up error. +We decided to support node.js v18 again until this issue is resolved in the future node.js release #3098 + +### Documentation +Fixing typo #3094 + +# Taquito v20.1.1 +## Summary + +### Beacon version Update +Updated Beacon version to v4.3.1 #3087 + +### ECAD Infra Tezos RPC addresses update +Updated network addresses for mainnet, ghostnet, parisnet, and quebecnet from Old format: https://${network_name}.ecadinfra.com to New format: https://${network_name}.tezos.ecadinfra.com #3090 + +- Mappings +Below are the mappings for the updated RPC addresses for all current networks: + +Old Address | New Address +-- | -- +https://mainnet.ecadinfra.com | https://mainnet.tezos.ecadinfra.com +https://ghostnet.ecadinfra.com | https://ghostnet.tezos.ecadinfra.com +https://parisnet.ecadinfra.com | https://parisnet.tezos.ecadinfra.com +https://quebecnet.ecadinfra.com | https://quebecnet.tezos.ecadinfra.com + +- Action Required +Update all scripts, configurations, and codebases using the old RPC addresses to point to the new format. +Validate that your systems and services using these RPC endpoints continue to function as expected after the update. + +- Deprecation Notice +The old addresses are considered deprecated, but will remain active until further notice. Users are strongly encouraged to transition to the new format as soon as possible to avoid potential disruptions in the future. + +- Reference +For more information, visit [ECAD Infra's website](https://www.ecadinfra.com/). +-------- +Please ensure your systems are updated promptly to avoid any disruptions. If you have any questions or encounter issues, feel free to contact the ECAD Infra team or open a new issue in this repository. + +# Taquito v20.1.0 + +**Breaking changes:** +* We removed `account` public property on `BeaconWallet` class. If you'd like to get the info, please use `subscribeToEvent` with `BeaconEvent.ACTIVE_ACCOUNT_SET` +* We migrated `Node.js` support from LTS18 to LTS20 and above + +## Summary +### New features +* `@taquito/taquito` - Supported operation `transferTicket` in walletAPI PR #3003 + +### Improvement +* `@taquito/taquito` - Exported SmartRollupExecuteOutboxMessageParams PR #3031 +* `@taquito/beacon-wallet` - reverted `subscribeToEvent` of `ACTIVE_ACCOUNT_SET` in the package to ensure users will get a console warning, if they didn't subscribe events themselves PR #2987 +* `@taquito/rpc` - Updated rpc type `FrozenStaker` with `Baker_edge` PR #2987 +* `@taquito/rpc` - Updated rpc type `METADATA_BALANCE_UPDATES_CATEGORY` and`OperationMetadataBalanceUpdates` to have backwards compatible PR #2987 + +### Documentation +* Updated `michelson_encoder` documentation with section `#flattening-nested-tokens-pairunion` PR #3002 +* Updated `signing` documentation with section `#generating-a-tzip-32-message-signature` PR #2879 + +### Testing +* @taquito/beacon-wallet - Added broadcast-channel mock for @airgap/beacon-transport-postmessage in unit test +* Removed flextesa tests from CI workflow PR #3001 +* Fixed tzip16 test with new public IPFS gateway domain PR #3033 +* Updated staking and failing_noop integration tests to be robust PR #3033 + +### Internals +* `@taquito/http-utils` Configured the `fetch` call to be `keepalive=false` to fix socket hangup errors after node19 PR #2986 +* Updated denpendencies PR #3018 #3038 #3043 #3052 +* Removed taquito-test-dapp parisnet label on staking operations PR #3033 +* Removed Netlify references after migrating to Cloudflare PR #3012 + +# Taquito v20.0.0 +## Summary + +### Paris(B) Protocol Support +Paris(B) Protocol has new Adaptive Issuance features, including staking pseudo-operations and rpc endpoints. + +⚠️ Warning ⚠️ +Adaptive Issuance, Staking, and Adaptive slashing will be in effect roughly two weeks (5 cycles) after the proposal is activated on Mainnet. The new AI features will not be usable until then. + +### ⚠️ Breaking Changes ⚠️ + +### Beacon Migration +As of Beacon version 4.2.0, Beacon has migrated from using `dAppClient.getActiveAccount()` to using an event subscription method `BeaconEvent.ACTIVE_ACCOUNT_SET` for handling active account changes. + +**IF YOU ARE STILL USING THE `eventHandlers` PROPERTY WHEN INITIALIZING A DAPP CLIENT, PLEASE UPDATE YOUR CODE.** + +``` +const wallet = new BeaconWallet(options); +await wallet.client.subscribeToEvent(BeaconEvent.ACTIVE_ACCOUNT_SET, (data) => { + // your logic to update your state + console.log(data.address); + console.log(data.network.type); +}); +await wallet.requestPermissions(); +``` +### Michelson-encoder +We fixed a bug in `@taquito/Michelson-encoder` when there are nested `pair` and `or` without having `annots` consistently; the indexing key will have unexpected behaviour as below. This is an API behaviour-breaking change; if your dApp depends on the old behaviour or changing is too much effort, you can configure your `TezosToolkit` with `Tezos.setFieldNumberingStrategy('Legacy')` to keep the previous behaviour. But please note that this option might be removed in a future release. + +Previous behaviour - inner object's field numbers depend on the object's location in its parent, and start with '2' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '2': 'thirdValue', + '3': 'fourthValue' + } +} +``` +New behaviour - inner object's field number will start with '0' +``` +{ + '0': 'firstValue', + '1': 'secondValue, + '2': { + '0': 'thirdValue', + '1': 'fourthValue' + } +} +``` + +### New Features +- `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API. This includes support for `prepareProvider`, `estimationProvider`, and `rpcContractProvider` #2886 +- `@taquito/taquito` - Added staking related pseudo operations (stake, unstake, finalize_unstake) to the Wallet API #2921 +- `@taquito/rpc` - Added various RPC endpoints related to Adaptive Issuance (Staking) #2676 #2678 +- `@taquito/rpc` - Updated return types for several RPC endpoints related to the Paris protocol update #2887 +- `@taquito/rpc` - Removed `getEndorsingRights` RPC endpoint along with its related type definition and tests #2884 +- `@taquito/rpc` - Updated RPC types for `AttestationWithDal` and `EndorsementWithDal` #2880 +- `@taquito/rpc` - Updated RPC response types to support DAL types #2882 +- `@taquito/rpc` - Updated RPC response type for the new manager op `dal_publish_commitment` #2881 +- `@taquito/rpc` - Added a new RPC endpoint called `getAllDelegates` #2976 +- `@taquito/local-forging` - Added local forging support for `AttestationWithDal` operation #2880 +- `@taquito/local-forging` - Added local forging support for the new manager operation `dal_publish_commitment` #2881 +- `@taquito/michel-codec` - Updated Michelson type definitions and validators to include the new Paris protocol ticket literals [PR#2940](https://github.com/ecadlabs/taquito/pull/2940) + +### Internals +- Updated protocol constants integration test for Paris protocol #2869 +- Configured keygen and integration test configs for Paris protocol #2888 +- Added forger integration test for protocol migrations #2850 +- Updated `@taquito/beacon-wallet` to use event subscription instead of `getActiveAccount()` #2958 +- Updated some website dependencies [PR#2961](https://github.com/ecadlabs/taquito/pull/2961) +- Updated Beacon wallet dependency to the latest version `v4.2.2` (includes Paris protocol definitions) [PR#2956](https://github.com/ecadlabs/taquito/pull/2956) +- Fixed nested `pair` and `or` indexing bug #2927 +- Added a test-dapp case to transfer ghostnet tez to etherlink address #2944 +- Updated the Paris protocol hash to reflect the latest Octez fix [PR](https://github.com/ecadlabs/taquito/pull/2974) + +### Documentation +- Updated documentation for new Adaptive Issuance related features [PR#2928](https://github.com/ecadlabs/taquito/pull/2928) +- Added Tezos Foundation public testnet nodes to rpc_nodes on website #2933 + + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Contract API + +```javascript +const op = await Tezos.contract.stake({ + amount: 100 +}); +await op.confirmation(); +``` + +### `@taquito/taquito` - Added staking pseudo operations (stake, unstake, finalize_unstake) to the Wallet API + +```javascript +const op = await Tezos.wallet.stake({ + amount: 100, + mutez: false +}).send(); +await op.confirmation(); +``` + +# Taquito v19.2.0 + +**Breaking Changes**: (if applicable) + +## Summary + +### New Features +- `@taquito/timelock`- A new package for Timelocks have been introduced #2843. Users will now be able to create Chests, unlock Chests, and utilize Chests. For more information, please refer to this [document](https://taquito.io/docs/next/timelock) +- `@taquito/beacon-wallet` - the `beacon-wallet` package is now bundled in a `.zip` file for [PR#2860](https://github.com/ecadlabs/taquito/pull/2860) + +### Documentation +- UX improvements to search funtionality on the Taquito website #2858 +- Simplify tutorial for building dApps [PR#2852](https://github.com/ecadlabs/taquito/pull/2852) +- Updated several documentation blobs on the Taquito website [PR#2860](https://github.com/ecadlabs/taquito/pull/2860) +- Fixed several live code examples in the Taquito website [PR#2877](https://github.com/ecadlabs/taquito/pull/2877) +- Changed Taquito documentation website domain from `tezostaquito.io` to `taquito.io` [PR#2876](https://github.com/ecadlabs/taquito/pull/2876) + +### Internals +- Re-added Flextesa test scripts run `drain_delegate` and `ballot` operations' integration test against a Nairobi sandbox #2851 +- Updated Airgap's Beacon package to version 4.2.1. For more information on the release, click [here](https://github.com/airgap-it/beacon-sdk/releases/tag/v4.2.1) [PR#2874](https://github.com/ecadlabs/taquito/pull/2874) +- Changed website build command for CloudFlare [PR#2804](https://github.com/ecadlabs/taquito/pull/2804) + +# Taquito v19.1.0 + +**Potential Breaking Changes**: +- `@taquito/rpc` - replaced `OperationBalanceUpdatesItem` in favour of `OperationMetadataBalanceUpdates` #2817 #2827 +- `@taquito/taquito` - Several optimizations made to fees and estimation in Taquito #2532 + - removed `DEFAULT_GAS_LIMIT`, `DEFAULT_STORAGE_LIMIT`, `DEFAULT_FEE` in favour of `getRevealFee`, more details + - Added a small buffer to `gasLimit` (varying depending on operations) + - Reduced `suggestedFeeMutez` buffer from 100 to 20 per op + - Refined `gasLimit` and `storageLimit` according to `simulate_operation` results from the octez-client + +## Summary + +### New Features +- `@taquito/taquito` - Added smart rollup execute outbox message operation #2321 (please note that this feature is not fully tested due to some parts requiring the use of `octez-client`) +`@taquito/beacon-wallet` - added beacon-wallet bundle script to output a `.zip` bundle for browser only environments #2744 + +### Improvement +- `@taquito/michelson-encoder` - replaced references of `[['unit']]` to be `UnitValue` instead [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) +- `@taquito/taquito` - added 20 storageLimit buffer to prevent `storage_exhausted` error #2854 +- `@taquito/taquito` - removed the storageLimit cap mechanism #2855 + +### Documentation +- Added michel-codec to Typedoc documentation #2806 +- Updated `docs` and `examples` to use `methodsObject` instead of `methods` wherever needed [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) +- Removed `giganode` references from Taquito documentation [PR#2813](https://github.com/ecadlabs/taquito/pull/2813) + +### Deprecation +- `@taquito/utils` - Deprecated several util methods and updated their names into something more representative. Slight improvements to existing util methods #2372 #2274 +- `@taquito/taquito` - Deprecated `methods` in favour of `methodsObject`. `methodsObject`'s syntax is more consistent with storage params, supports all Michelson data types, and will be maintained going forward #2813 + +### Internals +- Updated various dependencies in Taquito website and the Test DApp (Sass, Firebase, Algoliasearch, Dotenv) [PR#2834](https://github.com/ecadlabs/taquito/pull/2834) +- Updated integration tests to use network types instead of hard coding RPC URL #2164 +- Organized integration tests into more meaningful subfolders and renamed some files for brevity #2203 +- Resolved dependabot updates [PR#2849](https://github.com/ecadlabs/taquito/pull/2849) +- Added confirmation blocks on older integration tests [PR#2847](https://github.com/ecadlabs/taquito/pull/2847) +- Added small buffer to operation reveal fee fixed value [PR#2848](https://github.com/ecadlabs/taquito/pull/2848) + +# Taquito v19.0.2 + +### Bug Fixes +- `@taquito/local-forging` - Added the correct constants for staking/unstaking in the forger [PR#2824](https://github.com/ecadlabs/taquito/pull/2824) + + +# Taquito v19.0.1 + +### Dependency updates +- Updated Beacon version to v4.1.2 [PR#2811](https://github.com/ecadlabs/taquito/pull/2811) + +### Documentation +- Removed Sapling live code examples from the website due to large bundle sizes, static code examples will still exist [PR#2810](https://github.com/ecadlabs/taquito/pull/2810) + # Taquito v19.0.0 :::info @@ -1241,7 +1510,7 @@ The `RPCRunOperationParam` parameter has new optional properties: `self`, `unpar Added support to forge and unforge the new operation kinds `transfer_ticket`, `tx_rollup_origination` and `tx_rollup_submit_batch` related to TORU. We plan to add support for the remaining operations in a subsequent release. -## `@taquito/michelson-encoder` - Added support for the the new type`tx_rollup_l2_address` +## `@taquito/michelson-encoder` - Added support for the new type`tx_rollup_l2_address` We created a new class `TxRollupL2AddressToken` in the michelson-encoder to support the new Michelson type `tx_rollup_l2_address`. This type is used to identify accounts on transaction rollups' ledgers. Those accounts are prefixed with `tz4`. The `TxRollupL2AddressToken` class allows users of Taquito to pass `tz4` addresses in storage or smart contract entry points using the Taquito JS abstraction. @@ -2686,7 +2955,7 @@ If you have feature or issue requests, please create an issue on http://github.c # 8.0.6-beta.0 Updated beacon-sdk, bug fixed related to contract callback entry point * Updated beacon-sdk to version 2.2.2 #677 -* char2bytes and bytes2char functions (initially in the taquito-tzip16 package) have been added to the taquito-utils package #589 +* char2Bytes and bytes2char functions (initially in the taquito-tzip16 package) have been added to the taquito-utils package #589 * Allow specifying an entry point in a contract callback #652 * Improved CI by adding retry for some of the integration tests diff --git a/website/versioned_docs/version-19.0.0/wallet_API.md b/website/versioned_docs/version-21.0.0/wallet_API.md similarity index 98% rename from website/versioned_docs/version-19.0.0/wallet_API.md rename to website/versioned_docs/version-21.0.0/wallet_API.md index 7e3e3ffc3d..843c4cc0dd 100644 --- a/website/versioned_docs/version-19.0.0/wallet_API.md +++ b/website/versioned_docs/version-21.0.0/wallet_API.md @@ -64,19 +64,15 @@ const options = { name: 'MyAwesomeDapp', iconUrl: 'https://taquito.io/img/favicon.svg', network: { type: 'ghostnet' }, - eventHandlers: { - PERMISSION_REQUEST_SUCCESS: { - handler: async (data) => { - console.log('permission data:', data); - }, - }, - }, + enableMetrics: true, }; const wallet = new BeaconWallet(options); ``` The necessary bare minimum to instantiate the wallet is an object with a `name` property that contains the name of your dapp and the network you want it to point to. In this case, we choose to point it to `ghostnet`. However, the Beacon wallet allows you to customize your dapp responses to different events. In the example above, instead of getting the default Beacon pop-up after the user connects the wallet, it will display the available data in the console. You can use whatever solution you prefer for feedback. You can find a list of all the default handlers [in the beacon-sdk Github repo](https://github.com/airgap-it/beacon-sdk/blob/master/packages/beacon-dapp/src/events.ts). +The `enableMetrics` property is an optional parameter that allows you to enable or disable the collection of metrics. It also allows the user to report bugs via a link in the wallet pop-up. + > Note: Previous versions of Beacon used to have a `preferredNetwork` property instead of `network`. This property has been removed in the latest version of Beacon, and you must now use the `network` property. The Beacon wallet requires an extra step to set up the network to connect to and the permissions: @@ -92,7 +88,7 @@ Please check out the section [Subscribing to events](#subscribing-to-events) to In previous versions of Beacon, you were able to set the `network` property when doing `requestPermissions()`. This behavior was removed from Beacon, and you must now set the network when instantiating the wallet. -You can choose among `mainnet`, `oxfordnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: +You can choose among `mainnet`, `quebecnet`, `parisnet`, `ghostnet` and `custom` to set up the network. Once the permissions have been configured, you can get the user's address by calling the `getPKH` method on the wallet: ```js const userAddress = await wallet.getPKH(); @@ -116,7 +112,7 @@ Make sure you have the Beacon browser extension installed (the extension offers ```js live noInline wallet // import { BeaconWallet } from '@taquito/beacon-wallet'; -// const options = { name: 'exampleWallet' }; +// const options = { name: 'exampleWallet', enableMetrics: true }; // const wallet = new BeaconWallet(options); wallet @@ -179,7 +175,7 @@ const wallet = new TempleWallet('MyAwesomeDapp'); The class constructor takes one parameter, the name of your dapp (this will be used later in the transaction confirmation pop-up). After the instantiation, we can connect the wallet by calling the `connect` method: ```js -await wallet.connect('mainnet' | 'oxfordnet' | 'ghostnet' | 'mondaynet' | 'sandbox'); +await wallet.connect('mainnet' | 'quebecnet' | 'parisnet' | 'ghostnet' | 'mondaynet' | 'sandbox'); ``` (Temple used to be called Thanos and some Taquito code still uses the name Thanos.) diff --git a/website/versioned_docs/version-21.0.0/walletconnect.md b/website/versioned_docs/version-21.0.0/walletconnect.md new file mode 100644 index 0000000000..6e5cfea953 --- /dev/null +++ b/website/versioned_docs/version-21.0.0/walletconnect.md @@ -0,0 +1,125 @@ +--- +title: WalletConnect (BETA) +author: Roxane Letourneau +--- + +:::info +This feature is a work in progress, and might be refined in the near future. We encourage Taquito users to try this feature and reach out to us if you have any issues or concerns. +::: + +The `@taquito/wallet-connect` package provides a `WalletConnect` class which implements the `WalletProvider` interface. The package is intended to be used by dapp developers. Similarly to `BeaconWallet`, an instance of `WalletConnect` can be injected into the `TezosToolkit` to work with the wallet API. + +## Instantiate `WalletConnect` and connect to a wallet + +The first step is to instantiate `WalletConnect` by passing your dapp details as a parameter of the `init` method as follows: + +```ts +import { WalletConnect } from "@taquito/wallet-connect"; + +const walletConnect = await WalletConnect.init({ + projectId: "YOUR_PROJECT_ID", // can get YOUR_PROJECT_ID from [Reown Cloud](https://cloud.reown.com) + metadata: { + name: "YOUR_DAPP_NAME", + description: "YOUR_DAPP_DESCRIPTION", + icons: ["ICON_URL"], + url: "DAPP_URL", + }, +}); +``` + +The second step is to establish a connection to a wallet using the `requestPermissions` method: + +```ts +import { NetworkType, PermissionScopeMethods } from "@taquito/wallet-connect"; + +await walletConnect.requestPermissions({ + permissionScope: { + networks: [NetworkType.GHOSTNET], + methods: [ + PermissionScopeMethods.TEZOS_SEND, + PermissionScopeMethods.TEZOS_SIGN, + PermissionScopeMethods.TEZOS_GET_ACCOUNTS + ], + } +}); +``` + +The parameter of the `requestPermissions` method has a `permissionScope` property allowing to specify the networks, methods, and events that will be granted permission. + +It has an optional `pairingTopic` property, which allows connecting to an existing active pairing. If `pairingTopic` is undefined, a QR/deep-links Modal will open in the dapp, allowing the user to connect to a wallet. If `pairingTopic` is defined, no modal will be shown in the dapp, and a prompt will appear in the corresponding wallet to accept or decline the session proposal. The list of active pairings can be accessed using the `getAvailablePairing` method. A good practice is to show the dapp user available pairings if they exist and to allow him to connect through one of them (skip the QR/deep-links Modal) or to connect using a new pairing (using the QR/deep-links) + +The parameter of the `requestPermissions` method also has an optional `registryUrl` parameter allowing to customize the list of wallet deep links to show in the Modal. + +If no connection can be established with a wallet, the error `ConnectionFailed` will be thrown. + +Suppose there is a need to restore a session in the dapp rather than using the `requestPermissions` method, which would establish a new session. In that case, it is possible to configure the `WalletConnect` class with an existing session using the `configureWithExistingSessionKey` method. The session will be immediately restored without a prompt in the wallet to accept/decline it. The list of existing sessions can be retrieved with the `getAllExistingSessionKeys` method. An `InvalidSessionKey` error will be thrown if the provided session key doesn't exist. + +## Send Tezos operation with `WalletConnect` and `TezosToolkit` + +Once an instance of `WalletConnect` is created and a session is established, it can be injected into the `TezosToolkit` using its `setWalletProvider` method. Methods of the wallet API can be invoked to send operations to the blockchain. Those operations will be signed and injected by the wallet. The permission `PermissionScopeMethods.TEZOS_SEND` must have been granted, or the error `MissingRequiredScope` will be thrown. + +Wallet connect allows granting permission for multiple accounts in a session. The `setActiveAccount` must be called to set the active account that will be used to prepare the operation. It should be called every time the active account is updated in the dapp. It is possible to retrieve a list of all connected accounts using the `getAccounts` method. The `getPKH` method will return the public key hash of the active account. Note that if only one account is present in the session, it will be set as the active one by default. + +In the same order of ideas, `setActiveNetwork` must be called to specify the active network. The `getNetworks` method retrieves the list of available networks in the session. + +Here is a complete example of using wallet connect to perform a transfer operation: + +```js live noInline noConfig +Tezos.setRpcProvider('https://ghostnet.tezos.ecadinfra.com/'); + +WalletConnect.init({ + logger: 'debug', + projectId: 'ba97fd7d1e89eae02f7c330e14ce1f36', // can get YOUR_PROJECT_ID from [Reown Cloud](https://cloud.reown.com) + metadata: { + name: 'Taquito website', + description: 'Taquito website with WalletConnect', + url: 'https://tezostaquito.io/', + icons: [], + }, +}) + .then((walletConnect) => { + walletConnect + .requestPermissions({ + permissionScope: { + networks: [NetworkType.GHOSTNET], + methods: [PermissionScopeMethods.TEZOS_SEND], + }, + registryUrl: `https://explorer-api.walletconnect.com/v3/wallets?projectId=ba97fd7d1e89eae02f7c330e14ce1f36`, // can get YOUR_PROJECT_ID from [Reown Cloud](https://cloud.reown.com) + + }) + .then(() => { + Tezos.setWalletProvider(walletConnect); + Tezos.wallet + .transfer({ to: 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY', amount: 1 }) + .send() + .then((op) => { + console.log(`Waiting for ${op.opHash} to be confirmed...`); + return op.confirmation().then(() => op.opHash); + }) + .then((hash) => console.log(`Operation injected: https://ghost.tzstats.com/${hash}`)); + }); + }) + .catch((err) => console.log(err)); +``` + +## Sign payload with `WalletConnect` + +The `sign` method of `WalletConnect` can be called to sign a payload. The response will be a string representing the signature. The permission `PermissionScopeMethods.TEZOS_SIGN` must have been granted, or the error `MissingRequiredScope` will be thrown. + +## Events handling + +Wallet connect allows listening to specific events. Taquito has listeners on the events `session_delete`, `session_expire`, and `session_update` and will update his internal session member accordingly if one of these events is emitted. The dapp should also handle those events as follow: + +```ts +walletConnect.signClient.on("session_delete", ({ topic }) => { + // The session was deleted from the wallet + // the dapp should listen for the event and reset the dapp state, + // clean up from user session (for example, go back to the connect wallet page) +}); + +walletConnect.signClient.on("session_update", ({ topic }) => { + // The session was updated in the wallet + // Does the accounts/network have changed, which requires calling the `setActiveAccount/setActiveNetwork` methods? + // Update the app's state (selected account, available accounts, balance, ...) +}); +``` \ No newline at end of file diff --git a/website/versioned_docs/version-19.0.0/wallets.md b/website/versioned_docs/version-21.0.0/wallets.md similarity index 100% rename from website/versioned_docs/version-19.0.0/wallets.md rename to website/versioned_docs/version-21.0.0/wallets.md diff --git a/website/versioned_docs/version-19.0.0/web3js_taquito.md b/website/versioned_docs/version-21.0.0/web3js_taquito.md similarity index 98% rename from website/versioned_docs/version-19.0.0/web3js_taquito.md rename to website/versioned_docs/version-21.0.0/web3js_taquito.md index 305aa9980c..3b40c29a38 100644 --- a/website/versioned_docs/version-19.0.0/web3js_taquito.md +++ b/website/versioned_docs/version-21.0.0/web3js_taquito.md @@ -53,7 +53,7 @@ const balance = await web3.eth.getBalance('account_address'); const balance = await Tezos.tz.getBalance('account_address'); ``` -Both Web3js and Taquito use the `getBalance` method with the account address to fetch its balance from the network. +Both Web3js and Taquito use the `getBalance` method with the account address to fetch its spendable balance from the network. ## Transfer tokens diff --git a/website/versioned_sidebars/version-19.0.0-sidebars.json b/website/versioned_sidebars/version-21.0.0-sidebars.json similarity index 97% rename from website/versioned_sidebars/version-19.0.0-sidebars.json rename to website/versioned_sidebars/version-21.0.0-sidebars.json index c8b9a5900c..89338eddee 100644 --- a/website/versioned_sidebars/version-19.0.0-sidebars.json +++ b/website/versioned_sidebars/version-21.0.0-sidebars.json @@ -41,7 +41,8 @@ "set_delegate", "smart_rollups", "proposal_and_ballot", - "failing_noop" + "failing_noop", + "staking" ] }, { @@ -66,6 +67,7 @@ "collapsible": false, "items": [ "beaconwallet-singleton", + "walletconnect", "wallets", "transaction_limits" ] @@ -125,7 +127,9 @@ "items": [ "rpc_package", "michelson_encoder", + "michel_codec", "contracts-library", + "timelock", "taquito_utils", { "type": "category", @@ -187,7 +191,7 @@ "collapsed": false, "collapsible": false, "items": [ - "mobile_bundle", + "package_bundle", "dapp_template", "dapp_prelaunch" ] diff --git a/website/versions.json b/website/versions.json index 03cbda3788..bb80be0d92 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,7 +1,7 @@ [ + "21.0.0", "20.1.0", "20.0.0", "19.2.0", - "19.1.0", - "19.0.0" + "19.1.0" ]