@aurum-sdk/core 0.1.1 → 0.1.3
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/README.md +1 -1
- package/dist/{chunk-DND52DSA.mjs → chunk-3TZNNET3.mjs} +31 -15
- package/dist/chunk-3TZNNET3.mjs.map +1 -0
- package/dist/{chunk-7TIZKMSS.js → chunk-F4RYBD6L.js} +31 -15
- package/dist/chunk-F4RYBD6L.js.map +1 -0
- package/dist/index.css +11 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +71 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/dist/widgets.css +11 -2
- package/dist/widgets.css.map +1 -1
- package/dist/widgets.js +13 -13
- package/dist/widgets.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-7TIZKMSS.js.map +0 -1
- package/dist/chunk-DND52DSA.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useAurumStore,
|
|
15
15
|
useNavigation,
|
|
16
16
|
waitForStoreHydration
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3TZNNET3.mjs";
|
|
18
18
|
|
|
19
19
|
// src/AurumCore.ts
|
|
20
20
|
import { checksumAddress } from "viem";
|
|
@@ -271,7 +271,7 @@ var AppKitAdapter = class {
|
|
|
271
271
|
}
|
|
272
272
|
await this.disconnect();
|
|
273
273
|
}
|
|
274
|
-
this.modal.open({ view: "
|
|
274
|
+
this.modal.open({ view: "AllWallets" });
|
|
275
275
|
return await this.waitForConnection();
|
|
276
276
|
}
|
|
277
277
|
waitForConnection(timeout = 6e4) {
|
|
@@ -531,11 +531,15 @@ var RabbyAdapter = class {
|
|
|
531
531
|
// src/wallet-adapters/BraveAdapter.ts
|
|
532
532
|
import { getLogoDataUri as getLogoDataUri3 } from "@aurum-sdk/logos";
|
|
533
533
|
import { WalletId as WalletId4, WalletName as WalletName3 } from "@aurum-sdk/types";
|
|
534
|
-
|
|
534
|
+
|
|
535
|
+
// src/utils/platform/isBraveBrowser.ts
|
|
535
536
|
function isBraveBrowser() {
|
|
536
537
|
if (typeof navigator === "undefined") return false;
|
|
537
538
|
return navigator.brave !== void 0;
|
|
538
539
|
}
|
|
540
|
+
|
|
541
|
+
// src/wallet-adapters/BraveAdapter.ts
|
|
542
|
+
var BRAVE_RDNS = "com.brave.wallet";
|
|
539
543
|
var BraveAdapter = class {
|
|
540
544
|
constructor() {
|
|
541
545
|
this.id = WalletId4.Brave;
|
|
@@ -546,9 +550,13 @@ var BraveAdapter = class {
|
|
|
546
550
|
this.provider = null;
|
|
547
551
|
this.accountsChangedCallback = null;
|
|
548
552
|
this.providerPromise = null;
|
|
549
|
-
this.hide = !isBraveBrowser();
|
|
550
553
|
this.providerPromise = this.discoverProvider();
|
|
551
554
|
}
|
|
555
|
+
get hide() {
|
|
556
|
+
if (this.provider) return false;
|
|
557
|
+
if (isBraveBrowser()) return false;
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
552
560
|
/**
|
|
553
561
|
* Uses EIP-6963 to discover the Brave Wallet provider by its RDNS identifier.
|
|
554
562
|
* Falls back to window.ethereum for legacy detection.
|
|
@@ -1596,7 +1604,7 @@ function createWalletAdapters({
|
|
|
1596
1604
|
theme
|
|
1597
1605
|
}) {
|
|
1598
1606
|
return [
|
|
1599
|
-
new EmailAdapter({ projectId: walletsConfig?.
|
|
1607
|
+
new EmailAdapter({ projectId: walletsConfig?.embedded?.projectId }),
|
|
1600
1608
|
new MetaMaskAdapter(),
|
|
1601
1609
|
new WalletConnectAdapter({ projectId: walletsConfig?.walletConnect?.projectId, appName }),
|
|
1602
1610
|
new CoinbaseWalletAdapter({ appName, appLogoUrl }),
|
|
@@ -2160,7 +2168,7 @@ var Aurum = class {
|
|
|
2160
2168
|
* const aurum = new Aurum({
|
|
2161
2169
|
* brand: { appName: 'Your App Name' },
|
|
2162
2170
|
* wallets: {
|
|
2163
|
-
*
|
|
2171
|
+
* embedded: { projectId: 'cdp-project-id' },
|
|
2164
2172
|
* walletConnect: { projectId: 'reown-project-id' },
|
|
2165
2173
|
* },
|
|
2166
2174
|
* });
|