diff --git a/packages/core/package.json b/packages/core/package.json index fd3fb64c..93e891dc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-events": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-events": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", "events": "^3.3.0", "lodash-es": "^4.17.21", "ms": "^2.1.3" diff --git a/packages/desktop/desktop-bridge-injected/package.json b/packages/desktop/desktop-bridge-injected/package.json index cd0c7490..c1b38fc1 100644 --- a/packages/desktop/desktop-bridge-injected/package.json +++ b/packages/desktop/desktop-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/desktop-bridge-injected", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index c0364ece..4d34df88 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index 2e699b8d..31bdffa9 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index 69070316..ffd75fcf 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/components/chains/aptos/example.tsx b/packages/example/components/chains/aptos/example.tsx index 2de62117..0cd7d4cd 100644 --- a/packages/example/components/chains/aptos/example.tsx +++ b/packages/example/components/chains/aptos/example.tsx @@ -83,6 +83,11 @@ export default function Example() { publicKey: params.publicKey, }); }); + + // @ts-expect-error + provider.onDisconnect?.((params: { name: string | null } | null) => { + console.log(`aptos [onDisconnect] ${JSON.stringify(params)}`); + }); }, [account, provider, setAccount]); return ( <> @@ -198,7 +203,7 @@ export default function Example() { const options = { method: 'POST', url: 'https://api.mainnet.aptoslabs.com/v1/transactions', - headers: {'Content-Type': 'application/x.aptos.signed_transaction+bcs'}, + headers: { 'Content-Type': 'application/x.aptos.signed_transaction+bcs' }, data: buffer }; diff --git a/packages/example/components/chains/polkadot/example.tsx b/packages/example/components/chains/polkadot/example.tsx index c4003bcc..71a874a9 100644 --- a/packages/example/components/chains/polkadot/example.tsx +++ b/packages/example/components/chains/polkadot/example.tsx @@ -135,9 +135,6 @@ export default function Example() { const listenerRef = useRef<() => void>(); useEffect(() => { - if (!apiRef.current) { - return; - } if (!provider) { return; } @@ -222,6 +219,20 @@ export default function Example() { return JSON.stringify(res); }} /> + { + // serialization provider + JSON.stringify(provider) + // get accounts + const localProvider = provider + const accountProvider = localProvider?.accounts + const res = await accountProvider?.get(); + return JSON.stringify(res); + }} + /> =13.7.0": version "20.12.12" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" @@ -5930,6 +6197,13 @@ dependencies: "@types/node" "*" +"@types/ws@^8.2.2": + version "8.5.13" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.13.tgz#6414c280875e2691d0d1e080b05addbf5cb91e20" + integrity sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA== + dependencies: + "@types/node" "*" + "@types/yargs-parser@*": version "21.0.3" resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" @@ -6553,6 +6827,11 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== +aes-js@4.0.0-beta.5: + version "4.0.0-beta.5" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" + integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== + agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -6973,7 +7252,7 @@ axios@0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.6.7: +axios@^1.6.2, axios@^1.6.7: version "1.7.7" resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== @@ -7066,6 +7345,14 @@ babel-plugin-transform-flow-enums@^0.0.2: dependencies: "@babel/plugin-syntax-flow" "^7.12.1" +babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -8084,6 +8371,11 @@ core-js-compat@^3.36.1: dependencies: browserslist "^4.23.0" +core-js@^2.4.0: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" @@ -9308,6 +9600,19 @@ ethereumjs-util@^7.1.5: ethereum-cryptography "^0.1.3" rlp "^2.2.4" +ethers@^6.6.0: + version "6.13.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.4.tgz#bd3e1c3dc1e7dc8ce10f9ffb4ee40967a651b53c" + integrity sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA== + dependencies: + "@adraffy/ens-normalize" "1.10.1" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@types/node" "22.7.5" + aes-js "4.0.0-beta.5" + tslib "2.7.0" + ws "8.17.1" + ethjs-util@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" @@ -9326,6 +9631,11 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -10328,6 +10638,11 @@ inherits@=2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== +injectpromise@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/injectpromise/-/injectpromise-1.0.0.tgz#c621f7df2bbfc1164d714f1fb229adec2079da39" + integrity sha512-qNq5wy4qX4uWHcVFOEU+RqZkoVG65FhvGkyDWbuBxILMjK6A1LFf5A1mgXZkD4nRx5FCorD81X/XvPKp/zVfPA== + int64-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/int64-buffer/-/int64-buffer-1.0.1.tgz#c78d841b444cadf036cd04f8683696c740f15dca" @@ -10778,6 +11093,14 @@ isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-fetch@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4" + integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA== + dependencies: + node-fetch "^2.6.1" + whatwg-fetch "^3.4.1" + isomorphic-unfetch@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" @@ -10791,6 +11114,11 @@ isomorphic-ws@^4.0.1: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== +isomorphic-ws@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" + integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== + iterator.prototype@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" @@ -10829,6 +11157,24 @@ jayson@^4.1.0: uuid "^8.3.2" ws "^7.4.5" +jayson@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/jayson/-/jayson-4.1.2.tgz#443c26a8658703e0b2e881117b09395d88b6982e" + integrity sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA== + dependencies: + "@types/connect" "^3.4.33" + "@types/node" "^12.12.54" + "@types/ws" "^7.4.4" + JSONStream "^1.3.5" + commander "^2.20.3" + delay "^5.0.0" + es6-promisify "^5.0.0" + eyes "^0.1.8" + isomorphic-ws "^4.0.1" + json-stringify-safe "^5.0.1" + uuid "^8.3.2" + ws "^7.5.10" + jest-environment-node@^29.6.3: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" @@ -11442,7 +11788,7 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.0.0, long@^5.2.3: +long@^5.0.0, long@^5.2.1, long@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -11833,7 +12179,7 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.1.tgz#f7f85aff59aa22f110b20e27692465cf3bf89481" integrity sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA== -mitt@^3.0.1: +mitt@^3.0.0, mitt@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== @@ -11902,7 +12248,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -13089,6 +13435,11 @@ query-string@7.1.3: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +querystring-es3@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA== + querystring@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" @@ -13492,6 +13843,11 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + regenerator-runtime@^0.13.10: version "0.13.10" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" @@ -13742,6 +14098,22 @@ rpc-websockets@^7.11.0: bufferutil "^4.0.1" utf-8-validate "^5.0.2" +rpc-websockets@^9.0.2: + version "9.0.4" + resolved "https://registry.yarnpkg.com/rpc-websockets/-/rpc-websockets-9.0.4.tgz#9d8ee82533b5d1e13d9ded729e3e38d0d8fa083f" + integrity sha512-yWZWN0M+bivtoNLnaDbtny4XchdAIF5Q4g/ZsC5UC61Ckbp0QczwO8fg44rV3uYmY4WHd+EZQbn90W1d8ojzqQ== + dependencies: + "@swc/helpers" "^0.5.11" + "@types/uuid" "^8.3.4" + "@types/ws" "^8.2.2" + buffer "^6.0.3" + eventemitter3 "^5.0.1" + uuid "^8.3.2" + ws "^8.5.0" + optionalDependencies: + bufferutil "^4.0.1" + utf-8-validate "^5.0.2" + rtcpeerconnection-shim@^1.2.15: version "1.2.15" resolved "https://registry.yarnpkg.com/rtcpeerconnection-shim/-/rtcpeerconnection-shim-1.2.15.tgz#e7cc189a81b435324c4949aa3dfb51888684b243" @@ -14317,6 +14689,11 @@ streamsearch@^1.1.0: resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== +strict-event-emitter-types@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-event-emitter-types/-/strict-event-emitter-types-2.0.0.tgz#05e15549cb4da1694478a53543e4e2f4abcf277f" + integrity sha512-Nk/brWYpD85WlOgzw5h173aci0Teyv8YdIAEtV+N88nDB0dLlazZyJMIsN6eo1/AR61l+p6CJTG1JIyFaoNEEA== + strict-event-emitter@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93" @@ -14327,7 +14704,7 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -14345,6 +14722,15 @@ string-width@^3.0.0, string-width@^3.1.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -14454,7 +14840,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -14468,6 +14854,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -14574,6 +14967,15 @@ sudo-prompt@^9.0.0: resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.2.1.tgz#77efb84309c9ca489527a4e749f287e6bdd52afd" integrity sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw== +sunweb@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/sunweb/-/sunweb-1.1.0.tgz#7d00dbd610f9fd7d3380f71ae1fa03dabd882094" + integrity sha512-RoQHMAE3EMM04/y9XHDOhmnf4prhes2yYsRMi5mYANSHohpPvLl+v5I7xD0M5f5W6dMz2eSY7b0NsIyfH/1V/g== + dependencies: + "@babel/runtime" "^7.4.5" + babel-runtime "^6.26.0" + injectpromise "^1.0.0" + superagent@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/superagent/-/superagent-6.1.0.tgz#09f08807bc41108ef164cfb4be293cebd480f4a6" @@ -14606,6 +15008,11 @@ superstruct@^1.0.3: resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.3.tgz#de626a5b49c6641ff4d37da3c7598e7a87697046" integrity sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg== +superstruct@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-2.0.2.tgz#3f6d32fbdc11c357deff127d591a39b996300c54" + integrity sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A== + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -14851,6 +15258,25 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +tronweb@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/tronweb/-/tronweb-5.3.2.tgz#393b0fa0290e2c5aa7a3b3b82956f53ca65a764f" + integrity sha512-iPcIjMCxb6H7FXMntAj47F3L+7jSideyQ7ZOvRj9MeZBh46SHevMrDDR57HzakUa/tT8VvlPFHtqFK4hzTLkXw== + dependencies: + "@babel/runtime" "^7.0.0" + "@ethersproject/abi" "^5.7.0" + "@tronweb3/google-protobuf" "^3.21.2" + axios "^1.6.2" + bignumber.js "^9.0.1" + ethereum-cryptography "^2.0.0" + ethers "^6.6.0" + eventemitter3 "^3.1.0" + injectpromise "^1.0.0" + lodash "^4.17.21" + querystring-es3 "^0.2.1" + semver "^5.6.0" + validator "^13.7.0" + ts-api-utils@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" @@ -14881,6 +15307,11 @@ tslib@1.14.1, tslib@^1.11.0, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" + integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== + tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" @@ -14896,6 +15327,11 @@ tslib@^2.4.0, tslib@^2.5.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + tweetnacl-util@^0.15.0, tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" @@ -15296,6 +15732,11 @@ valibot@^0.25.0: resolved "https://registry.yarnpkg.com/valibot/-/valibot-0.25.0.tgz#bdbb3a6e910f983b5a65b56b2bff24dfd09064ca" integrity sha512-cmD0ca15oyAbT75iYLNW6uU6doAeIwYfOshpXka/E1Bx4frzbkrgb7gvkI7K0YK/DVOksei4FfxWfRoBP3NFTg== +validator@^13.7.0: + version "13.12.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.12.0.tgz#7d78e76ba85504da3fee4fd1922b385914d4b35f" + integrity sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg== + valtio@1.10.5: version "1.10.5" resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.10.5.tgz#7852125e3b774b522827d96bd9c76d285c518678" @@ -15409,7 +15850,7 @@ websocket@^1.0.31, websocket@^1.0.34: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-fetch@^3.0.0: +whatwg-fetch@^3.0.0, whatwg-fetch@^3.4.1: version "3.6.20" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz#580ce6d791facec91d37c72890995a0b48d31c70" integrity sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg== @@ -15528,7 +15969,7 @@ wif@^4.0.0: dependencies: bs58check "^3.0.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -15555,6 +15996,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -15583,6 +16033,11 @@ ws@7.2.3: resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== +ws@8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + ws@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" @@ -15595,6 +16050,11 @@ ws@^7, ws@^7.2.0, ws@^7.4.5, ws@^7.5.1: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== +ws@^7.0.0, ws@^7.5.10: + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== + ws@^8.10.0, ws@^8.15.1, ws@^8.16.0: version "8.17.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" diff --git a/packages/extension/extension-bridge-hosted/package.json b/packages/extension/extension-bridge-hosted/package.json index a4fb3ffe..37d8419a 100644 --- a/packages/extension/extension-bridge-hosted/package.json +++ b/packages/extension/extension-bridge-hosted/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-hosted", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/extension/extension-bridge-injected/package.json b/packages/extension/extension-bridge-injected/package.json index 62a6ae7a..a449dabf 100644 --- a/packages/extension/extension-bridge-injected/package.json +++ b/packages/extension/extension-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/extension-bridge-injected", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index 8bd666bd..941bb009 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/desktop-bridge-injected": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", - "@onekeyfe/inpage-providers-hub": "2.1.12", - "@onekeyfe/native-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/desktop-bridge-injected": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", + "@onekeyfe/inpage-providers-hub": "2.1.13", + "@onekeyfe/native-bridge-injected": "2.1.13", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0" } diff --git a/packages/native/native-bridge-injected/package.json b/packages/native/native-bridge-injected/package.json index 9ce92599..b3f1d4f1 100644 --- a/packages/native/native-bridge-injected/package.json +++ b/packages/native/native-bridge-injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/native-bridge-injected", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index bc9db544..62387d20 100644 --- a/packages/providers/inpage-providers-hub/package.json +++ b/packages/providers/inpage-providers-hub/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/inpage-providers-hub", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -30,26 +30,26 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/onekey-algo-provider": "2.1.12", - "@onekeyfe/onekey-alph-provider": "2.1.12", - "@onekeyfe/onekey-aptos-provider": "2.1.12", - "@onekeyfe/onekey-btc-provider": "2.1.12", - "@onekeyfe/onekey-cardano-provider": "2.1.12", - "@onekeyfe/onekey-conflux-provider": "2.1.12", - "@onekeyfe/onekey-cosmos-provider": "2.1.12", - "@onekeyfe/onekey-eth-provider": "2.1.12", - "@onekeyfe/onekey-nostr-provider": "2.1.12", - "@onekeyfe/onekey-polkadot-provider": "2.1.12", - "@onekeyfe/onekey-private-external-account-provider": "2.1.12", - "@onekeyfe/onekey-private-provider": "2.1.12", - "@onekeyfe/onekey-scdo-provider": "2.1.12", - "@onekeyfe/onekey-solana-provider": "2.1.12", - "@onekeyfe/onekey-sui-provider": "2.1.12", - "@onekeyfe/onekey-ton-provider": "2.1.12", - "@onekeyfe/onekey-tron-provider": "2.1.12", - "@onekeyfe/onekey-webln-provider": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/onekey-algo-provider": "2.1.13", + "@onekeyfe/onekey-alph-provider": "2.1.13", + "@onekeyfe/onekey-aptos-provider": "2.1.13", + "@onekeyfe/onekey-btc-provider": "2.1.13", + "@onekeyfe/onekey-cardano-provider": "2.1.13", + "@onekeyfe/onekey-conflux-provider": "2.1.13", + "@onekeyfe/onekey-cosmos-provider": "2.1.13", + "@onekeyfe/onekey-eth-provider": "2.1.13", + "@onekeyfe/onekey-nostr-provider": "2.1.13", + "@onekeyfe/onekey-polkadot-provider": "2.1.13", + "@onekeyfe/onekey-private-external-account-provider": "2.1.13", + "@onekeyfe/onekey-private-provider": "2.1.13", + "@onekeyfe/onekey-scdo-provider": "2.1.13", + "@onekeyfe/onekey-solana-provider": "2.1.13", + "@onekeyfe/onekey-sui-provider": "2.1.13", + "@onekeyfe/onekey-ton-provider": "2.1.13", + "@onekeyfe/onekey-tron-provider": "2.1.13", + "@onekeyfe/onekey-webln-provider": "2.1.13", "web3": "^1.7.3" }, "devDependencies": { diff --git a/packages/providers/onekey-algo-provider/package.json b/packages/providers/onekey-algo-provider/package.json index b866b65f..97047a5f 100644 --- a/packages/providers/onekey-algo-provider/package.json +++ b/packages/providers/onekey-algo-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-algo-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-alph-provider/package.json b/packages/providers/onekey-alph-provider/package.json index b3aa3923..8faf0cc8 100644 --- a/packages/providers/onekey-alph-provider/package.json +++ b/packages/providers/onekey-alph-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-alph-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -31,9 +31,9 @@ "@alephium/get-extension-wallet": "^1.5.2", "@alephium/walletconnect-provider": "^1.5.2", "@alephium/web3": "^1.5.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index e515894e..fef9ad43 100644 --- a/packages/providers/onekey-aptos-provider/package.json +++ b/packages/providers/onekey-aptos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-aptos-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "aptos": "^1.3.17", "eth-rpc-errors": "^4.0.3" } diff --git a/packages/providers/onekey-aptos-provider/src/OnekeyAptosProvider.ts b/packages/providers/onekey-aptos-provider/src/OnekeyAptosProvider.ts index 3b041d78..f312dc7c 100644 --- a/packages/providers/onekey-aptos-provider/src/OnekeyAptosProvider.ts +++ b/packages/providers/onekey-aptos-provider/src/OnekeyAptosProvider.ts @@ -316,6 +316,10 @@ class ProviderAptos extends ProviderAptosBase implements IProviderAptos { return super.on(PROVIDER_EVENTS.accountChanged, listener); } + onDisconnect(listener: AptosProviderEventsMap['disconnect']): this { + return super.on(PROVIDER_EVENTS.disconnect, listener); + } + on(event: E, listener: AptosProviderEventsMap[E]): this { return super.on(event, listener); } diff --git a/packages/providers/onekey-btc-provider/package.json b/packages/providers/onekey-btc-provider/package.json index c9e21f1b..177cd338 100644 --- a/packages/providers/onekey-btc-provider/package.json +++ b/packages/providers/onekey-btc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-btc-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index e6381dfb..d4dfb303 100644 --- a/packages/providers/onekey-cardano-provider/package.json +++ b/packages/providers/onekey-cardano-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cardano-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index 6ecb6600..f5311a76 100644 --- a/packages/providers/onekey-conflux-provider/package.json +++ b/packages/providers/onekey-conflux-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-conflux-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index b8616dca..f2f16751 100644 --- a/packages/providers/onekey-cosmos-provider/package.json +++ b/packages/providers/onekey-cosmos-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cosmos-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", "mitt": "^3.0.0" diff --git a/packages/providers/onekey-eth-provider/package.json b/packages/providers/onekey-eth-provider/package.json index c50ad1a1..3d9661fc 100644 --- a/packages/providers/onekey-eth-provider/package.json +++ b/packages/providers/onekey-eth-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-eth-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "eth-rpc-errors": "^4.0.3", "uuid": "^8.3.2" }, diff --git a/packages/providers/onekey-near-provider/package.json b/packages/providers/onekey-near-provider/package.json index d289296f..648aa909 100644 --- a/packages/providers/onekey-near-provider/package.json +++ b/packages/providers/onekey-near-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-near-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "borsh": "^0.6.0", "depd": "^2.0.0", "tweetnacl": "^1.0.3" diff --git a/packages/providers/onekey-nostr-provider/package.json b/packages/providers/onekey-nostr-provider/package.json index ea0a40f3..c4b7ff59 100644 --- a/packages/providers/onekey-nostr-provider/package.json +++ b/packages/providers/onekey-nostr-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-nostr-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index 8dad177d..ca4dd6dc 100644 --- a/packages/providers/onekey-polkadot-provider/package.json +++ b/packages/providers/onekey-polkadot-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-polkadot-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "@polkadot/extension-inject": "^0.46.3", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", diff --git a/packages/providers/onekey-polkadot-provider/src/OnekeyPolkadotProvider.ts b/packages/providers/onekey-polkadot-provider/src/OnekeyPolkadotProvider.ts index c79a7b22..9d05b239 100644 --- a/packages/providers/onekey-polkadot-provider/src/OnekeyPolkadotProvider.ts +++ b/packages/providers/onekey-polkadot-provider/src/OnekeyPolkadotProvider.ts @@ -263,11 +263,13 @@ class ProviderPolkadot extends ProviderPolkadotBase implements IProviderPolkadot }); } - web3Accounts(anyType?: boolean): Promise { - return this._callBridge({ + async web3Accounts(anyType?: boolean): Promise { + const accounts = await this._callBridge({ method: 'web3Accounts', params: anyType ?? false, }); + super.emit('accountChanged', accounts); + return accounts; } web3AccountsSubscribe(cb: (accounts: InjectedAccount[]) => any): Unsubcall { diff --git a/packages/providers/onekey-polkadot-provider/src/inject/Accounts.ts b/packages/providers/onekey-polkadot-provider/src/inject/Accounts.ts index cfa1547a..66ec1c2f 100644 --- a/packages/providers/onekey-polkadot-provider/src/inject/Accounts.ts +++ b/packages/providers/onekey-polkadot-provider/src/inject/Accounts.ts @@ -10,6 +10,16 @@ export default class implements InjectedAccounts { }; subscribe = (cb: (accounts: InjectedAccount[]) => unknown): Unsubcall => { - return this.provider.web3AccountsSubscribe(cb); + // listener for account change + const unsub = this.provider.web3AccountsSubscribe(cb); + this.get(); + return unsub; }; + + toJSON() { + return { + get: {}, + subscribe: {}, + }; + } } diff --git a/packages/providers/onekey-polkadot-provider/src/inject/Injected.ts b/packages/providers/onekey-polkadot-provider/src/inject/Injected.ts index 91532844..5a5ed57b 100644 --- a/packages/providers/onekey-polkadot-provider/src/inject/Injected.ts +++ b/packages/providers/onekey-polkadot-provider/src/inject/Injected.ts @@ -22,4 +22,13 @@ export default class implements Injected { this.provider = undefined; this.signer = new Signer(provider); } + + toJSON() { + return { + accounts: this.accounts, + metadata: this.metadata, + provider: this.provider, + signer: this.signer, + }; + } } diff --git a/packages/providers/onekey-polkadot-provider/src/inject/Signer.ts b/packages/providers/onekey-polkadot-provider/src/inject/Signer.ts index ea3af6d0..bf8a968b 100644 --- a/packages/providers/onekey-polkadot-provider/src/inject/Signer.ts +++ b/packages/providers/onekey-polkadot-provider/src/inject/Signer.ts @@ -11,4 +11,8 @@ export default class Signer { signRaw = async (payload: SignerPayloadRaw): Promise => { return this.provider.web3SignRaw(payload); }; + + toJSON() { + return {}; + } } diff --git a/packages/providers/onekey-private-external-account-provider/package.json b/packages/providers/onekey-private-external-account-provider/package.json index 1a778abc..4293b6e3 100644 --- a/packages/providers/onekey-private-external-account-provider/package.json +++ b/packages/providers/onekey-private-external-account-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-private-external-account-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-private-provider/package.json b/packages/providers/onekey-private-provider/package.json index 1ef6fb76..7ffd89fc 100644 --- a/packages/providers/onekey-private-provider/package.json +++ b/packages/providers/onekey-private-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-private-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-scdo-provider/package.json b/packages/providers/onekey-scdo-provider/package.json index 6d8df79f..8a77030b 100644 --- a/packages/providers/onekey-scdo-provider/package.json +++ b/packages/providers/onekey-scdo-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-scdo-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index 6a0404c5..b0a81fce 100644 --- a/packages/providers/onekey-solana-provider/package.json +++ b/packages/providers/onekey-solana-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-solana-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "@solana/wallet-standard-features": "^1.1.0", "@solana/web3.js": "^1.41.3", "@wallet-standard/base": "^1.0.1", diff --git a/packages/providers/onekey-sui-provider/package.json b/packages/providers/onekey-sui-provider/package.json index 9076be2e..384876c4 100644 --- a/packages/providers/onekey-sui-provider/package.json +++ b/packages/providers/onekey-sui-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-sui-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "eth-rpc-errors": "^4.0.3", "mitt": "^3.0.0" } diff --git a/packages/providers/onekey-ton-provider/package.json b/packages/providers/onekey-ton-provider/package.json index de21fa73..942181fd 100644 --- a/packages/providers/onekey-ton-provider/package.json +++ b/packages/providers/onekey-ton-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-ton-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "@tonconnect/protocol": "^2.2.6" } } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index ccedcf90..f31cacfb 100644 --- a/packages/providers/onekey-tron-provider/package.json +++ b/packages/providers/onekey-tron-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-tron-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/secp256k1": "1.7.1", - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12", + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13", "querystring": "^0.2.1", "sunweb": "^1.0.7", "tronweb": "^5.3.2" diff --git a/packages/providers/onekey-webln-provider/package.json b/packages/providers/onekey-webln-provider/package.json index 19b99690..1439687e 100644 --- a/packages/providers/onekey-webln-provider/package.json +++ b/packages/providers/onekey-webln-provider/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-webln-provider", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-errors": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12", - "@onekeyfe/extension-bridge-injected": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-errors": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13", + "@onekeyfe/extension-bridge-injected": "2.1.13" } } diff --git a/packages/types/package.json b/packages/types/package.json index 6fbb641b..ebe2dd1d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/webview/package.json b/packages/webview/package.json index f7b84628..5689821d 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "2.1.12", + "version": "2.1.13", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.12", - "@onekeyfe/cross-inpage-provider-types": "2.1.12" + "@onekeyfe/cross-inpage-provider-core": "2.1.13", + "@onekeyfe/cross-inpage-provider-types": "2.1.13" } }