@babylonlabs-io/wallet-connector 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/types.d.ts +0 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -16
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -89886,7 +89886,7 @@ class WalletConnector {
|
|
|
89886
89886
|
return this._ee.on(t, r);
|
|
89887
89887
|
}
|
|
89888
89888
|
}
|
|
89889
|
-
var Network = /* @__PURE__ */ ((e) => (e.MAINNET = "mainnet", e.
|
|
89889
|
+
var Network = /* @__PURE__ */ ((e) => (e.MAINNET = "mainnet", e.TESTNET = "testnet", e.SIGNET = "signet", e))(Network || {});
|
|
89890
89890
|
const defaultWalletGetter = (e) => (t) => t[e], createWallet = async ({ metadata: e, context: t, config: r }) => {
|
|
89891
89891
|
const {
|
|
89892
89892
|
id: n,
|
|
@@ -93986,15 +93986,6 @@ const COMPRESSED_PUBLIC_KEY_HEX_LENGTH = 66, NETWORKS = {
|
|
|
93986
93986
|
taproot: "bc1p"
|
|
93987
93987
|
}
|
|
93988
93988
|
},
|
|
93989
|
-
[Network.CANARY]: {
|
|
93990
|
-
name: "Canary",
|
|
93991
|
-
config: networks$1.bitcoin,
|
|
93992
|
-
addressPrefix: {
|
|
93993
|
-
common: "bc1",
|
|
93994
|
-
nativeSegWit: "bc1q",
|
|
93995
|
-
taproot: "bc1p"
|
|
93996
|
-
}
|
|
93997
|
-
},
|
|
93998
93989
|
[Network.TESTNET]: {
|
|
93999
93990
|
name: "Testnet",
|
|
94000
93991
|
config: networks$1.testnet,
|
|
@@ -94268,7 +94259,6 @@ const composeQRProcess = (e) => async (t, r) => {
|
|
|
94268
94259
|
label: "Hardware wallet"
|
|
94269
94260
|
}, logo$2 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='225px'%20height='224px'%20viewBox='0%200%20225%20224'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eokx%3c/title%3e%3cg%20id='Page-1'%20stroke='none'%20strokeWidth='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='okx'%20transform='translate(0.401000,%200.006000)'%20fill='%23000000'%20fill-rule='nonzero'%3e%3cpath%20d='M144.382,74.667%20L79.673,74.667%20C76.924,74.667%2074.695,76.895%2074.695,79.644%20L74.695,144.354%20C74.695,147.103%2076.924,149.332%2079.673,149.332%20L144.382,149.332%20C147.131,149.332%20149.36,147.103%20149.36,144.354%20L149.36,79.644%20C149.36,76.895%20147.131,74.667%20144.382,74.667%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M69.687,0%20L4.978,0%20C2.229,0%200,2.228%200,4.978%20L0,69.687%20C0,72.436%202.229,74.665%204.978,74.665%20L69.687,74.665%20C72.437,74.665%2074.665,72.436%2074.665,69.687%20L74.665,4.978%20C74.665,2.228%2072.437,0%2069.687,0%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M219.017,0%20L154.307,0%20C151.558,0%20149.329,2.228%20149.329,4.978%20L149.329,69.687%20C149.329,72.436%20151.558,74.665%20154.307,74.665%20L219.017,74.665%20C221.766,74.665%20223.994,72.436%20223.994,69.687%20L223.994,4.978%20C223.994,2.228%20221.766,0%20219.017,0%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M69.687,149.328%20L4.978,149.328%20C2.229,149.328%200,151.556%200,154.305%20L0,219.015%20C0,221.764%202.229,223.993%204.978,223.993%20L69.687,223.993%20C72.437,223.993%2074.665,221.764%2074.665,219.015%20L74.665,154.305%20C74.665,151.556%2072.437,149.328%2069.687,149.328%20Z'%20id='Path'%3e%3c/path%3e%3cpath%20d='M219.017,149.328%20L154.307,149.328%20C151.558,149.328%20149.329,151.556%20149.329,154.305%20L149.329,219.015%20C149.329,221.764%20151.558,223.993%20154.307,223.993%20L219.017,223.993%20C221.766,223.993%20223.994,221.764%20223.994,219.015%20L223.994,154.305%20C223.994,151.556%20221.766,149.328%20219.017,149.328%20Z'%20id='Path'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", PROVIDER_NAMES = {
|
|
94270
94261
|
[Network.MAINNET]: "bitcoin",
|
|
94271
|
-
[Network.CANARY]: "bitcoin",
|
|
94272
94262
|
[Network.TESTNET]: "bitcoinTestnet",
|
|
94273
94263
|
[Network.SIGNET]: "bitcoinSignet"
|
|
94274
94264
|
}, WALLET_PROVIDER_NAME$2 = "OKX";
|
|
@@ -94982,7 +94972,6 @@ function useWalletConnect() {
|
|
|
94982
94972
|
disconnect: u
|
|
94983
94973
|
};
|
|
94984
94974
|
}
|
|
94985
|
-
const ANIMATION_DELAY$1 = 1e3;
|
|
94986
94975
|
function useWalletConnectors({ persistent: e, accountStorage: t, onError: r }) {
|
|
94987
94976
|
const n = useChainProviders(), {
|
|
94988
94977
|
visible: o,
|
|
@@ -95025,21 +95014,19 @@ function useWalletConnectors({ persistent: e, accountStorage: t, onError: r }) {
|
|
|
95025
95014
|
description: "The Bitcoin address and Public Key for this wallet do not match. Please contact your wallet provider for support.",
|
|
95026
95015
|
onSubmit: D,
|
|
95027
95016
|
onCancel: () => {
|
|
95028
|
-
a == null || a(Z.id), p == null || p();
|
|
95017
|
+
Z.disconnect(), a == null || a(Z.id), p == null || p();
|
|
95029
95018
|
}
|
|
95030
95019
|
});
|
|
95031
95020
|
return;
|
|
95032
95021
|
}
|
|
95033
95022
|
if (T && !await T(((Tr = y.account) == null ? void 0 : Tr.address) ?? "")) {
|
|
95034
|
-
for (const l of F)
|
|
95035
|
-
await l.disconnect();
|
|
95036
95023
|
d == null || d({
|
|
95037
95024
|
title: "Connection Failed",
|
|
95038
95025
|
description: "The wallet cannot be connected.",
|
|
95039
95026
|
submitButton: "",
|
|
95040
95027
|
cancelButton: "Done",
|
|
95041
95028
|
onCancel: async () => {
|
|
95042
|
-
|
|
95029
|
+
Z.disconnect(), a == null || a(Z.id), p == null || p();
|
|
95043
95030
|
}
|
|
95044
95031
|
});
|
|
95045
95032
|
return;
|