btc-wallet 0.2.9 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/connector/index.d.ts +1 -0
- package/dist/connector/magicEden.d.ts +6 -0
- package/dist/core/btcWalletSelectorContext.d.ts +1 -1
- package/dist/index.js +26 -5
- package/dist/index.js.map +3 -3
- package/esm/index.js +26 -5
- package/esm/index.js.map +3 -3
- package/package.json +1 -1
package/esm/index.js
CHANGED
@@ -459,6 +459,22 @@ var XverseConnector = class extends BaseConnector {
|
|
459
459
|
_network = new WeakMap();
|
460
460
|
_event = new WeakMap();
|
461
461
|
|
462
|
+
// src/icons/magicEden.png
|
463
|
+
var magicEden_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAAgCAYAAABZyotbAAADGklEQVR42sVYTW7aQBT+ZsZk0yy8jWoqIxWK1E16A3KDcoLACRqkGKFugE0VAVLgBElOQHqC0BPUm0q0EMVVoWxZNCsYv25MlR/AY2O73xKZefO9ed+b7w0DgFm+ZrquPCdCAYAOwAbQM0btS0SIaa5aJ6AEIhPR49Ge2SxfM6Urb0B4Fowx1nj5o9WMhpTVJ8J7xA3OKsb3VpdNs9YFAaVN30VBbpqr1omogWQwXyxeZDhhexaJqDHNVetho8zyNTNBUgCga9qfQ+5pCnGQuzMbunTlDf4DuOqHYcjtpe7P12k3XjAnPe4MeJC/BCH3+431YZt249KXEPwIANgka1HgnPg0lFm+Zkopv6qU+aasAzQImPSfy+V+N+M05gCghQnrnRw2kfN0pYdPPOlCiObB8MyJXWOqZTnNVesR6EqXUt7cmQ09cWLryE2yVsm/tTOHXLensLyZSt33Q7eQMBpbpznO+dUmB/ME74xR255kTy8BdqywetcYtSqJntjDk5NS3vmRIqKmMWrbALBYLE88f+e3+kmYO1SF2ADRYJAed/6VacbpzoUQRTDmqCTu1+vTQqTEiKhJRDsaYeYIIcpPfz0YnjmC8yMAc4Vyr0deiulxp7ELOSK3vKl1HwzPHCIqKixTCNIllTUWlhwRNdPjztZy1jTNQcQI1DxCkHukq40uRckoM2flKmLpit5Gy2F19RSulEoXuuuiEtuJreCN3+Wwunr2VKBQzq9uW9eJ3GPbyKnoSnUAJRc9v3KO/II2Ru1LIUQGoCsANmO4BlD220iAAdRO37ZPwuxN27X7eOUWaO7aS92fk6+umCMEL4bdVySWKgjUBlDmCMGPdhlbtCRJeQOogl5Il1LWJ1kryPJfhBCDVTISJSal7CsOoDqCPyuUpJTOJGsVjVHbTqwUJ1mrBOAw5jAmgH7SGjtOKI45efvx0JfYcrlvRxKOJfsMx33mrUEQf7bdPeBzMpSYY3z7ZHMAlfXzkJrXU26/QnRVhspdsfKU7EEbvgBQ8Ehe7/r8taXdFzy96WBMj+ycQLbrUm9l5f4C3RupufZdcK8AAAAASUVORK5CYII=";
|
464
|
+
|
465
|
+
// src/connector/magicEden.ts
|
466
|
+
var MagicEdenConnector = class extends InjectedConnector {
|
467
|
+
constructor() {
|
468
|
+
super("magicEden.bitcoin");
|
469
|
+
this.metadata = {
|
470
|
+
id: "magic-eden",
|
471
|
+
name: "MagicEden Wallet",
|
472
|
+
icon: magicEden_default,
|
473
|
+
downloadUrl: "https://wallet.magiceden.io/"
|
474
|
+
};
|
475
|
+
}
|
476
|
+
};
|
477
|
+
|
462
478
|
// src/context/index.tsx
|
463
479
|
import { SmartAccount } from "@particle-network/aa";
|
464
480
|
import { chains as chains4 } from "@particle-network/chains";
|
@@ -2127,11 +2143,16 @@ function ComfirmBox({ onClose, status = 1, fromChain = {
|
|
2127
2143
|
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
2128
2144
|
var WalletSelectorContext = React.createContext(null);
|
2129
2145
|
function BtcWalletSelectorContextProvider({
|
2130
|
-
children
|
2131
|
-
autoConnect = false
|
2146
|
+
children
|
2132
2147
|
}) {
|
2133
2148
|
const [isProcessing, setIsProcessing] = useState8(false);
|
2134
|
-
const connectors = [
|
2149
|
+
const connectors = [
|
2150
|
+
new UnisatConnector(),
|
2151
|
+
new XverseConnector(),
|
2152
|
+
new OKXConnector(),
|
2153
|
+
new BitgetConnector(),
|
2154
|
+
new MagicEdenConnector()
|
2155
|
+
];
|
2135
2156
|
const walletSelectorContextValue = useMemo6(() => {
|
2136
2157
|
const simpleFn = {};
|
2137
2158
|
return {
|
@@ -2197,7 +2218,6 @@ function InitBtcWalletSelectorContext() {
|
|
2197
2218
|
return null;
|
2198
2219
|
}
|
2199
2220
|
function useBtcWalletSelector() {
|
2200
|
-
console.log("useBtcWalletSelector");
|
2201
2221
|
const { openConnectModal, openConnectModalAsync, disconnect, requestDirectAccount } = useConnectModal();
|
2202
2222
|
const { accounts, sendBitcoin: sendBitcoin2, getPublicKey, provider, signMessage, connector } = useBTCProvider();
|
2203
2223
|
const publicKey = useRef(null);
|
@@ -3064,7 +3084,7 @@ function executeBurrowSupply(_0) {
|
|
3064
3084
|
|
3065
3085
|
// src/index.ts
|
3066
3086
|
var getVersion = () => {
|
3067
|
-
return "0.
|
3087
|
+
return "0.3.1";
|
3068
3088
|
};
|
3069
3089
|
if (typeof window !== "undefined") {
|
3070
3090
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|
@@ -3076,6 +3096,7 @@ export {
|
|
3076
3096
|
BybitConnector,
|
3077
3097
|
ConnectProvider,
|
3078
3098
|
InjectedConnector,
|
3099
|
+
MagicEdenConnector,
|
3079
3100
|
OKXConnector,
|
3080
3101
|
TokenPocketConnector,
|
3081
3102
|
UnisatConnector,
|