From aaf3539f1ad897b478421a16d9e35610deaea78c Mon Sep 17 00:00:00 2001 From: Leon Date: Tue, 26 Nov 2024 11:18:27 +0800 Subject: [PATCH] feat: Add benfen provider (#255) * feat: Add benfen provider * chore: revert alephium commit * chore: update version --- package.json | 2 +- packages/core/package.json | 8 +- packages/core/src/ProviderBase.ts | 1 + packages/core/src/versionInfo.ts | 2 +- .../desktop-bridge-injected/package.json | 6 +- packages/empty/package.json | 2 +- packages/errors/package.json | 2 +- packages/events/package.json | 2 +- packages/example/package.json | 24 +- .../extension-bridge-hosted/package.json | 6 +- .../extension-bridge-injected/package.json | 6 +- packages/injected/package.json | 14 +- .../native-bridge-injected/package.json | 6 +- .../inpage-providers-hub/package.json | 42 +- .../src/injectWeb3Provider.ts | 20 +- .../onekey-algo-provider/package.json | 10 +- .../onekey-alph-provider/package.json | 10 +- .../src/OnekeyAlphProvider.ts | 6 +- .../onekey-aptos-provider/package.json | 10 +- .../README.md | 0 .../package.json | 18 +- .../src/OnekeyBfcProvider.ts | 326 ++++++++ .../src/OnekeyBfcStandardWallet.ts | 238 ++++++ .../src/ProviderBfcBase.ts} | 7 +- .../onekey-bfc-provider/src/index.spec.ts | 6 + .../onekey-bfc-provider/src/index.ts | 4 + .../src/type-utils.ts | 0 .../onekey-bfc-provider/src/types.ts | 17 + .../tsconfig.cjs.json | 6 +- .../tsconfig.json | 6 +- .../providers/onekey-bfc-provider/yarn.lock | 737 ++++++++++++++++++ .../onekey-btc-provider/package.json | 10 +- .../onekey-cardano-provider/package.json | 10 +- .../onekey-conflux-provider/package.json | 10 +- .../onekey-cosmos-provider/package.json | 10 +- .../src/OnekeyCosmosProvider.ts | 3 +- .../onekey-cosmos-provider/src/cosmjs.ts | 1 + .../onekey-eth-provider/package.json | 10 +- .../onekey-near-provider/package.json | 10 +- .../onekey-nostr-provider/package.json | 10 +- .../onekey-polkadot-provider/package.json | 10 +- .../.gitignore | 2 - .../.nvmrc | 2 - .../src/ProviderPrivateExternalAccount.ts | 101 --- .../src/index.ts | 3 - .../src/types.ts | 68 -- .../onekey-private-provider/package.json | 10 +- .../onekey-scdo-provider/package.json | 10 +- .../onekey-solana-provider/package.json | 10 +- .../onekey-sui-provider/package.json | 10 +- .../onekey-ton-provider/package.json | 10 +- .../onekey-tron-provider/package.json | 10 +- .../onekey-webln-provider/package.json | 10 +- packages/types/package.json | 2 +- packages/types/src/index.ts | 2 +- packages/webview/package.json | 6 +- yarn.lock | 7 +- 57 files changed, 1533 insertions(+), 358 deletions(-) rename packages/providers/{onekey-private-external-account-provider => onekey-bfc-provider}/README.md (100%) rename packages/providers/{onekey-private-external-account-provider => onekey-bfc-provider}/package.json (61%) create mode 100644 packages/providers/onekey-bfc-provider/src/OnekeyBfcProvider.ts create mode 100644 packages/providers/onekey-bfc-provider/src/OnekeyBfcStandardWallet.ts rename packages/providers/{onekey-private-external-account-provider/src/ProviderPrivateExternalAccountBase.ts => onekey-bfc-provider/src/ProviderBfcBase.ts} (61%) create mode 100644 packages/providers/onekey-bfc-provider/src/index.spec.ts create mode 100644 packages/providers/onekey-bfc-provider/src/index.ts rename packages/providers/{onekey-private-external-account-provider => onekey-bfc-provider}/src/type-utils.ts (100%) create mode 100644 packages/providers/onekey-bfc-provider/src/types.ts rename packages/providers/{onekey-private-external-account-provider => onekey-bfc-provider}/tsconfig.cjs.json (55%) rename packages/providers/{onekey-private-external-account-provider => onekey-bfc-provider}/tsconfig.json (56%) create mode 100644 packages/providers/onekey-bfc-provider/yarn.lock delete mode 100644 packages/providers/onekey-private-external-account-provider/.gitignore delete mode 100644 packages/providers/onekey-private-external-account-provider/.nvmrc delete mode 100644 packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccount.ts delete mode 100644 packages/providers/onekey-private-external-account-provider/src/index.ts delete mode 100644 packages/providers/onekey-private-external-account-provider/src/types.ts diff --git a/package.json b/package.json index 8a87976e..b2071b76 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "react": "^17.0.2", "react-test-renderer": "^17.0.2", "ts-jest": "^27.0.5", - "typescript": "^4" + "typescript": "^5" }, "dependencies": {}, "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" diff --git a/packages/core/package.json b/packages/core/package.json index 9f3e2fcf..b805deab 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-core", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -29,9 +29,9 @@ "build-version-info": "node ./scripts/buildVersionInfo.js" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-events": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-events": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", "events": "^3.3.0", "lodash-es": "^4.17.21", "ms": "^2.1.3" diff --git a/packages/core/src/ProviderBase.ts b/packages/core/src/ProviderBase.ts index aace2bbe..caf54f5d 100644 --- a/packages/core/src/ProviderBase.ts +++ b/packages/core/src/ProviderBase.ts @@ -183,6 +183,7 @@ abstract class ProviderBase extends CrossEventEmitter { return result; } catch (error) { if (callback && hasCallback) { + // @ts-expect-error callback(error); } throw error; diff --git a/packages/core/src/versionInfo.ts b/packages/core/src/versionInfo.ts index 5698c4d9..5a7e1d0c 100644 --- a/packages/core/src/versionInfo.ts +++ b/packages/core/src/versionInfo.ts @@ -1,5 +1,5 @@ -const version = '2.1.15'; +const version = '2.1.16'; const versionBuild = '2020-0101-1'; export default { diff --git a/packages/desktop/desktop-bridge-injected/package.json b/packages/desktop/desktop-bridge-injected/package.json index b543eadf..1be20359 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -34,7 +34,7 @@ "electron": "^17.2.0" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17" } } diff --git a/packages/empty/package.json b/packages/empty/package.json index 4c5bf4b6..ab3fac3b 100644 --- a/packages/empty/package.json +++ b/packages/empty/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-empty", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/errors/package.json b/packages/errors/package.json index 12e84ee8..a59f429f 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-errors", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/events/package.json b/packages/events/package.json index 6cd5f970..975442ba 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-events", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/example/package.json b/packages/example/package.json index 652dc03c..6ce3b503 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-example", - "version": "2.1.16", + "version": "2.1.17", "private": true, "scripts": { "postinstall": "patch-package", @@ -21,17 +21,17 @@ "@metamask/eth-sig-util": "^7.0.2", "@metamask/onboarding": "^1.0.1", "@mysten/dapp-kit": "0.13.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/onekey-aptos-provider": "2.1.16", - "@onekeyfe/onekey-cardano-provider": "2.1.16", - "@onekeyfe/onekey-conflux-provider": "2.1.16", - "@onekeyfe/onekey-cosmos-provider": "2.1.16", - "@onekeyfe/onekey-near-provider": "2.1.16", - "@onekeyfe/onekey-solana-provider": "2.1.16", - "@onekeyfe/onekey-sui-provider": "2.1.16", - "@onekeyfe/onekey-tron-provider": "2.1.16", - "@onekeyfe/onekey-webln-provider": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/onekey-aptos-provider": "2.1.17", + "@onekeyfe/onekey-cardano-provider": "2.1.17", + "@onekeyfe/onekey-conflux-provider": "2.1.17", + "@onekeyfe/onekey-cosmos-provider": "2.1.17", + "@onekeyfe/onekey-near-provider": "2.1.17", + "@onekeyfe/onekey-solana-provider": "2.1.17", + "@onekeyfe/onekey-sui-provider": "2.1.17", + "@onekeyfe/onekey-tron-provider": "2.1.17", + "@onekeyfe/onekey-webln-provider": "2.1.17", "@polkadot/api": "^9.11.3", "@polkadot/extension-dapp": "^0.47.5", "@radix-ui/react-checkbox": "^1.1.0", diff --git a/packages/extension/extension-bridge-hosted/package.json b/packages/extension/extension-bridge-hosted/package.json index 80e8f309..b978daeb 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,8 +28,8 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/extension/extension-bridge-injected/package.json b/packages/extension/extension-bridge-injected/package.json index 79eacf6c..bbbf9c12 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17" } } diff --git a/packages/injected/package.json b/packages/injected/package.json index 53d90adf..43286196 100644 --- a/packages/injected/package.json +++ b/packages/injected/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-injected", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -42,12 +42,12 @@ "electron": "*" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/desktop-bridge-injected": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", - "@onekeyfe/inpage-providers-hub": "2.1.16", - "@onekeyfe/native-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/desktop-bridge-injected": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", + "@onekeyfe/inpage-providers-hub": "2.1.17", + "@onekeyfe/native-bridge-injected": "2.1.17", "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 c13c5c05..9b909f39 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,7 +28,7 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17" } } diff --git a/packages/providers/inpage-providers-hub/package.json b/packages/providers/inpage-providers-hub/package.json index 7bd0580c..43c0279d 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -30,26 +30,26 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/onekey-algo-provider": "2.1.16", - "@onekeyfe/onekey-alph-provider": "2.1.16", - "@onekeyfe/onekey-aptos-provider": "2.1.16", - "@onekeyfe/onekey-btc-provider": "2.1.16", - "@onekeyfe/onekey-cardano-provider": "2.1.16", - "@onekeyfe/onekey-conflux-provider": "2.1.16", - "@onekeyfe/onekey-cosmos-provider": "2.1.16", - "@onekeyfe/onekey-eth-provider": "2.1.16", - "@onekeyfe/onekey-nostr-provider": "2.1.16", - "@onekeyfe/onekey-polkadot-provider": "2.1.16", - "@onekeyfe/onekey-private-external-account-provider": "2.1.16", - "@onekeyfe/onekey-private-provider": "2.1.16", - "@onekeyfe/onekey-scdo-provider": "2.1.16", - "@onekeyfe/onekey-solana-provider": "2.1.16", - "@onekeyfe/onekey-sui-provider": "2.1.16", - "@onekeyfe/onekey-ton-provider": "2.1.16", - "@onekeyfe/onekey-tron-provider": "2.1.16", - "@onekeyfe/onekey-webln-provider": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/onekey-algo-provider": "2.1.17", + "@onekeyfe/onekey-alph-provider": "2.1.17", + "@onekeyfe/onekey-aptos-provider": "2.1.17", + "@onekeyfe/onekey-bfc-provider": "2.1.17", + "@onekeyfe/onekey-btc-provider": "2.1.17", + "@onekeyfe/onekey-cardano-provider": "2.1.17", + "@onekeyfe/onekey-conflux-provider": "2.1.17", + "@onekeyfe/onekey-cosmos-provider": "2.1.17", + "@onekeyfe/onekey-eth-provider": "2.1.17", + "@onekeyfe/onekey-nostr-provider": "2.1.17", + "@onekeyfe/onekey-polkadot-provider": "2.1.17", + "@onekeyfe/onekey-private-provider": "2.1.17", + "@onekeyfe/onekey-scdo-provider": "2.1.17", + "@onekeyfe/onekey-solana-provider": "2.1.17", + "@onekeyfe/onekey-sui-provider": "2.1.17", + "@onekeyfe/onekey-ton-provider": "2.1.17", + "@onekeyfe/onekey-tron-provider": "2.1.17", + "@onekeyfe/onekey-webln-provider": "2.1.17", "web3": "^1.7.3" }, "devDependencies": { diff --git a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts index d433b938..e9a9c742 100644 --- a/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts +++ b/packages/providers/inpage-providers-hub/src/injectWeb3Provider.ts @@ -10,7 +10,6 @@ import { ProviderConflux } from '@onekeyfe/onekey-conflux-provider'; import { ProviderAlph, registerAlephiumProvider } from '@onekeyfe/onekey-alph-provider'; import { ProviderTron } from '@onekeyfe/onekey-tron-provider'; import { ProviderCardano, defineWindowCardanoProperty } from '@onekeyfe/onekey-cardano-provider'; -// import { ProviderPrivateExternalAccount } from '@onekeyfe/onekey-private-external-account-provider'; import { ProviderCosmos } from '@onekeyfe/onekey-cosmos-provider'; import { ProviderPolkadot, registerPolkadot } from '@onekeyfe/onekey-polkadot-provider'; import { @@ -18,6 +17,7 @@ import { checkWalletSwitchEnable, } from '@onekeyfe/cross-inpage-provider-core'; import { ProviderSui, registerSuiWallet } from '@onekeyfe/onekey-sui-provider'; +import { ProviderBfc, registerBfcWallet } from '@onekeyfe/onekey-bfc-provider'; import { ProviderWebln } from '@onekeyfe/onekey-webln-provider'; import { ProviderScdo } from '@onekeyfe/onekey-scdo-provider'; import { createTonProviderOpenMask, ProviderTon } from '@onekeyfe/onekey-ton-provider'; @@ -27,7 +27,6 @@ import { ProviderAlgo } from '@onekeyfe/onekey-algo-provider'; import { hackAllConnectButtons } from './connectButtonHack'; import { detectWebsiteRiskLevel, listenPageFocus } from './detectRiskWebsite'; import { WALLET_CONNECT_INFO } from './connectButtonHack/consts'; -// import Web3 from 'web3'; // cause build error export type IWindowOneKeyHub = { debugLogger?: any; @@ -40,6 +39,7 @@ export type IWindowOneKeyHub = { petra?: ProviderAptos; martian?: ProviderAptosMartian; suiWallet?: ProviderSui; + bfcWallet?: ProviderBfc; cardano?: ProviderCardano; keplr?: ProviderCosmos; webln?: ProviderWebln; @@ -103,6 +103,10 @@ function injectWeb3Provider(): unknown { bridge, }); + const bfc = new ProviderBfc({ + bridge, + }); + const cardano = new ProviderCardano({ bridge, }); @@ -138,14 +142,11 @@ function injectWeb3Provider(): unknown { const scdo = new ProviderScdo({ bridge }); - // const $privateExternalAccount = new ProviderPrivateExternalAccount({ bridge }); - // providerHub const $onekey = { ...window.$onekey, jsBridge: bridge, $private, - // $privateExternalAccount, ethereum, solana, // starcoin, @@ -154,6 +155,7 @@ function injectWeb3Provider(): unknown { tron, sollet: null, sui, + bfc, tonconnect, cardano, alephium, @@ -208,6 +210,7 @@ function injectWeb3Provider(): unknown { registerAlephiumProvider(alephium); defineWindowProperty('tronLink', tron); defineWindowProperty('suiWallet', sui); + defineWindowProperty('bfcWallet', bfc); defineWindowProperty('onekeyTonWallet', { tonconnect, }); @@ -270,6 +273,13 @@ function injectWeb3Provider(): unknown { }); } + // BFC Standard Wallet + if (checkWalletSwitchEnable()) { + registerBfcWallet(bfc, { + logo: WALLET_CONNECT_INFO.onekey.icon, + }); + } + if (checkWalletSwitchEnable()) { registerPolkadot(polkadot); } diff --git a/packages/providers/onekey-algo-provider/package.json b/packages/providers/onekey-algo-provider/package.json index 71217bac..13070fb8 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-alph-provider/package.json b/packages/providers/onekey-alph-provider/package.json index 818e5121..69b5d79c 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.16", + "version": "2.1.17", "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.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts b/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts index a2125c93..b34da755 100644 --- a/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts +++ b/packages/providers/onekey-alph-provider/src/OnekeyAlphProvider.ts @@ -35,8 +35,10 @@ function isWalletEventMethodMatch({ method, name }: { method: string; name: stri } export class ProviderAlph extends InteractiveSignerProvider implements AlephiumWindowObject { - id = 'onekey'; - name = 'OneKey'; + id = 'alephium'; + name = 'Alephium'; + // id = 'onekey'; + // name = 'OneKey'; icon = 'https://uni.onekey-asset.com/static/logo/onekey.png'; version = '0.9.4'; _accountInfo: Account | undefined; diff --git a/packages/providers/onekey-aptos-provider/package.json b/packages/providers/onekey-aptos-provider/package.json index 0cfb9471..3bf2f790 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "aptos": "^1.3.17", "eth-rpc-errors": "^4.0.3" } diff --git a/packages/providers/onekey-private-external-account-provider/README.md b/packages/providers/onekey-bfc-provider/README.md similarity index 100% rename from packages/providers/onekey-private-external-account-provider/README.md rename to packages/providers/onekey-bfc-provider/README.md diff --git a/packages/providers/onekey-private-external-account-provider/package.json b/packages/providers/onekey-bfc-provider/package.json similarity index 61% rename from packages/providers/onekey-private-external-account-provider/package.json rename to packages/providers/onekey-bfc-provider/package.json index 162ffc62..0a70d192 100644 --- a/packages/providers/onekey-private-external-account-provider/package.json +++ b/packages/providers/onekey-bfc-provider/package.json @@ -1,6 +1,6 @@ { - "name": "@onekeyfe/onekey-private-external-account-provider", - "version": "2.1.16", + "name": "@onekeyfe/onekey-bfc-provider", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,15 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@benfen/bfc.js": "0.2.7", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", + "eth-rpc-errors": "^4.0.3", + "mitt": "^3.0.0" + }, + "devDependencies": { + "typescript": "^5" } } diff --git a/packages/providers/onekey-bfc-provider/src/OnekeyBfcProvider.ts b/packages/providers/onekey-bfc-provider/src/OnekeyBfcProvider.ts new file mode 100644 index 00000000..277c9fd0 --- /dev/null +++ b/packages/providers/onekey-bfc-provider/src/OnekeyBfcProvider.ts @@ -0,0 +1,326 @@ +import { bytesToHex } from '@noble/hashes/utils'; +/* eslint-disable tsdoc/syntax */ +import type { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core'; +import { getOrCreateExtInjectedJsBridge } from '@onekeyfe/extension-bridge-injected'; +import { ProviderBfcBase } from './ProviderBfcBase'; +import type * as TypeUtils from './type-utils'; +import type { IJsonRpcRequest } from '@onekeyfe/cross-inpage-provider-types'; +import { web3Errors } from '@onekeyfe/cross-inpage-provider-errors'; +import { TransactionBlock } from '@benfen/bfc.js/transactions'; + +import { ALL_PERMISSION_TYPES, AccountInfo } from './types'; +import type { PermissionType } from './types'; +import { + IdentifierString, + BenfenSignAndExecuteTransactionBlockInput, + BenfenSignAndExecuteTransactionBlockOutput, + BenfenSignMessageInput, + BenfenSignMessageOutput, + BenfenSignPersonalMessageInput, + BenfenSignPersonalMessageOutput, + BenfenSignTransactionBlockInput, + BenfenSignTransactionBlockOutput, +} from '@benfen/bfc.js/wallet-standard'; + +const PROVIDER_EVENTS = { + 'connect': 'connect', + 'disconnect': 'disconnect', + 'accountChanged': 'accountChanged', + 'networkChange': 'networkChange', + 'message_low_level': 'message_low_level', +} as const; + +type BfcProviderEventsMap = { + [PROVIDER_EVENTS.connect]: (account: string) => void; + [PROVIDER_EVENTS.disconnect]: () => void; + [PROVIDER_EVENTS.accountChanged]: ( + account: { address: string; publicKey: string } | null, + ) => void; + [PROVIDER_EVENTS.networkChange]: (name: string | null) => void; + [PROVIDER_EVENTS.message_low_level]: (payload: IJsonRpcRequest) => void; +}; + +type SignAndExecuteTransactionBlockInput = BenfenSignAndExecuteTransactionBlockInput & { + blockSerialize: string; + walletSerialize: string; +}; +type SignTransactionBlockInput = BenfenSignTransactionBlockInput & { + blockSerialize: string; + walletSerialize: string; +}; +type SignMessageInput = BenfenSignMessageInput & { messageSerialize: string; walletSerialize: string }; + +type SignPersonalMessageInput = BenfenSignPersonalMessageInput & { + messageSerialize: string; + walletSerialize: string; +}; + +export type BenfenRequest = { + 'hasPermissions': (permissions: readonly PermissionType[]) => Promise; + + 'requestPermissions': (permissions: readonly PermissionType[]) => Promise; + + 'disconnect': () => Promise; + + 'getActiveChain': () => Promise; + + 'getAccounts': () => Promise; + + 'signAndExecuteTransactionBlock': ( + input: SignAndExecuteTransactionBlockInput, + ) => Promise; + + 'signTransactionBlock': ( + input: SignTransactionBlockInput, + ) => Promise; + + 'signMessage': (input: SignMessageInput) => Promise; + + 'signPersonalMessage': (input: SignPersonalMessageInput) => Promise; +}; + +type JsBridgeRequest = { + [K in keyof BenfenRequest]: ( + params: Parameters[0], + ) => Promise>>>; +}; + +type JsBridgeRequestParams = Parameters[0]; + +type JsBridgeRequestResponse = ReturnType; + +export type PROVIDER_EVENTS_STRINGS = keyof typeof PROVIDER_EVENTS; + +export interface IProviderBfc { + hasPermissions(permissions: readonly PermissionType[]): Promise; + + requestPermissions(permissions: readonly PermissionType[]): Promise; + + /** + * Disconnect wallet + */ + disconnect(): Promise; + + /** + * Connect wallet, and get wallet info + * @emits `connect` on success + */ + getAccounts(): Promise; +} + +export type OneKeyBfcProviderProps = IInpageProviderConfig & { + timeout?: number; +}; + +function isWalletEventMethodMatch({ method, name }: { method: string; name: string }) { + return method === `wallet_events_${name}`; +} + +class ProviderBfc extends ProviderBfcBase implements IProviderBfc { + protected _account: AccountInfo | null = null; + + constructor(props: OneKeyBfcProviderProps) { + super({ + ...props, + bridge: props.bridge || getOrCreateExtInjectedJsBridge({ timeout: props.timeout }), + }); + + this._registerEvents(); + } + + private _registerEvents() { + window.addEventListener('onekey_bridge_disconnect', () => { + this._handleDisconnected(); + }); + + this.on(PROVIDER_EVENTS.message_low_level, (payload) => { + if (!payload) return; + const { method, params } = payload; + + if (isWalletEventMethodMatch({ method, name: PROVIDER_EVENTS.accountChanged })) { + this._handleAccountChange(params as AccountInfo | undefined); + } + + if (isWalletEventMethodMatch({ method, name: PROVIDER_EVENTS.networkChange })) { + this._handleNetworkChange(params as string); + } + }); + } + + private _callBridge(params: { + method: T; + params: JsBridgeRequestParams; + }): JsBridgeRequestResponse { + return this.bridgeRequest(params) as JsBridgeRequestResponse; + } + + private _handleConnected(account: AccountInfo, options: { emit: boolean } = { emit: true }) { + if (options.emit) { + this.emit('connect', account?.address ?? null); + this.emit( + 'accountChanged', + account ? { address: account?.address, publicKey: account?.publicKey } : null, + ); + } + } + + private _handleDisconnected(options: { emit: boolean } = { emit: true }) { + this._account = null; + + if (options.emit) { + this.emit('disconnect'); + this.emit('accountChanged', null); + } + } + + isAccountsChanged(account: AccountInfo | undefined) { + return account?.address !== this._account?.address; + } + + // trigger by bridge account change event + private _handleAccountChange(payload: AccountInfo | undefined) { + if (!payload) { + this._handleDisconnected(); + return; + } + + if (this.isAccountsChanged(payload)) { + this._handleConnected(payload); + } + + this._account = payload; + } + + private _network: string | null | undefined; + isNetworkChanged(network: string) { + return this._network === undefined || network !== this._network; + } + + private _handleNetworkChange(payload: string) { + const network = payload; + if (this.isNetworkChanged(network)) { + this.emit('networkChange', network || null); + } + this._network = network; + } + + async hasPermissions(permissions: readonly PermissionType[] = ALL_PERMISSION_TYPES) { + return await this._callBridge({ + method: 'hasPermissions', + params: permissions, + }); + } + + async requestPermissions(permissions: readonly PermissionType[] = ALL_PERMISSION_TYPES) { + return await this._callBridge({ + method: 'requestPermissions', + params: permissions, + }); + } + + async disconnect(): Promise { + await this._callBridge({ + method: 'disconnect', + params: void 0, + }); + this._handleDisconnected(); + } + + async getAccounts() { + const accounts = await this._callBridge({ + method: 'getAccounts', + params: undefined, + }); + if (accounts.length === 0) { + this._handleDisconnected(); + throw web3Errors.provider.unauthorized(); + } + return accounts; + } + + async getActiveChain() { + return this._callBridge({ + method: 'getActiveChain', + params: undefined, + }); + } + + async signAndExecuteTransactionBlock( + input: BenfenSignAndExecuteTransactionBlockInput, + ): Promise { + return this._callBridge({ + method: 'signAndExecuteTransactionBlock', + params: { + ...input, + // https://github.com/MystenLabs/sui/blob/ace69fa8404eb704b504082d324ebc355a3d2948/sdk/typescript/src/transactions/object.ts#L6-L17 + // With a few more objects, other wallets have steps for tojson. + transactionBlock: TransactionBlock.from(input.transactionBlock.serialize()), + walletSerialize: JSON.stringify(input.account), + blockSerialize: input.transactionBlock.serialize(), + }, + }) as Promise; + } + + async signTransactionBlock( + input: BenfenSignTransactionBlockInput, + ): Promise { + return this._callBridge({ + method: 'signTransactionBlock', + params: { + ...input, + transactionBlock: TransactionBlock.from(input.transactionBlock.serialize()), + walletSerialize: JSON.stringify(input.account), + blockSerialize: input.transactionBlock.serialize(), + }, + }); + } + + async signMessage(input: BenfenSignMessageInput): Promise { + return this._callBridge({ + method: 'signMessage', + params: { + ...input, + walletSerialize: JSON.stringify(input.account), + messageSerialize: bytesToHex(input.message), + }, + }); + } + + async signPersonalMessage( + input: BenfenSignPersonalMessageInput, + ): Promise { + return this._callBridge({ + method: 'signPersonalMessage', + params: { + ...input, + walletSerialize: JSON.stringify(input.account), + messageSerialize: bytesToHex(input.message), + }, + }); + } + + isConnected() { + return this._account !== null; + } + + onNetworkChange(listener: BfcProviderEventsMap['networkChange']): this { + return super.on(PROVIDER_EVENTS.networkChange, listener); + } + + onAccountChange(listener: BfcProviderEventsMap['accountChanged']): this { + return super.on(PROVIDER_EVENTS.accountChanged, listener); + } + + on(event: E, listener: BfcProviderEventsMap[E]): this { + return super.on(event, listener); + } + + emit( + event: E, + ...args: Parameters + ): boolean { + return super.emit(event, ...args); + } +} + +export { ProviderBfc }; diff --git a/packages/providers/onekey-bfc-provider/src/OnekeyBfcStandardWallet.ts b/packages/providers/onekey-bfc-provider/src/OnekeyBfcStandardWallet.ts new file mode 100644 index 00000000..131c6c0b --- /dev/null +++ b/packages/providers/onekey-bfc-provider/src/OnekeyBfcStandardWallet.ts @@ -0,0 +1,238 @@ +import { hexToBytes } from '@noble/hashes/utils'; +import mitt, { Emitter } from 'mitt'; +import { + IdentifierArray, + IdentifierString, + ReadonlyWalletAccount, + registerWallet, + StandardConnectFeature, + StandardConnectMethod, + StandardDisconnectFeature, + StandardDisconnectMethod, + StandardEventsFeature, + StandardEventsListeners, + StandardEventsOnMethod, + BFC_DEVNET_CHAIN, + BFC_TESTNET_CHAIN, + BenfenSignAndExecuteTransactionBlockFeature, + BenfenSignAndExecuteTransactionBlockMethod, + BenfenSignMessageFeature, + BenfenSignMessageMethod, + BenfenSignPersonalMessageFeature, + BenfenSignPersonalMessageMethod, + BenfenSignTransactionBlockFeature, + BenfenSignTransactionBlockMethod, + Wallet, +} from '@benfen/bfc.js/wallet-standard'; +import { ProviderBfc } from './OnekeyBfcProvider'; +import { AccountInfo, ALL_PERMISSION_TYPES, PermissionType, WalletInfo } from './types'; + +type WalletEventsMap = { + [E in keyof StandardEventsListeners]: Parameters[0]; +}; + +type Features = StandardConnectFeature & + StandardDisconnectFeature & + StandardEventsFeature & + BenfenSignAndExecuteTransactionBlockFeature & + BenfenSignTransactionBlockFeature & + BenfenSignMessageFeature & + BenfenSignPersonalMessageFeature; + +enum Feature { + STANDARD__CONNECT = 'standard:connect', + STANDARD__DISCONNECT = 'standard:disconnect', + STANDARD__EVENTS = 'standard:events', + BFC__SIGN_AND_EXECUTE_TRANSACTION_BLOCK = 'bfc:signAndExecuteTransactionBlock', + BFC__SIGN_TRANSACTION_BLOCK = 'bfc:signTransactionBlock', + BFC__SIGN_MESSAGE = 'bfc:signMessage', + BFC__SIGN_PERSONAL_MESSAGE = 'bfc:signPersonalMessage', +} + +class OnekeyBfcStandardWallet implements Wallet { + readonly version = '1.0.0' as const; + readonly _name = 'OneKey Wallet' as const; + readonly provider: ProviderBfc; + readonly options?: WalletInfo; + + _events: Emitter; + _account: ReadonlyWalletAccount | null; + + get name() { + return this.options?.name ?? this._name; + } + + get icon() { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any + return (this.options?.logo || '') as any; + } + + get chains() { + return [BFC_DEVNET_CHAIN, BFC_TESTNET_CHAIN] as IdentifierArray; + } + + get accounts() { + return this._account ? [this._account] : []; + } + + get features(): Features { + return { + [Feature.STANDARD__CONNECT]: { + version: '1.0.0', + connect: this.$connect, + }, + [Feature.STANDARD__DISCONNECT]: { + version: '1.0.0', + disconnect: this.$disconnect, + }, + [Feature.STANDARD__EVENTS]: { + version: '1.0.0', + on: this.$on, + }, + [Feature.BFC__SIGN_AND_EXECUTE_TRANSACTION_BLOCK]: { + version: '1.0.0', + signAndExecuteTransactionBlock: this.$signAndExecuteTransactionBlock, + }, + [Feature.BFC__SIGN_TRANSACTION_BLOCK]: { + version: '1.0.0', + signTransactionBlock: this.$signTransactionBlock, + }, + [Feature.BFC__SIGN_MESSAGE]: { + version: '1.0.0', + signMessage: this.$signMessage, + }, + [Feature.BFC__SIGN_PERSONAL_MESSAGE]: { + version: '1.0.0', + signPersonalMessage: this.$signPersonalMessage, + }, + }; + } + + constructor(provider: ProviderBfc, options?: WalletInfo) { + this.provider = provider; + this._events = mitt(); + this._account = null; + this.options = options; + this.subscribeEventFromBackend(); + void this.$connected(); + } + + $on: StandardEventsOnMethod = (event, listener) => { + this._events.on(event, listener); + return () => this._events.off(event, listener); + }; + + $connected = async () => { + if (!(await this.$hasPermissions(['viewAccount']))) { + return; + } + const accounts = await this.provider.getAccounts(); + const [account] = accounts; + + const activateAccount = this._account; + if (activateAccount && activateAccount.address === account.address) { + return { accounts: this.accounts }; + } + + if (account) { + await this.handleAccountSwitch(account); + return { accounts: this.accounts }; + } + }; + + $connect: StandardConnectMethod = async (input) => { + if (!input?.silent) { + await this.provider.requestPermissions(); + } + + await this.$connected(); + + return { accounts: this.accounts }; + }; + + $disconnect: StandardDisconnectMethod = async () => { + await this.provider.disconnect(); + this._account = null; + this._events.all.clear(); + }; + + getActiveChain() { + return this.provider.getActiveChain(); + } + + $hasPermissions(permissions: readonly PermissionType[] = ALL_PERMISSION_TYPES) { + return this.provider.hasPermissions(permissions); + } + + $signAndExecuteTransactionBlock: BenfenSignAndExecuteTransactionBlockMethod = async (input) => { + return this.provider.signAndExecuteTransactionBlock(input); + }; + + $signTransactionBlock: BenfenSignTransactionBlockMethod = async (input) => { + return this.provider.signTransactionBlock(input); + }; + + $signMessage: BenfenSignMessageMethod = async (input) => { + return this.provider.signMessage(input); + }; + + $signPersonalMessage: BenfenSignPersonalMessageMethod = async (input) => { + return this.provider.signPersonalMessage(input); + }; + + subscribeEventFromBackend() { + this.provider.onNetworkChange((network) => { + if (!network) { + return; + } + this.handleNetworkSwitch({ network: network }); + }); + + this.provider.onAccountChange((account) => { + if (!account) { + return; + } + void this.handleAccountSwitch(account); + }); + } + + handleAccountSwitch = async (payload: AccountInfo) => { + const { address, publicKey } = payload; + + const activateChain = await this.getActiveChain(); + this._account = new ReadonlyWalletAccount({ + address: address, + publicKey: hexToBytes(publicKey), + chains: activateChain ? [activateChain] : [], + features: [ + Feature.STANDARD__CONNECT, + Feature.BFC__SIGN_AND_EXECUTE_TRANSACTION_BLOCK, + Feature.BFC__SIGN_TRANSACTION_BLOCK, + Feature.BFC__SIGN_MESSAGE, + Feature.BFC__SIGN_PERSONAL_MESSAGE, + ], + }); + + this._events.emit('change', { + accounts: this.accounts, + chains: activateChain ? [activateChain] : [], + }); + }; + + handleNetworkSwitch = (payload: { network: string }) => { + const { network } = payload; + + this._events.emit('change', { + accounts: this.accounts, + chains: [network as IdentifierString], + }); + }; +} + +export function registerBfcWallet(provider: ProviderBfc, options?: WalletInfo) { + try { + registerWallet(new OnekeyBfcStandardWallet(provider, options)); + } catch (error) { + console.error(error); + } +} diff --git a/packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccountBase.ts b/packages/providers/onekey-bfc-provider/src/ProviderBfcBase.ts similarity index 61% rename from packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccountBase.ts rename to packages/providers/onekey-bfc-provider/src/ProviderBfcBase.ts index 0e989351..8acb88be 100644 --- a/packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccountBase.ts +++ b/packages/providers/onekey-bfc-provider/src/ProviderBfcBase.ts @@ -1,16 +1,17 @@ import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types'; + import { ProviderBase, IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core'; -class ProviderPrivateExternalAccountBase extends ProviderBase { +class ProviderBfcBase extends ProviderBase { constructor(props: IInpageProviderConfig) { super(props); } - protected readonly providerName = IInjectedProviderNames.$privateExternalAccount; + protected providerName = IInjectedProviderNames.bfc; request(data: unknown) { return this.bridgeRequest(data); } } -export { ProviderPrivateExternalAccountBase }; +export { ProviderBfcBase }; diff --git a/packages/providers/onekey-bfc-provider/src/index.spec.ts b/packages/providers/onekey-bfc-provider/src/index.spec.ts new file mode 100644 index 00000000..87f6b81f --- /dev/null +++ b/packages/providers/onekey-bfc-provider/src/index.spec.ts @@ -0,0 +1,6 @@ + +describe('EMPTY', () => { + test('#activate', () => { + // expect(EMPTY.provider).toBeUndefined() + }) +}) diff --git a/packages/providers/onekey-bfc-provider/src/index.ts b/packages/providers/onekey-bfc-provider/src/index.ts new file mode 100644 index 00000000..671ae3f3 --- /dev/null +++ b/packages/providers/onekey-bfc-provider/src/index.ts @@ -0,0 +1,4 @@ +export * from './OnekeyBfcProvider'; +export * from './ProviderBfcBase'; +export { registerBfcWallet } from './OnekeyBfcStandardWallet'; +export * from './types'; diff --git a/packages/providers/onekey-private-external-account-provider/src/type-utils.ts b/packages/providers/onekey-bfc-provider/src/type-utils.ts similarity index 100% rename from packages/providers/onekey-private-external-account-provider/src/type-utils.ts rename to packages/providers/onekey-bfc-provider/src/type-utils.ts diff --git a/packages/providers/onekey-bfc-provider/src/types.ts b/packages/providers/onekey-bfc-provider/src/types.ts new file mode 100644 index 00000000..183a6681 --- /dev/null +++ b/packages/providers/onekey-bfc-provider/src/types.ts @@ -0,0 +1,17 @@ +import { BfcChain} from '@benfen/bfc.js/wallet-standard' +export const ALL_PERMISSION_TYPES = ['viewAccount', 'suggestTransactions'] as const; +type AllPermissionsType = typeof ALL_PERMISSION_TYPES; + +export type PermissionType = AllPermissionsType[number]; + +export type WalletInfo = { + name?: string; + logo: string; +}; + +export type BfcChainType = BfcChain; + +export interface AccountInfo { + address: string; + publicKey: string; +} \ No newline at end of file diff --git a/packages/providers/onekey-private-external-account-provider/tsconfig.cjs.json b/packages/providers/onekey-bfc-provider/tsconfig.cjs.json similarity index 55% rename from packages/providers/onekey-private-external-account-provider/tsconfig.cjs.json rename to packages/providers/onekey-bfc-provider/tsconfig.cjs.json index b84d58a7..e3132dfa 100644 --- a/packages/providers/onekey-private-external-account-provider/tsconfig.cjs.json +++ b/packages/providers/onekey-bfc-provider/tsconfig.cjs.json @@ -1,9 +1,7 @@ { "extends": "../../../tsconfig.cjs.json", - "include": [ - "./src" - ], + "include": ["./src"], "compilerOptions": { - "outDir": "./dist/cjs" + "outDir": "./dist/cjs", } } diff --git a/packages/providers/onekey-private-external-account-provider/tsconfig.json b/packages/providers/onekey-bfc-provider/tsconfig.json similarity index 56% rename from packages/providers/onekey-private-external-account-provider/tsconfig.json rename to packages/providers/onekey-bfc-provider/tsconfig.json index e2747126..5dd1e395 100644 --- a/packages/providers/onekey-private-external-account-provider/tsconfig.json +++ b/packages/providers/onekey-bfc-provider/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../../tsconfig.json", - "include": [ - "./src" - ], + "include": ["./src"], "compilerOptions": { - "outDir": "./dist" + "outDir": "./dist", } } diff --git a/packages/providers/onekey-bfc-provider/yarn.lock b/packages/providers/onekey-bfc-provider/yarn.lock new file mode 100644 index 00000000..64f7047c --- /dev/null +++ b/packages/providers/onekey-bfc-provider/yarn.lock @@ -0,0 +1,737 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@0no-co/graphql.web@^1.0.5": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@0no-co/graphql.web/-/graphql.web-1.0.11.tgz#035cbc6523af43358b81993f10b13e8d7a79c816" + integrity sha512-xuSJ9WXwTmtngWkbdEoopMo6F8NLtjy84UNAMsAr5C3/2SgAL/dEU10TMqTIsipqPQ8HA/7WzeqQ9DEQxSvPPA== + +"@0no-co/graphqlsp@^1.12.13": + version "1.12.16" + resolved "https://registry.yarnpkg.com/@0no-co/graphqlsp/-/graphqlsp-1.12.16.tgz#58fe7bad53b3ad9fdf2d5f41ddeb9b418d289a03" + integrity sha512-B5pyYVH93Etv7xjT6IfB7QtMBdaaC07yjbhN6v8H7KgFStMkPvi+oWYBTibMFRMY89qwc9H8YixXg8SXDVgYWw== + dependencies: + "@gql.tada/internal" "^1.0.0" + graphql "^15.5.0 || ^16.0.0 || ^17.0.0" + +"@babel/runtime@^7.12.5": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + +"@benfen/bfc.js@0.2.7": + version "0.2.7" + resolved "https://registry.yarnpkg.com/@benfen/bfc.js/-/bfc.js-0.2.7.tgz#b9dbe6190a95c2c85d1699f7fff37bd5b40aae84" + integrity sha512-P7Xc72DHLA3iNa1veThwYYnuK8skJImBvezMtQlAaCIlmuLjOzGpQLfj9Cc3PaLF8gbZ4sv2mLbqKE3oVUx2eA== + dependencies: + "@graphql-typed-document-node/core" "^3.2.0" + "@noble/curves" "^1.1.0" + "@noble/hashes" "^1.3.1" + "@radix-ui/react-dialog" "^1.0.5" + "@radix-ui/react-dropdown-menu" "^2.0.6" + "@radix-ui/react-slot" "^1.0.2" + "@scure/bip32" "^1.3.1" + "@scure/bip39" "^1.2.1" + "@stitches/react" "^1.2.8" + "@suchipi/femver" "^1.0.0" + "@vanilla-extract/css" "^1.15.3" + "@vanilla-extract/dynamic" "^2.1.1" + "@vanilla-extract/recipes" "^0.5.3" + "@wallet-standard/core" "^1.0.3" + bech32 "^2.0.0" + bignumber.js "^9.1.1" + bs58 "^5.0.0" + clsx "^2.0.0" + events "^3.3.0" + fast-sha256 "^1.3.0" + gql.tada "^1.4.1" + graphql "^16.8.1" + jose "^5.4.1" + mitt "^3.0.1" + poseidon-lite "^0.2.0" + superstruct "^1.0.3" + tweetnacl "^1.0.3" + valibot "^0.25.0" + zustand "^4.4.1" + +"@emotion/hash@^0.9.0": + version "0.9.2" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.2.tgz#ff9221b9f58b4dfe61e619a7788734bd63f6898b" + integrity sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g== + +"@floating-ui/core@^1.6.0": + version "1.6.8" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" + integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== + dependencies: + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/dom@^1.0.0": + version "1.6.12" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.12.tgz#6333dcb5a8ead3b2bf82f33d6bc410e95f54e556" + integrity sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w== + dependencies: + "@floating-ui/core" "^1.6.0" + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/react-dom@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== + dependencies: + "@floating-ui/dom" "^1.0.0" + +"@floating-ui/utils@^0.2.8": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" + integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== + +"@gql.tada/cli-utils@1.6.3": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@gql.tada/cli-utils/-/cli-utils-1.6.3.tgz#b893cec74908da4df0602691e2e0b1497fda8cda" + integrity sha512-jFFSY8OxYeBxdKi58UzeMXG1tdm4FVjXa8WHIi66Gzu9JWtCE6mqom3a8xkmSw+mVaybFW5EN2WXf1WztJVNyQ== + dependencies: + "@0no-co/graphqlsp" "^1.12.13" + "@gql.tada/internal" "1.0.8" + graphql "^15.5.0 || ^16.0.0 || ^17.0.0" + +"@gql.tada/internal@1.0.8", "@gql.tada/internal@^1.0.0": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@gql.tada/internal/-/internal-1.0.8.tgz#3ba9fa6534809788bbbe103492f70b8e9d754027" + integrity sha512-XYdxJhtHC5WtZfdDqtKjcQ4d7R1s0d1rnlSs3OcBEUbYiPoJJfZU7tWsVXuv047Z6msvmr4ompJ7eLSK5Km57g== + dependencies: + "@0no-co/graphql.web" "^1.0.5" + +"@graphql-typed-document-node/core@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" + integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== + +"@noble/curves@^1.1.0", "@noble/curves@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== + dependencies: + "@noble/hashes" "1.6.0" + +"@noble/hashes@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== + +"@noble/hashes@^1.3.1", "@noble/hashes@~1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + +"@radix-ui/primitive@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.0.tgz#42ef83b3b56dccad5d703ae8c42919a68798bbe2" + integrity sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA== + +"@radix-ui/react-arrow@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz#744f388182d360b86285217e43b6c63633f39e7a" + integrity sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw== + dependencies: + "@radix-ui/react-primitive" "2.0.0" + +"@radix-ui/react-collection@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.1.0.tgz#f18af78e46454a2360d103c2251773028b7724ed" + integrity sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-slot" "1.1.0" + +"@radix-ui/react-compose-refs@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz#656432461fc8283d7b591dcf0d79152fae9ecc74" + integrity sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw== + +"@radix-ui/react-context@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.0.tgz#6df8d983546cfd1999c8512f3a8ad85a6e7fcee8" + integrity sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A== + +"@radix-ui/react-context@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.1.tgz#82074aa83a472353bb22e86f11bcbd1c61c4c71a" + integrity sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q== + +"@radix-ui/react-dialog@^1.0.5": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.1.2.tgz#d9345575211d6f2d13e209e84aec9a8584b54d6c" + integrity sha512-Yj4dZtqa2o+kG61fzB0H2qUvmwBA2oyQroGLyNtBj1beo1khoQ3q1a2AO8rrQYjd8256CO9+N8L9tvsS+bnIyA== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-dismissable-layer" "1.1.1" + "@radix-ui/react-focus-guards" "1.1.1" + "@radix-ui/react-focus-scope" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-portal" "1.1.2" + "@radix-ui/react-presence" "1.1.1" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-slot" "1.1.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + aria-hidden "^1.1.1" + react-remove-scroll "2.6.0" + +"@radix-ui/react-direction@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.1.0.tgz#a7d39855f4d077adc2a1922f9c353c5977a09cdc" + integrity sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg== + +"@radix-ui/react-dismissable-layer@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.1.tgz#cbdcb739c5403382bdde5f9243042ba643883396" + integrity sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-escape-keydown" "1.1.0" + +"@radix-ui/react-dropdown-menu@^2.0.6": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.2.tgz#acc49577130e3c875ef0133bd1e271ea3392d924" + integrity sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-menu" "2.1.2" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + +"@radix-ui/react-focus-guards@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.1.tgz#8635edd346304f8b42cae86b05912b61aef27afe" + integrity sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg== + +"@radix-ui/react-focus-scope@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz#ebe2891a298e0a33ad34daab2aad8dea31caf0b2" + integrity sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-id@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.0.tgz#de47339656594ad722eb87f94a6b25f9cffae0ed" + integrity sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-menu@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-menu/-/react-menu-2.1.2.tgz#91f6815845a4298dde775563ed2d80b7ad667899" + integrity sha512-lZ0R4qR2Al6fZ4yCCZzu/ReTFrylHFxIqy7OezIpWF4bL0o9biKo0pFIvkaew3TyZ9Fy5gYVrR5zCGZBVbO1zg== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-collection" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.1" + "@radix-ui/react-direction" "1.1.0" + "@radix-ui/react-dismissable-layer" "1.1.1" + "@radix-ui/react-focus-guards" "1.1.1" + "@radix-ui/react-focus-scope" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-popper" "1.2.0" + "@radix-ui/react-portal" "1.1.2" + "@radix-ui/react-presence" "1.1.1" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-roving-focus" "1.1.0" + "@radix-ui/react-slot" "1.1.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + aria-hidden "^1.1.1" + react-remove-scroll "2.6.0" + +"@radix-ui/react-popper@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.0.tgz#a3e500193d144fe2d8f5d5e60e393d64111f2a7a" + integrity sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg== + dependencies: + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + "@radix-ui/react-use-rect" "1.1.0" + "@radix-ui/react-use-size" "1.1.0" + "@radix-ui/rect" "1.1.0" + +"@radix-ui/react-portal@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.2.tgz#51eb46dae7505074b306ebcb985bf65cc547d74e" + integrity sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg== + dependencies: + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-presence@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.1.tgz#98aba423dba5e0c687a782c0669dcd99de17f9b1" + integrity sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/react-primitive@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz#fe05715faa9203a223ccc0be15dc44b9f9822884" + integrity sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw== + dependencies: + "@radix-ui/react-slot" "1.1.0" + +"@radix-ui/react-roving-focus@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz#b30c59daf7e714c748805bfe11c76f96caaac35e" + integrity sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-collection" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-direction" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + +"@radix-ui/react-slot@1.1.0", "@radix-ui/react-slot@^1.0.2": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.1.0.tgz#7c5e48c36ef5496d97b08f1357bb26ed7c714b84" + integrity sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw== + dependencies: + "@radix-ui/react-compose-refs" "1.1.0" + +"@radix-ui/react-use-callback-ref@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz#bce938ca413675bc937944b0d01ef6f4a6dc5bf1" + integrity sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw== + +"@radix-ui/react-use-controllable-state@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz#1321446857bb786917df54c0d4d084877aab04b0" + integrity sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-use-escape-keydown@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz#31a5b87c3b726504b74e05dac1edce7437b98754" + integrity sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw== + dependencies: + "@radix-ui/react-use-callback-ref" "1.1.0" + +"@radix-ui/react-use-layout-effect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz#3c2c8ce04827b26a39e442ff4888d9212268bd27" + integrity sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w== + +"@radix-ui/react-use-rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz#13b25b913bd3e3987cc9b073a1a164bb1cf47b88" + integrity sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ== + dependencies: + "@radix-ui/rect" "1.1.0" + +"@radix-ui/react-use-size@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz#b4dba7fbd3882ee09e8d2a44a3eed3a7e555246b" + integrity sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw== + dependencies: + "@radix-ui/react-use-layout-effect" "1.1.0" + +"@radix-ui/rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438" + integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg== + +"@scure/base@~1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== + +"@scure/bip32@^1.3.1": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.0.tgz#6dbc6b4af7c9101b351f41231a879d8da47e0891" + integrity sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA== + dependencies: + "@noble/curves" "~1.7.0" + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + +"@scure/bip39@^1.2.1": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.0.tgz#c8f9533dbd787641b047984356531d84485f19be" + integrity sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A== + dependencies: + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + +"@stitches/react@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@stitches/react/-/react-1.2.8.tgz#954f8008be8d9c65c4e58efa0937f32388ce3a38" + integrity sha512-9g9dWI4gsSVe8bNLlb+lMkBYsnIKCZTmvqvDG+Avnn69XfmHZKiaMrx7cgTaddq7aTPPmXiTsbFcUy0xgI4+wA== + +"@suchipi/femver@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@suchipi/femver/-/femver-1.0.0.tgz#4909dcc069695e07bd23a64c4bfe411d11d9692f" + integrity sha512-bprE8+K5V+DPX7q2e2K57ImqNBdfGHDIWaGI5xHxZoxbKOuQZn4wzPiUxOAHnsUr3w3xHrWXwN7gnG/iIuEMIg== + +"@vanilla-extract/css@^1.15.3": + version "1.16.1" + resolved "https://registry.yarnpkg.com/@vanilla-extract/css/-/css-1.16.1.tgz#abf913da7fe1eba28bbdf0ce4d594c5aee385a13" + integrity sha512-3jKxH5ty/ZjmGoLAx8liY7e87FRCIJfnuufX/K9fQklu0YHP3ClrNisU++LkZuD+GZleqMSAQMF0r8Otln+OPQ== + dependencies: + "@emotion/hash" "^0.9.0" + "@vanilla-extract/private" "^1.0.6" + css-what "^6.1.0" + cssesc "^3.0.0" + csstype "^3.0.7" + dedent "^1.5.3" + deep-object-diff "^1.1.9" + deepmerge "^4.2.2" + lru-cache "^10.4.3" + media-query-parser "^2.0.2" + modern-ahocorasick "^1.0.0" + picocolors "^1.0.0" + +"@vanilla-extract/dynamic@^2.1.1": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@vanilla-extract/dynamic/-/dynamic-2.1.2.tgz#b1d1c1e0e392934c5a3bbb53f99069a7721311ac" + integrity sha512-9BGMciD8rO1hdSPIAh1ntsG4LPD3IYKhywR7VOmmz9OO4Lx1hlwkSg3E6X07ujFx7YuBfx0GDQnApG9ESHvB2A== + dependencies: + "@vanilla-extract/private" "^1.0.6" + +"@vanilla-extract/private@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@vanilla-extract/private/-/private-1.0.6.tgz#f10bbf3189f7b827d0bd7f804a6219dd03ddbdd4" + integrity sha512-ytsG/JLweEjw7DBuZ/0JCN4WAQgM9erfSTdS1NQY778hFQSZ6cfCDEZZ0sgVm4k54uNz6ImKB33AYvSR//fjxw== + +"@vanilla-extract/recipes@^0.5.3": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@vanilla-extract/recipes/-/recipes-0.5.5.tgz#da34e247be2c3d70e01ecfeb53310daadc608b74" + integrity sha512-VadU7+IFUwLNLMgks29AHav/K5h7DOEfTU91RItn5vwdPfzduodNg317YbgWCcpm7FSXkuR3B3X8ZOi95UOozA== + +"@wallet-standard/app@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/app/-/app-1.1.0.tgz#2ca32e4675536224ebe55a00ad533b7923d7380a" + integrity sha512-3CijvrO9utx598kjr45hTbbeeykQrQfKmSnxeWOgU25TOEpvcipD/bYDQWIqUv1Oc6KK4YStokSMu/FBNecGUQ== + dependencies: + "@wallet-standard/base" "^1.1.0" + +"@wallet-standard/base@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/base/-/base-1.1.0.tgz#214093c0597a1e724ee6dbacd84191dfec62bb33" + integrity sha512-DJDQhjKmSNVLKWItoKThJS+CsJQjR9AOBOirBVT1F9YpRyC9oYHE+ZnSf8y8bxUphtKqdQMPVQ2mHohYdRvDVQ== + +"@wallet-standard/core@^1.0.3": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/core/-/core-1.1.0.tgz#06a2193afe9cda41e626a8e990996e568138da91" + integrity sha512-v2W5q/NlX1qkn2q/JOXQT//pOAdrhz7+nOcO2uiH9+a0uvreL+sdWWqkhFmMcX+HEBjaibdOQMUoIfDhOGX4XA== + dependencies: + "@wallet-standard/app" "^1.1.0" + "@wallet-standard/base" "^1.1.0" + "@wallet-standard/errors" "^0.1.0" + "@wallet-standard/features" "^1.1.0" + "@wallet-standard/wallet" "^1.1.0" + +"@wallet-standard/errors@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/errors/-/errors-0.1.0.tgz#fb8ae75b365eb5d3c167ec6b88d3c9cb3039b928" + integrity sha512-ag0eq5ixy7rz8M5YUWGi/EoIJ69KJ+KILFNunoufgmXVkiISC7+NIZXJYTJrapni4f9twE1hfT+8+IV2CYCvmg== + dependencies: + chalk "^5.3.0" + commander "^12.1.0" + +"@wallet-standard/features@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/features/-/features-1.1.0.tgz#f256d7b18940c8d134f66164330db358a8f5200e" + integrity sha512-hiEivWNztx73s+7iLxsuD1sOJ28xtRix58W7Xnz4XzzA/pF0+aicnWgjOdA10doVDEDZdUuZCIIqG96SFNlDUg== + dependencies: + "@wallet-standard/base" "^1.1.0" + +"@wallet-standard/wallet@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wallet-standard/wallet/-/wallet-1.1.0.tgz#a1e46a3f1b2d06a0206058562169b1f0e9652d0f" + integrity sha512-Gt8TnSlDZpAl+RWOOAB/kuvC7RpcdWAlFbHNoi4gsXsfaWa1QCT6LBcfIYTPdOZC9OVZUDwqGuGAcqZejDmHjg== + dependencies: + "@wallet-standard/base" "^1.1.0" + +aria-hidden@^1.1.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/aria-hidden/-/aria-hidden-1.2.4.tgz#b78e383fdbc04d05762c78b4a25a501e736c4522" + integrity sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A== + dependencies: + tslib "^2.0.0" + +base-x@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== + +bech32@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" + integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== + +bignumber.js@^9.1.1: + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== + +bs58@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== + dependencies: + base-x "^4.0.0" + +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +clsx@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.1.tgz#eed397c9fd8bd882bfb18deab7102049a2f32999" + integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== + +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +csstype@^3.0.7: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + +dedent@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" + integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== + +deep-object-diff@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.9.tgz#6df7ef035ad6a0caa44479c536ed7b02570f4595" + integrity sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +detect-node-es@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/detect-node-es/-/detect-node-es-1.1.0.tgz#163acdf643330caa0b4cd7c21e7ee7755d6fa493" + integrity sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ== + +eth-rpc-errors@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" + integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== + dependencies: + fast-safe-stringify "^2.0.6" + +events@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +fast-safe-stringify@^2.0.6: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + +fast-sha256@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-sha256/-/fast-sha256-1.3.0.tgz#7916ba2054eeb255982608cccd0f6660c79b7ae6" + integrity sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ== + +get-nonce@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" + integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== + +gql.tada@^1.4.1: + version "1.8.10" + resolved "https://registry.yarnpkg.com/gql.tada/-/gql.tada-1.8.10.tgz#096a1b30d3c6fc74212fe07d507f01a4095f7f67" + integrity sha512-FrvSxgz838FYVPgZHGOSgbpOjhR+yq44rCzww3oOPJYi0OvBJjAgCiP6LEokZIYND2fUTXzQAyLgcvgw1yNP5A== + dependencies: + "@0no-co/graphql.web" "^1.0.5" + "@0no-co/graphqlsp" "^1.12.13" + "@gql.tada/cli-utils" "1.6.3" + "@gql.tada/internal" "1.0.8" + +"graphql@^15.5.0 || ^16.0.0 || ^17.0.0", graphql@^16.8.1: + version "16.9.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.9.0.tgz#1c310e63f16a49ce1fbb230bd0a000e99f6f115f" + integrity sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw== + +invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +jose@^5.4.1: + version "5.9.6" + resolved "https://registry.yarnpkg.com/jose/-/jose-5.9.6.tgz#77f1f901d88ebdc405e57cce08d2a91f47521883" + integrity sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^10.4.3: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + +media-query-parser@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/media-query-parser/-/media-query-parser-2.0.2.tgz#ff79e56cee92615a304a1c2fa4f2bd056c0a1d29" + integrity sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w== + dependencies: + "@babel/runtime" "^7.12.5" + +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== + +modern-ahocorasick@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/modern-ahocorasick/-/modern-ahocorasick-1.1.0.tgz#9b1fa15d4f654be20a2ad7ecc44ec9d7645bb420" + integrity sha512-sEKPVl2rM+MNVkGQt3ChdmD8YsigmXdn5NifZn6jiwn9LRJpWm8F3guhaqrJT/JOat6pwpbXEk6kv+b9DMIjsQ== + +picocolors@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +poseidon-lite@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/poseidon-lite/-/poseidon-lite-0.2.1.tgz#7ad98e3a3aa5b91a1fd3a61a87460e9e46fd76d6" + integrity sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog== + +react-remove-scroll-bar@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.6.tgz#3e585e9d163be84a010180b18721e851ac81a29c" + integrity sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g== + dependencies: + react-style-singleton "^2.2.1" + tslib "^2.0.0" + +react-remove-scroll@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.6.0.tgz#fb03a0845d7768a4f1519a99fdb84983b793dc07" + integrity sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ== + dependencies: + react-remove-scroll-bar "^2.3.6" + react-style-singleton "^2.2.1" + tslib "^2.1.0" + use-callback-ref "^1.3.0" + use-sidecar "^1.1.2" + +react-style-singleton@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.1.tgz#f99e420492b2d8f34d38308ff660b60d0b1205b4" + integrity sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g== + dependencies: + get-nonce "^1.0.0" + invariant "^2.2.4" + tslib "^2.0.0" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +superstruct@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/superstruct/-/superstruct-1.0.4.tgz#0adb99a7578bd2f1c526220da6571b2d485d91ca" + integrity sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ== + +tslib@^2.0.0, tslib@^2.1.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@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +typescript@^5: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== + +use-callback-ref@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.2.tgz#6134c7f6ff76e2be0b56c809b17a650c942b1693" + integrity sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA== + dependencies: + tslib "^2.0.0" + +use-sidecar@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2" + integrity sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw== + dependencies: + detect-node-es "^1.1.0" + tslib "^2.0.0" + +use-sync-external-store@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" + integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== + +valibot@^0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/valibot/-/valibot-0.25.0.tgz#bdbb3a6e910f983b5a65b56b2bff24dfd09064ca" + integrity sha512-cmD0ca15oyAbT75iYLNW6uU6doAeIwYfOshpXka/E1Bx4frzbkrgb7gvkI7K0YK/DVOksei4FfxWfRoBP3NFTg== + +zustand@^4.4.1: + version "4.5.5" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.5.tgz#f8c713041543715ec81a2adda0610e1dc82d4ad1" + integrity sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q== + dependencies: + use-sync-external-store "1.2.2" diff --git a/packages/providers/onekey-btc-provider/package.json b/packages/providers/onekey-btc-provider/package.json index d8103c4d..b28446e2 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-cardano-provider/package.json b/packages/providers/onekey-cardano-provider/package.json index 54382d50..4ecccbff 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider", "cardano" @@ -29,9 +29,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-conflux-provider/package.json b/packages/providers/onekey-conflux-provider/package.json index 29afa2a0..900be947 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-cosmos-provider/package.json b/packages/providers/onekey-cosmos-provider/package.json index 3a40c3dd..e432cffb 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", "mitt": "^3.0.0" diff --git a/packages/providers/onekey-cosmos-provider/src/OnekeyCosmosProvider.ts b/packages/providers/onekey-cosmos-provider/src/OnekeyCosmosProvider.ts index 9e5c2b4d..bb2de1ab 100644 --- a/packages/providers/onekey-cosmos-provider/src/OnekeyCosmosProvider.ts +++ b/packages/providers/onekey-cosmos-provider/src/OnekeyCosmosProvider.ts @@ -23,6 +23,7 @@ import type { StdSignature, StdSignDoc, } from './types'; +// @ts-ignore import Long from 'long'; import { CosmJSOfflineSigner, CosmJSOfflineSignerOnlyAmino } from './cosmjs'; import { isArray } from 'lodash'; @@ -450,7 +451,7 @@ class ProviderCosmos extends ProviderCosmosBase implements IProviderCosmos { bodyBytes: hexToBytes(res.signed.bodyBytes), // @ts-expect-error authInfoBytes: hexToBytes(res.signed.authInfoBytes), - // @ts-expect-error + // @ts-ignore accountNumber: Long.fromString(res.signed.accountNumber), chainId: res.signed.chainId, }, diff --git a/packages/providers/onekey-cosmos-provider/src/cosmjs.ts b/packages/providers/onekey-cosmos-provider/src/cosmjs.ts index e509cf84..c478bf0b 100644 --- a/packages/providers/onekey-cosmos-provider/src/cosmjs.ts +++ b/packages/providers/onekey-cosmos-provider/src/cosmjs.ts @@ -1,3 +1,4 @@ +// @ts-ignore import Long from 'long'; import { ProviderCosmos } from './OnekeyCosmosProvider'; import { diff --git a/packages/providers/onekey-eth-provider/package.json b/packages/providers/onekey-eth-provider/package.json index ef4cb3fb..ee1c7621 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "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 06276d1a..133df657 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -35,10 +35,10 @@ "near-api-js": "^0.44.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "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 a2485776..fad68b0c 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-polkadot-provider/package.json b/packages/providers/onekey-polkadot-provider/package.json index ae47d91c..76e56a49 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/hashes": "^1.3.0", - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "@polkadot/extension-inject": "^0.46.3", "eth-rpc-errors": "^4.0.3", "long": "^5.2.1", diff --git a/packages/providers/onekey-private-external-account-provider/.gitignore b/packages/providers/onekey-private-external-account-provider/.gitignore deleted file mode 100644 index 763301fc..00000000 --- a/packages/providers/onekey-private-external-account-provider/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dist/ -node_modules/ \ No newline at end of file diff --git a/packages/providers/onekey-private-external-account-provider/.nvmrc b/packages/providers/onekey-private-external-account-provider/.nvmrc deleted file mode 100644 index b3fa5aff..00000000 --- a/packages/providers/onekey-private-external-account-provider/.nvmrc +++ /dev/null @@ -1,2 +0,0 @@ -v16 -registry=https://registry.yarnpkg.com diff --git a/packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccount.ts b/packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccount.ts deleted file mode 100644 index c86deef4..00000000 --- a/packages/providers/onekey-private-external-account-provider/src/ProviderPrivateExternalAccount.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import { IInpageProviderConfig } from "@onekeyfe/cross-inpage-provider-core"; -import { ProviderPrivateExternalAccountBase } from "./ProviderPrivateExternalAccountBase"; -import { - JsBridgeRequest, - JsBridgeRequestParams, - JsBridgeRequestResponse, - PrivateExternalAccountProviderEventsMap, - IExternalAccount, - IProviderPrivateExternalAccount, - IBtcNetwork, - ISignTxRes -} from "./types"; - -function isWalletEventMethodMatch(method: string, name: string) { - return method === `metamask_${name}` || method === `wallet_events_${name}`; -} - -const PROVIDER_EVENTS = { - 'connect': 'connect', - 'disconnect': 'disconnect', - 'accountChanged': 'accountChanged', - 'message_low_level': 'message_low_level', -} as const; - - -class ProviderPrivateExternalAccount extends ProviderPrivateExternalAccountBase implements IProviderPrivateExternalAccount { - constructor(props: IInpageProviderConfig) { - super(props); - this._registerEvents() - } - - private _registerEvents() { - window.addEventListener('onekey_bridge_disconnect', () => { - this._handleDisconnected(); - }); - - this.on(PROVIDER_EVENTS.message_low_level, (payload) => { - const { method } = payload; - if (isWalletEventMethodMatch(method, PROVIDER_EVENTS.accountChanged)) { - this._handleAccountChange(); - } - }); - } - - private _handleDisconnected(options: { emit: boolean } = { emit: true }) { - if (options.emit && this.isConnectionStatusChanged('disconnected')) { - this.emit('disconnect'); - this.emit('accountChanged'); - } - } - - private _handleAccountChange() { - this.emit('accountChanged'); - } - - on( - event: E, - listener: PrivateExternalAccountProviderEventsMap[E] - ): this { - return super.on(event, listener); - } - - off( - event: E, - listener: PrivateExternalAccountProviderEventsMap[E] - ): this { - return super.off(event, listener); - } - - emit( - event: E, - ...args: Parameters - ): boolean { - return super.emit(event, ...args); - } - - private _callBridge(params: { - method: T; - params?: JsBridgeRequestParams; - }): JsBridgeRequestResponse { - return this.bridgeRequest(params) as JsBridgeRequestResponse - } - - async btc_requestAccount(network: IBtcNetwork): Promise { - const result = await this._callBridge({ method: "btc_requestAccount", params: network }); - return result - } - - async btc_signTransaction(params: { - psbtHex: string; - network: IBtcNetwork; - }): Promise { - const result = await this._callBridge({ method: "btc_signTransaction", params }); - return result - } -} - -export { ProviderPrivateExternalAccount }; diff --git a/packages/providers/onekey-private-external-account-provider/src/index.ts b/packages/providers/onekey-private-external-account-provider/src/index.ts deleted file mode 100644 index b19fb595..00000000 --- a/packages/providers/onekey-private-external-account-provider/src/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './ProviderPrivateExternalAccountBase' -export * from './ProviderPrivateExternalAccount'; -export * from './types' diff --git a/packages/providers/onekey-private-external-account-provider/src/types.ts b/packages/providers/onekey-private-external-account-provider/src/types.ts deleted file mode 100644 index 6cc66e14..00000000 --- a/packages/providers/onekey-private-external-account-provider/src/types.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { IJsonRpcRequest } from '@onekeyfe/cross-inpage-provider-types'; -import type * as TypeUtils from './type-utils'; -import { ProviderPrivateExternalAccountBase } from './ProviderPrivateExternalAccountBase'; - -export type Event = { - id?: string; - kind: EventKind; - pubkey?: string; - content: string; - tags: string[][]; - created_at: number; - sig?: string; -}; - -export enum EventKind { - Metadata = 0, - Text = 1, - RelayRec = 2, - Contacts = 3, - DM = 4, - Deleted = 5, -} - -export type IRelay = { - [url: string]: {read: boolean, write: boolean} -} - -export type IExternalAccount = { - address: string; - coinType: string; - path: string; - xpub: string; - template: string; -} - -export type IBtcNetwork = 'mainnet' | 'testnet' -export type ISignTxRes = { txid: string; rawTx: string; } - -export type PrivateExternalAccountRequeset = { - btc_requestAccount: (network: IBtcNetwork) => Promise; - btc_signTransaction: (params: {psbtHex: string; network: IBtcNetwork}) => Promise -} - -export type IProviderPrivateExternalAccount = ProviderPrivateExternalAccountBase & PrivateExternalAccountRequeset; - - -export type JsBridgeRequest = { - [K in keyof PrivateExternalAccountRequeset]: (params: Parameters[0]) => Promise>>> -} - -export type JsBridgeRequestParams = Parameters[0] - -export type JsBridgeRequestResponse = ReturnType - - -const PROVIDER_EVENTS = { - 'connect': 'connect', - 'disconnect': 'disconnect', - 'accountChanged': 'accountChanged', - 'message_low_level': 'message_low_level', -} as const; - -export type PrivateExternalAccountProviderEventsMap = { - [PROVIDER_EVENTS.connect]: (account: string) => void; - [PROVIDER_EVENTS.disconnect]: () => void; - [PROVIDER_EVENTS.accountChanged]: () => void; - [PROVIDER_EVENTS.message_low_level]: (payload: IJsonRpcRequest) => void; -}; diff --git a/packages/providers/onekey-private-provider/package.json b/packages/providers/onekey-private-provider/package.json index f2f02b45..c02dc48a 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-scdo-provider/package.json b/packages/providers/onekey-scdo-provider/package.json index 53359204..b1623c85 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/providers/onekey-solana-provider/package.json b/packages/providers/onekey-solana-provider/package.json index d18f9881..c2cd9f0c 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider", "solona" @@ -29,10 +29,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "@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 c3895044..ec04fbfc 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@mysten/wallet-standard": "^0.7.2", - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "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 a9d5e197..cd3a61ea 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,10 +28,10 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "@tonconnect/protocol": "^2.2.6" } } diff --git a/packages/providers/onekey-tron-provider/package.json b/packages/providers/onekey-tron-provider/package.json index e9fc166f..60af6473 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -29,10 +29,10 @@ }, "dependencies": { "@noble/secp256k1": "1.7.1", - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16", + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17", "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 0002a2b4..2c8abd63 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.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -28,9 +28,9 @@ "start": "tsc --watch" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-errors": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16", - "@onekeyfe/extension-bridge-injected": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-errors": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17", + "@onekeyfe/extension-bridge-injected": "2.1.17" } } diff --git a/packages/types/package.json b/packages/types/package.json index c8083490..c082d0a4 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/cross-inpage-provider-types", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 231802c2..4332c074 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -61,8 +61,8 @@ export enum IInjectedProviderNames { ton = 'ton', webln = 'webln', nostr = 'nostr', + bfc = 'bfc', $private = '$private', - $privateExternalAccount = '$privateExternalAccount', $hardware_sdk = '$hardware_sdk', $walletConnect = '$walletConnect' } diff --git a/packages/webview/package.json b/packages/webview/package.json index b0df4fc0..0a70b8a8 100644 --- a/packages/webview/package.json +++ b/packages/webview/package.json @@ -1,6 +1,6 @@ { "name": "@onekeyfe/onekey-cross-webview", - "version": "2.1.16", + "version": "2.1.17", "keywords": [ "cross-inpage-provider" ], @@ -36,7 +36,7 @@ "react-native-webview": "^11.17.2" }, "dependencies": { - "@onekeyfe/cross-inpage-provider-core": "2.1.16", - "@onekeyfe/cross-inpage-provider-types": "2.1.16" + "@onekeyfe/cross-inpage-provider-core": "2.1.17", + "@onekeyfe/cross-inpage-provider-types": "2.1.17" } } diff --git a/yarn.lock b/yarn.lock index 884472fc..c40ed3c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8613,11 +8613,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -"typescript@^3 || ^4", typescript@^4: +"typescript@^3 || ^4": version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== + uglify-js@^3.1.4: version "3.14.5" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.5.tgz#cdabb7d4954231d80cb4a927654c4655e51f4859"