@aurum-sdk/core 0.2.4 → 0.2.6
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/{chunk-LMQLRSFP.js → chunk-4EBNC4R3.js} +3 -3
- package/dist/{chunk-ZT57KKYB.mjs → chunk-DRID67T7.mjs} +2 -2
- package/dist/{chunk-YFDA5EMH.mjs → chunk-J6XFKNJN.mjs} +2 -9
- package/dist/{chunk-GTEGWUGU.js → chunk-KD3A4VYB.js} +1845 -3719
- package/dist/{chunk-IQ7F5R7D.js → chunk-QIPVNM7T.js} +3 -10
- package/dist/{chunk-GP7AGIK5.mjs → chunk-UPYYZG5D.mjs} +1501 -3375
- package/dist/{chunk-ATH4UWSL.js → chunk-XTOUIIXZ.js} +12 -12
- package/dist/{chunk-YEVOYJGQ.mjs → chunk-YP64HBUK.mjs} +2 -2
- package/dist/{dist-3K7ESMKX.js → dist-7I773YNF.js} +68 -68
- package/dist/{dist-SYSRLCAE.mjs → dist-YBFFGXT3.mjs} +3 -3
- package/dist/empty-stub-JW2K2GSS.js +14 -0
- package/dist/empty-stub-X6WHS3X3.mjs +14 -0
- package/dist/index.js +125 -103
- package/dist/index.mjs +31 -9
- package/dist/{index.web-HX5ZVRA3.mjs → index.web-Q2L3EMC3.mjs} +5 -5
- package/dist/{index.web-ZRK5OLZ5.js → index.web-V7DLWC7H.js} +496 -496
- package/dist/widgets.js +18 -18
- package/dist/widgets.mjs +3 -3
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
useAurumStore,
|
|
17
17
|
useNavigation,
|
|
18
18
|
waitForStoreHydration
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-UPYYZG5D.mjs";
|
|
20
|
+
import "./chunk-DRID67T7.mjs";
|
|
21
21
|
import {
|
|
22
22
|
init_polyfills
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-J6XFKNJN.mjs";
|
|
24
24
|
|
|
25
25
|
// src/index.ts
|
|
26
26
|
init_polyfills();
|
|
@@ -592,7 +592,7 @@ var CoinbaseWalletAdapter = class {
|
|
|
592
592
|
async initializeProvider() {
|
|
593
593
|
if (typeof window === "undefined") return;
|
|
594
594
|
try {
|
|
595
|
-
const { createCoinbaseWalletSDK } = await import("./dist-
|
|
595
|
+
const { createCoinbaseWalletSDK } = await import("./dist-YBFFGXT3.mjs");
|
|
596
596
|
const coinbaseSdk = createCoinbaseWalletSDK({
|
|
597
597
|
appName: this.config.appName,
|
|
598
598
|
appLogoUrl: this.config.appLogoUrl,
|
|
@@ -1396,7 +1396,7 @@ var _EmailAdapter = class _EmailAdapter {
|
|
|
1396
1396
|
sentryLogger.error("Email is not available");
|
|
1397
1397
|
throw new Error("Email is not available");
|
|
1398
1398
|
}
|
|
1399
|
-
const { signInWithEmail } = await import("./index.web-
|
|
1399
|
+
const { signInWithEmail } = await import("./index.web-Q2L3EMC3.mjs");
|
|
1400
1400
|
const authResult = await signInWithEmail({ email });
|
|
1401
1401
|
return authResult;
|
|
1402
1402
|
}
|
|
@@ -1409,7 +1409,7 @@ var _EmailAdapter = class _EmailAdapter {
|
|
|
1409
1409
|
sentryLogger.error("Email provider not initialized");
|
|
1410
1410
|
throw new Error("Email provider not initialized");
|
|
1411
1411
|
}
|
|
1412
|
-
const { verifyEmailOTP } = await import("./index.web-
|
|
1412
|
+
const { verifyEmailOTP } = await import("./index.web-Q2L3EMC3.mjs");
|
|
1413
1413
|
return verifyEmailOTP({ flowId, otp });
|
|
1414
1414
|
}
|
|
1415
1415
|
async connect() {
|
|
@@ -1441,7 +1441,7 @@ var _EmailAdapter = class _EmailAdapter {
|
|
|
1441
1441
|
async disconnect() {
|
|
1442
1442
|
try {
|
|
1443
1443
|
await this.ensureInitialized();
|
|
1444
|
-
const { signOut } = await import("./index.web-
|
|
1444
|
+
const { signOut } = await import("./index.web-Q2L3EMC3.mjs");
|
|
1445
1445
|
await signOut();
|
|
1446
1446
|
} catch {
|
|
1447
1447
|
}
|
|
@@ -1487,7 +1487,7 @@ var _EmailAdapter = class _EmailAdapter {
|
|
|
1487
1487
|
* Called by ensureInitialized() - deduplication handled via initPromise.
|
|
1488
1488
|
*/
|
|
1489
1489
|
async initializeProvider() {
|
|
1490
|
-
const { initialize } = await import("./index.web-
|
|
1490
|
+
const { initialize } = await import("./index.web-Q2L3EMC3.mjs");
|
|
1491
1491
|
await initialize({
|
|
1492
1492
|
projectId: this.projectId,
|
|
1493
1493
|
ethereum: {
|
|
@@ -1505,7 +1505,7 @@ var _EmailAdapter = class _EmailAdapter {
|
|
|
1505
1505
|
async createProvider() {
|
|
1506
1506
|
try {
|
|
1507
1507
|
await _EmailAdapter.initializeChainData();
|
|
1508
|
-
const { createCDPEmbeddedWallet } = await import("./index.web-
|
|
1508
|
+
const { createCDPEmbeddedWallet } = await import("./index.web-Q2L3EMC3.mjs");
|
|
1509
1509
|
const wallet = createCDPEmbeddedWallet({
|
|
1510
1510
|
chains: _EmailAdapter.viemChains,
|
|
1511
1511
|
transports: _EmailAdapter.viemTransports
|
|
@@ -1665,8 +1665,15 @@ var _AurumCore = class _AurumCore {
|
|
|
1665
1665
|
this.connectedWalletAdapter = null;
|
|
1666
1666
|
this.eventListeners = /* @__PURE__ */ new Map();
|
|
1667
1667
|
if (_AurumCore.instance) {
|
|
1668
|
+
const incoming = _AurumCore.serializeConfig(config);
|
|
1669
|
+
if (incoming !== null && incoming !== _AurumCore.storedConfigJson) {
|
|
1670
|
+
console.warn(
|
|
1671
|
+
"Aurum Constructor called a second time with a different config; the original config is kept. Use updateBrandConfig() / updateWalletsConfig() to change config at runtime."
|
|
1672
|
+
);
|
|
1673
|
+
}
|
|
1668
1674
|
return _AurumCore.instance;
|
|
1669
1675
|
}
|
|
1676
|
+
_AurumCore.storedConfigJson = _AurumCore.serializeConfig(config);
|
|
1670
1677
|
const telemetryEnabled = config.telemetry !== false;
|
|
1671
1678
|
initSentry(telemetryEnabled);
|
|
1672
1679
|
this.brandConfig = this.resolveBrandConfig(config);
|
|
@@ -1685,6 +1692,13 @@ var _AurumCore = class _AurumCore {
|
|
|
1685
1692
|
this.readyPromise = this.tryRestoreConnection();
|
|
1686
1693
|
_AurumCore.instance = this;
|
|
1687
1694
|
}
|
|
1695
|
+
static serializeConfig(config) {
|
|
1696
|
+
try {
|
|
1697
|
+
return JSON.stringify(config);
|
|
1698
|
+
} catch {
|
|
1699
|
+
return null;
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1688
1702
|
async whenReady() {
|
|
1689
1703
|
try {
|
|
1690
1704
|
await this.readyPromise;
|
|
@@ -2010,6 +2024,10 @@ var _AurumCore = class _AurumCore {
|
|
|
2010
2024
|
};
|
|
2011
2025
|
}
|
|
2012
2026
|
async tryRestoreConnection() {
|
|
2027
|
+
if (typeof window === "undefined") {
|
|
2028
|
+
this.ready = true;
|
|
2029
|
+
return;
|
|
2030
|
+
}
|
|
2013
2031
|
try {
|
|
2014
2032
|
await waitForStoreHydration();
|
|
2015
2033
|
const store = useAurumStore.getState();
|
|
@@ -2148,6 +2166,10 @@ var _AurumCore = class _AurumCore {
|
|
|
2148
2166
|
};
|
|
2149
2167
|
// Singleton instance
|
|
2150
2168
|
_AurumCore.instance = null;
|
|
2169
|
+
// Serialized first-construction config used to detect mismatched re-inits (dev footgun: HMR,
|
|
2170
|
+
// cross-module imports, etc). Stored as a string so re-construction with structurally-equal
|
|
2171
|
+
// config doesn't false-positive.
|
|
2172
|
+
_AurumCore.storedConfigJson = null;
|
|
2151
2173
|
// Events managed by AurumCore (not forwarded to underlying provider)
|
|
2152
2174
|
_AurumCore.MANAGED_EVENTS = ["accountsChanged", "connect", "disconnect"];
|
|
2153
2175
|
var AurumCore = _AurumCore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DRID67T7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Hash,
|
|
6
6
|
abytes,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
swap32IfBE,
|
|
27
27
|
toBytes,
|
|
28
28
|
u32
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YP64HBUK.mjs";
|
|
30
30
|
import {
|
|
31
31
|
__commonJS,
|
|
32
32
|
__esm,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
__toESM,
|
|
40
40
|
init_polyfills,
|
|
41
41
|
require_buffer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-J6XFKNJN.mjs";
|
|
43
43
|
|
|
44
44
|
// (disabled):../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
|
|
45
45
|
var require_buffer2 = __commonJS({
|
|
@@ -25561,7 +25561,7 @@ function g12(e28 = {}) {
|
|
|
25561
25561
|
throw new Error("No account found");
|
|
25562
25562
|
})();
|
|
25563
25563
|
try {
|
|
25564
|
-
const { wrapFetchWithPayment: u27 } = await import("
|
|
25564
|
+
const { wrapFetchWithPayment: u27 } = await import("./empty-stub-X6WHS3X3.mjs");
|
|
25565
25565
|
r28 = u27(
|
|
25566
25566
|
a29,
|
|
25567
25567
|
o34,
|
|
@@ -28158,4 +28158,4 @@ safe-buffer/index.js:
|
|
|
28158
28158
|
@coinbase/cdp-core/dist/esm/index.web149.js:
|
|
28159
28159
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
28160
28160
|
*/
|
|
28161
|
-
//# sourceMappingURL=index.web-
|
|
28161
|
+
//# sourceMappingURL=index.web-Q2L3EMC3.mjs.map
|