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
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare function BtcWalletSelectorContextProvider({ children,
|
2
|
+
export declare function BtcWalletSelectorContextProvider({ children, }: {
|
3
3
|
children: React.ReactNode;
|
4
4
|
autoConnect?: boolean;
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
@@ -84,6 +84,7 @@ __export(src_exports, {
|
|
84
84
|
BybitConnector: () => BybitConnector,
|
85
85
|
ConnectProvider: () => ConnectProvider,
|
86
86
|
InjectedConnector: () => InjectedConnector,
|
87
|
+
MagicEdenConnector: () => MagicEdenConnector,
|
87
88
|
OKXConnector: () => OKXConnector,
|
88
89
|
TokenPocketConnector: () => TokenPocketConnector,
|
89
90
|
UnisatConnector: () => UnisatConnector,
|
@@ -508,6 +509,22 @@ var XverseConnector = class extends BaseConnector {
|
|
508
509
|
_network = new WeakMap();
|
509
510
|
_event = new WeakMap();
|
510
511
|
|
512
|
+
// src/icons/magicEden.png
|
513
|
+
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=";
|
514
|
+
|
515
|
+
// src/connector/magicEden.ts
|
516
|
+
var MagicEdenConnector = class extends InjectedConnector {
|
517
|
+
constructor() {
|
518
|
+
super("magicEden.bitcoin");
|
519
|
+
this.metadata = {
|
520
|
+
id: "magic-eden",
|
521
|
+
name: "MagicEden Wallet",
|
522
|
+
icon: magicEden_default,
|
523
|
+
downloadUrl: "https://wallet.magiceden.io/"
|
524
|
+
};
|
525
|
+
}
|
526
|
+
};
|
527
|
+
|
511
528
|
// src/context/index.tsx
|
512
529
|
var import_aa = require("@particle-network/aa");
|
513
530
|
var import_chains4 = require("@particle-network/chains");
|
@@ -2162,11 +2179,16 @@ function ComfirmBox({ onClose, status = 1, fromChain = {
|
|
2162
2179
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
2163
2180
|
var WalletSelectorContext = import_react11.default.createContext(null);
|
2164
2181
|
function BtcWalletSelectorContextProvider({
|
2165
|
-
children
|
2166
|
-
autoConnect = false
|
2182
|
+
children
|
2167
2183
|
}) {
|
2168
2184
|
const [isProcessing, setIsProcessing] = (0, import_react11.useState)(false);
|
2169
|
-
const connectors = [
|
2185
|
+
const connectors = [
|
2186
|
+
new UnisatConnector(),
|
2187
|
+
new XverseConnector(),
|
2188
|
+
new OKXConnector(),
|
2189
|
+
new BitgetConnector(),
|
2190
|
+
new MagicEdenConnector()
|
2191
|
+
];
|
2170
2192
|
const walletSelectorContextValue = (0, import_react11.useMemo)(() => {
|
2171
2193
|
const simpleFn = {};
|
2172
2194
|
return {
|
@@ -2232,7 +2254,6 @@ function InitBtcWalletSelectorContext() {
|
|
2232
2254
|
return null;
|
2233
2255
|
}
|
2234
2256
|
function useBtcWalletSelector() {
|
2235
|
-
console.log("useBtcWalletSelector");
|
2236
2257
|
const { openConnectModal, openConnectModalAsync, disconnect, requestDirectAccount } = useConnectModal();
|
2237
2258
|
const { accounts, sendBitcoin: sendBitcoin2, getPublicKey, provider, signMessage, connector } = useBTCProvider();
|
2238
2259
|
const publicKey = (0, import_react11.useRef)(null);
|
@@ -3099,7 +3120,7 @@ function executeBurrowSupply(_0) {
|
|
3099
3120
|
|
3100
3121
|
// src/index.ts
|
3101
3122
|
var getVersion = () => {
|
3102
|
-
return "0.
|
3123
|
+
return "0.3.1";
|
3103
3124
|
};
|
3104
3125
|
if (typeof window !== "undefined") {
|
3105
3126
|
window.__PARTICLE_BTC_CONNECT_VERSION = getVersion();
|