From 4463512dbdb7011e55665585245c31ae9f05e255 Mon Sep 17 00:00:00 2001 From: Pierre Jeanjacquot <26487010+PierreJeanjacquot@users.noreply.github.com> Date: Thu, 31 Jul 2025 16:34:09 +0200 Subject: [PATCH] feat: update contact with new properties --- package-lock.json | 177 ++++++---------------------------------------- package.json | 6 +- tools/types.md | 40 +++++++++-- 3 files changed, 58 insertions(+), 165 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d87d1a..52a896f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,11 +6,11 @@ "": { "name": "documentation-tools", "dependencies": { - "@iexec/dataprotector": "^2.0.0-beta.16", + "@iexec/dataprotector": "^2.0.0-beta.18", "@iexec/dataprotector-deserializer": "^0.1.1", "@iexec/iexec-oracle-factory-wrapper": "^2.6.0", - "@iexec/web3mail": "^1.2.0", - "@iexec/web3telegram": "^0.0.3-alpha", + "@iexec/web3mail": "^1.4.0", + "@iexec/web3telegram": "^0.1.0-alpha.3", "@reown/appkit": "^1.6.5", "@reown/appkit-adapter-wagmi": "^1.6.5", "@tanstack/vue-query": "^5.64.2", @@ -1155,9 +1155,9 @@ } }, "node_modules/@iexec/dataprotector": { - "version": "2.0.0-beta.16", - "resolved": "https://registry.npmjs.org/@iexec/dataprotector/-/dataprotector-2.0.0-beta.16.tgz", - "integrity": "sha512-EqwQfDPS0eM0yM1GLzMj25+fYMhtFPDux3OSePKD088nx1Rj/qi3eU0oFBzjkW2omELDEq+unxaxCaPor0rG5g==", + "version": "2.0.0-beta.18", + "resolved": "https://registry.npmjs.org/@iexec/dataprotector/-/dataprotector-2.0.0-beta.18.tgz", + "integrity": "sha512-XR4PqgoPKH1mwwuWoL/HMDoaBVZFev3hwQLtrdo0mYSflfKqExiIWd65sQ0UwRK0EY563/HP49bjEglqK3l96Q==", "license": "Apache-2.0", "dependencies": { "@ethersproject/bytes": "^5.7.0", @@ -1169,7 +1169,7 @@ "debug": "^4.3.4", "ethers": "^6.13.2", "graphql-request": "^6.0.0", - "iexec": "^8.14.0", + "iexec": "^8.17.1", "jszip": "^3.7.1", "kubo-rpc-client": "^4.1.1", "magic-bytes.js": "^1.0.15", @@ -1412,9 +1412,9 @@ } }, "node_modules/@iexec/web3mail": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@iexec/web3mail/-/web3mail-1.2.0.tgz", - "integrity": "sha512-8v8vqdZBxi2J1LTTTtsALEa1q3ru3jgfovjtba4gQOCLovK6IDBURPX2TfxjY4rQi24EKIcR2PQK+9P4Vs4Sdg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@iexec/web3mail/-/web3mail-1.4.0.tgz", + "integrity": "sha512-lRBstdOBPQXqSuoAIJtoZFgPZXNsusSv1Bk89taZNO3xSE/1Kb8Qa1JCn1rxf/1FHgK4lp73JEzUQ2jlm/rjEA==", "license": "Apache-2.0", "dependencies": { "@ethersproject/bytes": "^5.7.0", @@ -1422,15 +1422,15 @@ "buffer": "^6.0.3", "ethers": "^6.13.2", "graphql-request": "^6.1.0", - "iexec": "^8.13.1", + "iexec": "^8.17.1", "kubo-rpc-client": "^4.1.1", "yup": "^1.1.1" } }, "node_modules/@iexec/web3telegram": { - "version": "0.0.3-alpha", - "resolved": "https://registry.npmjs.org/@iexec/web3telegram/-/web3telegram-0.0.3-alpha.tgz", - "integrity": "sha512-em9yPyOdixMfdReHvE6Mu7CP3M3/D9Vv7P870ocCZa8EzpXCBoEHfqynIYbi9mXUNEtbxX7cEEF6kO27mhZopQ==", + "version": "0.1.0-alpha.3", + "resolved": "https://registry.npmjs.org/@iexec/web3telegram/-/web3telegram-0.1.0-alpha.3.tgz", + "integrity": "sha512-HLWyDmAzyMd5mHlIjKlYYgz9znao/ITMCcrzu2BOSZwD0FHcgjHyOJ0G/qugFH5DdyvEsv4I5igGXgJRCmLOwA==", "license": "Apache-2.0", "dependencies": { "@ethersproject/bytes": "^5.7.0", @@ -1438,149 +1438,11 @@ "buffer": "^6.0.3", "ethers": "^6.8.1", "graphql-request": "^6.1.0", - "iexec": "^8.13.1", - "kubo-rpc-client": "^3.0.1", + "iexec": "^8.17.1", + "kubo-rpc-client": "^4.1.3", "yup": "^1.1.1" } }, - "node_modules/@iexec/web3telegram/node_modules/@libp2p/logger": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-2.1.1.tgz", - "integrity": "sha512-2UbzDPctg3cPupF6jrv6abQnAUTrbLybNOj0rmmrdGm1cN2HJ1o/hBu0sXuq4KF9P1h/eVRn1HIRbVIEKnEJrA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface-peer-id": "^2.0.2", - "@multiformats/multiaddr": "^12.1.3", - "debug": "^4.3.4", - "interface-datastore": "^8.2.0", - "multiformats": "^11.0.2" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/@libp2p/peer-id": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-2.0.4.tgz", - "integrity": "sha512-gcOsN8Fbhj6izIK+ejiWsqiqKeJ2yWPapi/m55VjOvDa52/ptQzZszxQP8jUk93u36de92ATFXDfZR/Bi6eeUQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface-peer-id": "^2.0.0", - "@libp2p/interfaces": "^3.2.0", - "multiformats": "^11.0.0", - "uint8arrays": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/any-signal": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-3.0.1.tgz", - "integrity": "sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg==", - "license": "MIT" - }, - "node_modules/@iexec/web3telegram/node_modules/dag-jose": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-4.0.0.tgz", - "integrity": "sha512-tw595L3UYoOUT9dSJPbBEG/qpRpw24kRZxa5SLRnlnr+g5L7O8oEs1d3W5TiVA1oJZbthVsf0Vi3zFN66qcEBA==", - "license": "(Apache-2.0 OR MIT)", - "dependencies": { - "@ipld/dag-cbor": "^9.0.0", - "multiformats": "^11.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/it-first": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/it-first/-/it-first-2.0.1.tgz", - "integrity": "sha512-noC1oEQcWZZMUwq7VWxHNLML43dM+5bviZpfmkxkXlvBe60z7AFRqpZSga9uQBo792jKv9otnn1IjA4zwgNARw==", - "license": "Apache-2.0 OR MIT", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/it-last": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/it-last/-/it-last-2.0.1.tgz", - "integrity": "sha512-uVMedYW0wa2Cx0TAmcOCLbfuLLII7+vyURmhKa8Zovpd+aBTMsmINtsta2n364wJ5qsEDBH+akY1sUtAkaYBlg==", - "license": "Apache-2.0 OR MIT", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/kubo-rpc-client": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/kubo-rpc-client/-/kubo-rpc-client-3.0.4.tgz", - "integrity": "sha512-MV8XFG8ikSPZJkzN/h50SH60kyFz6d3hBcHE/ChhLmbzT3TM8n/I9fq0+5IL5dFSwJo5YrpZqDgsFhNgMSeztg==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@ipld/dag-cbor": "^9.0.0", - "@ipld/dag-json": "^10.0.0", - "@ipld/dag-pb": "^4.0.0", - "@libp2p/crypto": "^1.0.11", - "@libp2p/logger": "^2.0.5", - "@libp2p/peer-id": "^2.0.0", - "@multiformats/multiaddr": "^12.1.10", - "any-signal": "^3.0.1", - "dag-jose": "^4.0.0", - "err-code": "^3.0.1", - "ipfs-core-utils": "^0.18.0", - "ipfs-utils": "^9.0.7", - "it-first": "^2.0.0", - "it-last": "^2.0.0", - "merge-options": "^3.0.4", - "multiformats": "^11.0.0", - "parse-duration": "^1.0.2", - "stream-to-it": "^0.2.4", - "uint8arrays": "^4.0.3" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/multiformats": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz", - "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==", - "license": "Apache-2.0 OR MIT", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@iexec/web3telegram/node_modules/stream-to-it": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz", - "integrity": "sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==", - "license": "MIT", - "dependencies": { - "get-iterator": "^1.0.2" - } - }, - "node_modules/@iexec/web3telegram/node_modules/uint8arrays": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz", - "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "multiformats": "^12.0.1" - } - }, - "node_modules/@iexec/web3telegram/node_modules/uint8arrays/node_modules/multiformats": { - "version": "12.1.3", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz", - "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==", - "license": "Apache-2.0 OR MIT", - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@inquirer/checkbox": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.4.tgz", @@ -7683,15 +7545,16 @@ "license": "BSD-3-Clause" }, "node_modules/iexec": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/iexec/-/iexec-8.14.1.tgz", - "integrity": "sha512-Nx9AJKTsS59PLK0d7uBtx1WRKOd8lgZKbl1vrFqnDnhF85qL5nscUO0dQJGUW9yWmjy1+u6hccOUB2KDejGH2w==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/iexec/-/iexec-8.17.1.tgz", + "integrity": "sha512-S6TZM6gZVn2qAd5spz3LOAPehQrpRsbrX/MsPVzvNHdE94c3FKptQ5o6vGwMIoL3soTLkhJPax7VM5EmH07wZA==", "license": "Apache-2.0", "dependencies": { "@ensdomains/ens-contracts": "^1.2.5", "@iexec/poco": "^5.5.0", "@iexec/voucher-contracts": "^1.0.0", "@multiformats/multiaddr": "^12.4.0", + "@types/bn.js": "^5.1.6", "bn.js": "^5.2.1", "buffer": "^6.0.3", "commander": "^13.1.0", diff --git a/package.json b/package.json index 1c78322..2b123f5 100644 --- a/package.json +++ b/package.json @@ -23,11 +23,11 @@ "vitepress-plugin-group-icons": "^1.3.8" }, "dependencies": { - "@iexec/dataprotector": "^2.0.0-beta.16", + "@iexec/dataprotector": "^2.0.0-beta.18", "@iexec/dataprotector-deserializer": "^0.1.1", "@iexec/iexec-oracle-factory-wrapper": "^2.6.0", - "@iexec/web3mail": "^1.2.0", - "@iexec/web3telegram": "^0.0.3-alpha", + "@iexec/web3mail": "^1.4.0", + "@iexec/web3telegram": "^0.1.0-alpha.3", "@reown/appkit": "^1.6.5", "@reown/appkit-adapter-wagmi": "^1.6.5", "@tanstack/vue-query": "^5.64.2", diff --git a/tools/types.md b/tools/types.md index 1ed4130..c6b473d 100644 --- a/tools/types.md +++ b/tools/types.md @@ -1,14 +1,19 @@ # Types -Types in Web3mail. - ## Contact ### address `Address` -The address of the `protectedData` holding the contact's email address. +The address of the `protectedData` holding the contact's details. + +### name + +`string` + +The name of the `protectedData` holding the contact's details (name may be empty +`""`). ### owner @@ -21,5 +26,30 @@ The address for the contact who granted permission to send them communications. `number` The precise date and time when the user granted authorization to send them -direct communications (such as email or telegram messages). This timestamp -represents the moment the access was granted. +direct communications. This timestamp represents the moment the access was +granted. + +### remainingAccess + +`number` + +The number of remaining accesses the user has for this contact. This value +indicates how many times the user can access the contact's details before the +access limit is reached. + +### accessPrice + +`number` + +The price in nRLC that the user must pay to access the contact's details. This +value is determined by the contact's owner and can vary based on the owner's +preferences. + +### isUserStrict + +`boolean` + +Indicates whether the user has a personal access to the contact's details. If +`true`, the user has a specific, personal access to the contact's details. If +`false`, the contact is shared publicly, which may allow for more general or +anonymous access.