@bounded-sh/client 0.0.103 → 0.0.104
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/auth/providers/offchain-auth-provider.d.ts +7 -9
- package/dist/{email-auth-provider-DCZ93FYg.js → email-auth-provider-CGhDN-8d.js} +2 -2
- package/dist/{email-auth-provider-DCZ93FYg.js.map → email-auth-provider-CGhDN-8d.js.map} +1 -1
- package/dist/{email-auth-provider-Ct3YA68i.mjs → email-auth-provider-CdBqgLWw.mjs} +2 -2
- package/dist/{email-auth-provider-Ct3YA68i.mjs.map → email-auth-provider-CdBqgLWw.mjs.map} +1 -1
- package/dist/{email-auth-provider-BJXeBUwp.mjs → email-auth-provider-DA2dPFXt.mjs} +2 -2
- package/dist/{email-auth-provider-BJXeBUwp.mjs.map → email-auth-provider-DA2dPFXt.mjs.map} +1 -1
- package/dist/{email-auth-provider-Cr3I4Po5.js → email-auth-provider-aMa0EDuc.js} +2 -2
- package/dist/{email-auth-provider-Cr3I4Po5.js.map → email-auth-provider-aMa0EDuc.js.map} +1 -1
- package/dist/{guest-auth-provider--Sqlucfr.js → guest-auth-provider-BT9JPOpp.js} +2 -2
- package/dist/{guest-auth-provider--Sqlucfr.js.map → guest-auth-provider-BT9JPOpp.js.map} +1 -1
- package/dist/{guest-auth-provider-CUo6sgop.mjs → guest-auth-provider-BiWPelOD.mjs} +2 -2
- package/dist/{guest-auth-provider-CUo6sgop.mjs.map → guest-auth-provider-BiWPelOD.mjs.map} +1 -1
- package/dist/{guest-auth-provider-CPj-w7_R.js → guest-auth-provider-Ca50pehK.js} +2 -2
- package/dist/{guest-auth-provider-CPj-w7_R.js.map → guest-auth-provider-Ca50pehK.js.map} +1 -1
- package/dist/{guest-auth-provider-DMtDTZeA.mjs → guest-auth-provider-pDVr5YRg.mjs} +2 -2
- package/dist/{guest-auth-provider-DMtDTZeA.mjs.map → guest-auth-provider-pDVr5YRg.mjs.map} +1 -1
- package/dist/{index-CaZx7sd8.mjs → index-DKkAO0g-.mjs} +16 -358
- package/dist/index-DKkAO0g-.mjs.map +1 -0
- package/dist/{index-Pyb2SLgv.js → index-DTBxbfUl.js} +16 -358
- package/dist/index-DTBxbfUl.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-3T0IcOed.mjs → index.native-Bl2W-Wsi.mjs} +15 -357
- package/dist/index.native-Bl2W-Wsi.mjs.map +1 -0
- package/dist/{index.native-PGrxu7RO.js → index.native-CNW3iAoP.js} +15 -357
- package/dist/index.native-CNW3iAoP.js.map +1 -0
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-U0XJu5HM.js → injected-evm-wallet-provider-B8PWHQdb.js} +2 -2
- package/dist/{injected-evm-wallet-provider-U0XJu5HM.js.map → injected-evm-wallet-provider-B8PWHQdb.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-B3Mtkdnu.mjs → injected-evm-wallet-provider-BPkcFSQX.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-B3Mtkdnu.mjs.map → injected-evm-wallet-provider-BPkcFSQX.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BNu6Z-iN.js → injected-evm-wallet-provider-Cym2uENX.js} +2 -2
- package/dist/{injected-evm-wallet-provider-BNu6Z-iN.js.map → injected-evm-wallet-provider-Cym2uENX.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-C8rBnyO1.mjs → injected-evm-wallet-provider-HbgMQAbf.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-C8rBnyO1.mjs.map → injected-evm-wallet-provider-HbgMQAbf.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-DR8xVudg.mjs → injected-wallet-provider-BGeNaoEY.mjs} +2 -2
- package/dist/{injected-wallet-provider-DR8xVudg.mjs.map → injected-wallet-provider-BGeNaoEY.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-BnmYbm79.mjs → injected-wallet-provider-D39pzPTV.mjs} +2 -2
- package/dist/{injected-wallet-provider-BnmYbm79.mjs.map → injected-wallet-provider-D39pzPTV.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-29eTkM-A.js → injected-wallet-provider-FY9JLEPR.js} +2 -2
- package/dist/{injected-wallet-provider-29eTkM-A.js.map → injected-wallet-provider-FY9JLEPR.js.map} +1 -1
- package/dist/{injected-wallet-provider-Cv9RELO6.js → injected-wallet-provider-oWtACL_7.js} +2 -2
- package/dist/{injected-wallet-provider-Cv9RELO6.js.map → injected-wallet-provider-oWtACL_7.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-CaZx7sd8.mjs.map +0 -1
- package/dist/index-Pyb2SLgv.js.map +0 -1
- package/dist/index.native-3T0IcOed.mjs.map +0 -1
- package/dist/index.native-PGrxu7RO.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ag as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, af as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, ae as BUILD_REVIEW_CAPABILITY_SCHEMA, a7 as BuildsApiError, ad as FAILURE_REASONS, a9 as NON_TERMINAL_STATES, a1 as OffchainAuthProvider, ac as PARK_REASONS, a2 as PrivyExpoProvider, ab as RUN_STATES, aa as TERMINAL_STATES, W as WalletConfigError, Q as apps, a6 as builds, I as completeLoginFromRedirect, K as completeLoginInPopup, a4 as connectBroadcast, a5 as connectServiceSession, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, Y as getIdToken, S as getOrCreateTurnkeyWallet, g as getPlatform, V as getTurnkeyWalletRecoveryUrl, U as getTurnkeyWalletSessionState, p as init, y as login, J as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, a8 as mediaAgentTools, v as onAuthLoadingChanged, u as onAuthStateChanged, Z as onramp, _ as onrampQuote, $ as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a3 as requestEip6963Providers, a0 as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, X as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-
|
|
1
|
+
export { ag as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, af as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, ae as BUILD_REVIEW_CAPABILITY_SCHEMA, a7 as BuildsApiError, ad as FAILURE_REASONS, a9 as NON_TERMINAL_STATES, a1 as OffchainAuthProvider, ac as PARK_REASONS, a2 as PrivyExpoProvider, ab as RUN_STATES, aa as TERMINAL_STATES, W as WalletConfigError, Q as apps, a6 as builds, I as completeLoginFromRedirect, K as completeLoginInPopup, a4 as connectBroadcast, a5 as connectServiceSession, o as defaultInjectedEvmProvider, f as defaultInjectedProvider, F as ensureSharedWalletLoginReady, M as ensureSignedIn, E as ensureWalletLoginReady, w as getAuthLoading, A as getAuthProvider, q as getCurrentUser, Y as getIdToken, S as getOrCreateTurnkeyWallet, g as getPlatform, V as getTurnkeyWalletRecoveryUrl, U as getTurnkeyWalletSessionState, p as init, y as login, J as loginWithPopup, C as loginWithPrivy, H as loginWithRedirect, D as loginWithWallet, z as logout, a8 as mediaAgentTools, v as onAuthLoadingChanged, u as onAuthStateChanged, Z as onramp, _ as onrampQuote, $ as onrampStatus, L as openBoundedWidget, T as openTurnkeyKeyExport, G as preloadWalletLogin, a3 as requestEip6963Providers, a0 as setPlatform, B as signInAnonymously, R as signSolanaMessageViaTurnkey, X as startTurnkeyEmailLogin, N as useAuth, P as useBuildRun, O as useQuery, x as waitForAuthReady } from './index-DKkAO0g-.mjs';
|
|
2
2
|
export * from '@bounded-sh/core';
|
|
3
3
|
export { AppTokenExchangeError, BoundedDeclineError, DECLINE_EVENT_NAME, RATE_LIMIT_EVENT_NAME, ScopedClientReadOnlyError, aggregate, clearAppTokenCache, count, createAppTokenAuthHeaders, createClient, deriveDecline, dispatchDeclineEvent, dispatchRateLimitEvent, docId, exchangeAppToken, get, getConfig, getFiles, getMany, queryAggregate, reconcileSetResult, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe, waitForSetResult } from '@bounded-sh/core';
|
|
4
4
|
import 'react';
|
|
@@ -181,10 +181,14 @@ function getPlatform() {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* OffchainAuthProvider wraps a real auth provider (
|
|
184
|
+
* OffchainAuthProvider wraps a real auth provider (Turnkey, Phantom, ...) for the
|
|
185
|
+
* poofnet environment.
|
|
185
186
|
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
187
|
+
* Poofnet has no chain, but its onchain writes are still signed: the worker
|
|
188
|
+
* issues an unsendable approval message and verifies the wallet's signature
|
|
189
|
+
* before committing. So `signTransaction` and `signMessage` go straight to the
|
|
190
|
+
* wrapped wallet, whose own prompt is the only one the user sees. Only a raw
|
|
191
|
+
* submit - which needs a real cluster - is refused here.
|
|
188
192
|
*/
|
|
189
193
|
class OffchainAuthProvider {
|
|
190
194
|
constructor(wrappedProvider, config = {}) {
|
|
@@ -219,10 +223,7 @@ class OffchainAuthProvider {
|
|
|
219
223
|
return null;
|
|
220
224
|
}
|
|
221
225
|
async signTransaction(tx) {
|
|
222
|
-
|
|
223
|
-
await this.showUnsupportedTransactionModal();
|
|
224
|
-
}
|
|
225
|
-
throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');
|
|
226
|
+
return this.wrappedProvider.signTransaction(tx);
|
|
226
227
|
}
|
|
227
228
|
/**
|
|
228
229
|
* Sign and submit transaction - not supported in poofnet environment.
|
|
@@ -247,21 +248,11 @@ class OffchainAuthProvider {
|
|
|
247
248
|
}
|
|
248
249
|
await this.wrappedProvider.exportWallet(address);
|
|
249
250
|
}
|
|
250
|
-
// ============ signMessage delegates to wrapped provider ============
|
|
251
251
|
async signMessage(message) {
|
|
252
252
|
var _a, _b, _c, _d, _e, _f;
|
|
253
253
|
(_b = (_a = this.config).onSigningStart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
254
254
|
try {
|
|
255
|
-
// On RN (no DOM), auto-confirm — there's no modal to show.
|
|
256
|
-
// On web, show the confirmation modal.
|
|
257
|
-
if (getPlatform().hasDOM) {
|
|
258
|
-
const confirmed = await this.showTransactionModal(message);
|
|
259
|
-
if (!confirmed) {
|
|
260
|
-
throw new Error("Transaction rejected by user");
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
255
|
const signature = await this.wrappedProvider.signMessage(message);
|
|
264
|
-
// Callback: signing complete
|
|
265
256
|
(_d = (_c = this.config).onSigningComplete) === null || _d === void 0 ? void 0 : _d.call(_c, signature);
|
|
266
257
|
return signature;
|
|
267
258
|
}
|
|
@@ -352,99 +343,6 @@ class OffchainAuthProvider {
|
|
|
352
343
|
document.addEventListener("keydown", escHandler);
|
|
353
344
|
});
|
|
354
345
|
}
|
|
355
|
-
async showTransactionModal(message) {
|
|
356
|
-
return new Promise((resolve) => {
|
|
357
|
-
// Parse the transaction message for display
|
|
358
|
-
let parsed = {};
|
|
359
|
-
try {
|
|
360
|
-
parsed = JSON.parse(message);
|
|
361
|
-
}
|
|
362
|
-
catch (_a) {
|
|
363
|
-
// If not JSON, just show raw message
|
|
364
|
-
}
|
|
365
|
-
// Create modal container. Captured in this closure so every teardown
|
|
366
|
-
// path acts on exactly this prompt, never on a newer one that may have
|
|
367
|
-
// replaced a shared field.
|
|
368
|
-
const container = document.createElement("div");
|
|
369
|
-
container.id = "poofnet-tx-modal";
|
|
370
|
-
container.appendChild(this.buildTransactionModalContent(parsed, message));
|
|
371
|
-
document.body.appendChild(container);
|
|
372
|
-
// Add styles
|
|
373
|
-
const style = document.createElement("style");
|
|
374
|
-
style.textContent = this.getModalStyles();
|
|
375
|
-
container.appendChild(style);
|
|
376
|
-
// Mark all OTHER body children as inert to disable focus traps from
|
|
377
|
-
// other modals, recording only the ones this modal changed (skipping
|
|
378
|
-
// any already-inert) so cleanup restores exactly what we set and never
|
|
379
|
-
// re-enables app-owned inert regions.
|
|
380
|
-
const selfInerted = [];
|
|
381
|
-
document.body.childNodes.forEach((child) => {
|
|
382
|
-
if (child !== container &&
|
|
383
|
-
child instanceof HTMLElement &&
|
|
384
|
-
!child.hasAttribute("inert")) {
|
|
385
|
-
child.setAttribute("inert", "");
|
|
386
|
-
selfInerted.push(child);
|
|
387
|
-
}
|
|
388
|
-
});
|
|
389
|
-
// Animate in
|
|
390
|
-
requestAnimationFrame(() => {
|
|
391
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
392
|
-
const content = container.querySelector(".poofnet-modal-content");
|
|
393
|
-
if (overlay)
|
|
394
|
-
overlay.style.opacity = "1";
|
|
395
|
-
if (content) {
|
|
396
|
-
content.style.opacity = "1";
|
|
397
|
-
content.style.transform = "translateY(0)";
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
// Single idempotent teardown for every settlement path: removes the key
|
|
401
|
-
// handler, restores only self-added inert, and removes exactly this
|
|
402
|
-
// captured container after the exit animation.
|
|
403
|
-
let settled = false;
|
|
404
|
-
const escHandler = (e) => {
|
|
405
|
-
if (e.key === "Escape")
|
|
406
|
-
settle(false);
|
|
407
|
-
};
|
|
408
|
-
const cleanup = () => {
|
|
409
|
-
if (settled)
|
|
410
|
-
return;
|
|
411
|
-
settled = true;
|
|
412
|
-
document.removeEventListener("keydown", escHandler);
|
|
413
|
-
for (const el of selfInerted)
|
|
414
|
-
el.removeAttribute("inert");
|
|
415
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
416
|
-
const content = container.querySelector(".poofnet-modal-content");
|
|
417
|
-
if (overlay)
|
|
418
|
-
overlay.style.opacity = "0";
|
|
419
|
-
if (content) {
|
|
420
|
-
content.style.opacity = "0";
|
|
421
|
-
content.style.transform = "translateY(20px)";
|
|
422
|
-
}
|
|
423
|
-
setTimeout(() => container.remove(), 200);
|
|
424
|
-
};
|
|
425
|
-
const settle = (confirmed) => {
|
|
426
|
-
cleanup();
|
|
427
|
-
resolve(confirmed);
|
|
428
|
-
};
|
|
429
|
-
// Handle confirm
|
|
430
|
-
const confirmBtn = container.querySelector("#poofnet-confirm-btn");
|
|
431
|
-
confirmBtn === null || confirmBtn === void 0 ? void 0 : confirmBtn.addEventListener("click", () => settle(true));
|
|
432
|
-
// Handle cancel
|
|
433
|
-
const cancelBtn = container.querySelector("#poofnet-cancel-btn");
|
|
434
|
-
cancelBtn === null || cancelBtn === void 0 ? void 0 : cancelBtn.addEventListener("click", () => settle(false));
|
|
435
|
-
// Handle close button
|
|
436
|
-
const closeBtn = container.querySelector("#poofnet-close-btn");
|
|
437
|
-
closeBtn === null || closeBtn === void 0 ? void 0 : closeBtn.addEventListener("click", () => settle(false));
|
|
438
|
-
// Handle overlay click
|
|
439
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
440
|
-
overlay === null || overlay === void 0 ? void 0 : overlay.addEventListener("click", (e) => {
|
|
441
|
-
if (e.target === overlay)
|
|
442
|
-
settle(false);
|
|
443
|
-
});
|
|
444
|
-
// Handle escape key
|
|
445
|
-
document.addEventListener("keydown", escHandler);
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
346
|
createElement(tag, className, text) {
|
|
449
347
|
const el = document.createElement(tag);
|
|
450
348
|
if (className)
|
|
@@ -499,113 +397,6 @@ class OffchainAuthProvider {
|
|
|
499
397
|
footer.appendChild(close);
|
|
500
398
|
return overlay;
|
|
501
399
|
}
|
|
502
|
-
formatPath(path) {
|
|
503
|
-
const parts = path.split("/").filter(Boolean);
|
|
504
|
-
if (parts.length >= 2) {
|
|
505
|
-
return {
|
|
506
|
-
collection: parts[0],
|
|
507
|
-
documentId: parts[parts.length - 1],
|
|
508
|
-
};
|
|
509
|
-
}
|
|
510
|
-
return { collection: parts[0] || path, documentId: null };
|
|
511
|
-
}
|
|
512
|
-
formatFieldValue(value) {
|
|
513
|
-
if (value === null || value === undefined)
|
|
514
|
-
return "null";
|
|
515
|
-
if (typeof value === "string") {
|
|
516
|
-
return value.length > 30
|
|
517
|
-
? `"${value.slice(0, 30)}..."`
|
|
518
|
-
: `"${value}"`;
|
|
519
|
-
}
|
|
520
|
-
if (typeof value === "number" || typeof value === "boolean")
|
|
521
|
-
return String(value);
|
|
522
|
-
if (Array.isArray(value))
|
|
523
|
-
return `[${value.length} items]`;
|
|
524
|
-
if (typeof value === "object")
|
|
525
|
-
return `{${Object.keys(value).length} fields}`;
|
|
526
|
-
return String(value);
|
|
527
|
-
}
|
|
528
|
-
getActionDescription(type, collection, isNew) {
|
|
529
|
-
if (type === "delete")
|
|
530
|
-
return `Delete from ${collection}`;
|
|
531
|
-
return isNew ? `Create in ${collection}` : `Update ${collection}`;
|
|
532
|
-
}
|
|
533
|
-
buildTransactionModalContent(parsed, rawMessage) {
|
|
534
|
-
const instructions = parsed.instructions || [];
|
|
535
|
-
// Group instructions by type for summary
|
|
536
|
-
const sets = instructions.filter((i) => i.type === "set");
|
|
537
|
-
const deletes = instructions.filter((i) => i.type === "delete");
|
|
538
|
-
// Create summary text
|
|
539
|
-
let summaryText = "";
|
|
540
|
-
if (sets.length > 0 && deletes.length > 0) {
|
|
541
|
-
summaryText = `${sets.length} update${sets.length > 1 ? "s" : ""}, ${deletes.length} delete${deletes.length > 1 ? "s" : ""}`;
|
|
542
|
-
}
|
|
543
|
-
else if (sets.length > 0) {
|
|
544
|
-
summaryText = `${sets.length} update${sets.length > 1 ? "s" : ""}`;
|
|
545
|
-
}
|
|
546
|
-
else if (deletes.length > 0) {
|
|
547
|
-
summaryText = `${deletes.length} delete${deletes.length > 1 ? "s" : ""}`;
|
|
548
|
-
}
|
|
549
|
-
const { overlay, body, footer } = this.buildModalShell("🔐", "Confirm Transaction");
|
|
550
|
-
if (instructions.length > 0) {
|
|
551
|
-
if (summaryText) {
|
|
552
|
-
this.appendTextElement(body, "div", "poofnet-summary", summaryText);
|
|
553
|
-
}
|
|
554
|
-
const list = this.createElement("div", "poofnet-instructions-list");
|
|
555
|
-
for (const inst of instructions) {
|
|
556
|
-
list.appendChild(this.buildInstructionElement(inst));
|
|
557
|
-
}
|
|
558
|
-
body.appendChild(list);
|
|
559
|
-
}
|
|
560
|
-
else {
|
|
561
|
-
const section = this.createElement("div", "poofnet-section");
|
|
562
|
-
this.appendTextElement(section, "h3", "poofnet-section-title", "Message");
|
|
563
|
-
const raw = this.createElement("pre", "poofnet-raw-message", rawMessage.slice(0, 200) + (rawMessage.length > 200 ? "..." : ""));
|
|
564
|
-
section.appendChild(raw);
|
|
565
|
-
body.appendChild(section);
|
|
566
|
-
}
|
|
567
|
-
body.appendChild(this.buildInfoBox("This is a simulated transaction. No real fees will be charged."));
|
|
568
|
-
const cancel = this.createElement("button", "poofnet-btn poofnet-btn-cancel", "Cancel");
|
|
569
|
-
cancel.id = "poofnet-cancel-btn";
|
|
570
|
-
cancel.type = "button";
|
|
571
|
-
footer.appendChild(cancel);
|
|
572
|
-
const confirm = this.createElement("button", "poofnet-btn poofnet-btn-confirm", "Confirm");
|
|
573
|
-
confirm.id = "poofnet-confirm-btn";
|
|
574
|
-
confirm.type = "button";
|
|
575
|
-
footer.appendChild(confirm);
|
|
576
|
-
return overlay;
|
|
577
|
-
}
|
|
578
|
-
buildInstructionElement(inst) {
|
|
579
|
-
const { collection, documentId } = this.formatPath(inst.path);
|
|
580
|
-
const isDelete = inst.type === "delete";
|
|
581
|
-
const card = this.createElement("div", `poofnet-instruction ${isDelete ? "poofnet-action-delete" : "poofnet-action-set"}`);
|
|
582
|
-
const header = this.createElement("div", "poofnet-instruction-header");
|
|
583
|
-
this.appendTextElement(header, "span", "poofnet-instruction-icon", isDelete ? "🗑️" : "✏️");
|
|
584
|
-
this.appendTextElement(header, "span", "poofnet-instruction-action", isDelete ? "Delete" : "Save");
|
|
585
|
-
this.appendTextElement(header, "span", "poofnet-instruction-collection", collection);
|
|
586
|
-
card.appendChild(header);
|
|
587
|
-
if (documentId) {
|
|
588
|
-
this.appendTextElement(card, "div", "poofnet-instruction-id", `ID: ${documentId}`);
|
|
589
|
-
}
|
|
590
|
-
if (inst.data && !isDelete) {
|
|
591
|
-
const fieldKeys = Object.keys(inst.data).filter((key) => !key.startsWith("_"));
|
|
592
|
-
const visibleFields = fieldKeys.slice(0, 4);
|
|
593
|
-
if (visibleFields.length > 0) {
|
|
594
|
-
const fields = this.createElement("div", "poofnet-fields");
|
|
595
|
-
for (const key of visibleFields) {
|
|
596
|
-
const row = this.createElement("div", "poofnet-field");
|
|
597
|
-
this.appendTextElement(row, "span", "poofnet-field-key", `${key}:`);
|
|
598
|
-
this.appendTextElement(row, "span", "poofnet-field-value", this.formatFieldValue(inst.data[key]));
|
|
599
|
-
fields.appendChild(row);
|
|
600
|
-
}
|
|
601
|
-
if (fieldKeys.length > 4) {
|
|
602
|
-
this.appendTextElement(fields, "div", "poofnet-field-more", `+${fieldKeys.length - 4} more fields`);
|
|
603
|
-
}
|
|
604
|
-
card.appendChild(fields);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
return card;
|
|
608
|
-
}
|
|
609
400
|
getModalStyles() {
|
|
610
401
|
return `
|
|
611
402
|
/* Ensure inert elements remain visible while being non-interactive */
|
|
@@ -702,130 +493,6 @@ class OffchainAuthProvider {
|
|
|
702
493
|
flex: 1;
|
|
703
494
|
}
|
|
704
495
|
|
|
705
|
-
.poofnet-summary {
|
|
706
|
-
font-size: 13px;
|
|
707
|
-
color: #6b7280;
|
|
708
|
-
margin-bottom: 12px;
|
|
709
|
-
text-align: center;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.poofnet-section {
|
|
713
|
-
margin-bottom: 16px;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
.poofnet-section-title {
|
|
717
|
-
font-size: 12px;
|
|
718
|
-
font-weight: 600;
|
|
719
|
-
color: #666;
|
|
720
|
-
text-transform: uppercase;
|
|
721
|
-
letter-spacing: 0.5px;
|
|
722
|
-
margin: 0 0 8px;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
.poofnet-instructions-list {
|
|
726
|
-
display: flex;
|
|
727
|
-
flex-direction: column;
|
|
728
|
-
gap: 10px;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
.poofnet-instruction {
|
|
732
|
-
background: #f9fafb;
|
|
733
|
-
border-radius: 10px;
|
|
734
|
-
padding: 12px;
|
|
735
|
-
border-left: 3px solid #8b5cf6;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
.poofnet-instruction.poofnet-action-delete {
|
|
739
|
-
border-left-color: #ef4444;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.poofnet-instruction-header {
|
|
743
|
-
display: flex;
|
|
744
|
-
align-items: center;
|
|
745
|
-
gap: 8px;
|
|
746
|
-
margin-bottom: 4px;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.poofnet-instruction-icon {
|
|
750
|
-
font-size: 16px;
|
|
751
|
-
flex-shrink: 0;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
.poofnet-instruction-action {
|
|
755
|
-
font-size: 13px;
|
|
756
|
-
font-weight: 600;
|
|
757
|
-
color: #8b5cf6;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
.poofnet-action-delete .poofnet-instruction-action {
|
|
761
|
-
color: #ef4444;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
.poofnet-instruction-collection {
|
|
765
|
-
font-size: 13px;
|
|
766
|
-
font-weight: 500;
|
|
767
|
-
color: #374151;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
.poofnet-instruction-id {
|
|
771
|
-
font-size: 11px;
|
|
772
|
-
color: #9ca3af;
|
|
773
|
-
font-family: monospace;
|
|
774
|
-
margin-bottom: 8px;
|
|
775
|
-
word-break: break-all;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.poofnet-fields {
|
|
779
|
-
background: white;
|
|
780
|
-
border-radius: 6px;
|
|
781
|
-
padding: 8px 10px;
|
|
782
|
-
margin-top: 8px;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
.poofnet-field {
|
|
786
|
-
display: flex;
|
|
787
|
-
gap: 8px;
|
|
788
|
-
padding: 4px 0;
|
|
789
|
-
font-size: 12px;
|
|
790
|
-
border-bottom: 1px solid #f3f4f6;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
.poofnet-field:last-child {
|
|
794
|
-
border-bottom: none;
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
.poofnet-field-key {
|
|
798
|
-
color: #6b7280;
|
|
799
|
-
font-weight: 500;
|
|
800
|
-
flex-shrink: 0;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
.poofnet-field-value {
|
|
804
|
-
color: #374151;
|
|
805
|
-
word-break: break-all;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
.poofnet-field-more {
|
|
809
|
-
font-size: 11px;
|
|
810
|
-
color: #9ca3af;
|
|
811
|
-
padding-top: 4px;
|
|
812
|
-
font-style: italic;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
.poofnet-raw-message {
|
|
816
|
-
background: #f9fafb;
|
|
817
|
-
border-radius: 8px;
|
|
818
|
-
padding: 12px;
|
|
819
|
-
font-size: 11px;
|
|
820
|
-
font-family: monospace;
|
|
821
|
-
color: #4b5563;
|
|
822
|
-
white-space: pre-wrap;
|
|
823
|
-
word-break: break-all;
|
|
824
|
-
margin: 0;
|
|
825
|
-
max-height: 120px;
|
|
826
|
-
overflow-y: auto;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
496
|
.poofnet-info-box {
|
|
830
497
|
display: flex;
|
|
831
498
|
align-items: center;
|
|
@@ -874,15 +541,6 @@ class OffchainAuthProvider {
|
|
|
874
541
|
.poofnet-btn-cancel:hover {
|
|
875
542
|
background: #e5e7eb;
|
|
876
543
|
}
|
|
877
|
-
|
|
878
|
-
.poofnet-btn-confirm {
|
|
879
|
-
background: #8b5cf6;
|
|
880
|
-
color: white;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
.poofnet-btn-confirm:hover {
|
|
884
|
-
background: #7c3aed;
|
|
885
|
-
}
|
|
886
544
|
`;
|
|
887
545
|
}
|
|
888
546
|
}
|
|
@@ -6044,7 +5702,7 @@ async function getAuthProvider(config) {
|
|
|
6044
5702
|
// manager as legacy email sessions. Human login should be started
|
|
6045
5703
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
6046
5704
|
// logout surface for those sessions.
|
|
6047
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
5705
|
+
currentAuthProvider = new (await import('./email-auth-provider-CdBqgLWw.mjs')).EmailAuthProvider();
|
|
6048
5706
|
break;
|
|
6049
5707
|
case "phantom": {
|
|
6050
5708
|
// First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
|
|
@@ -6086,7 +5744,7 @@ async function getAuthProvider(config) {
|
|
|
6086
5744
|
// (bounded-login-widget.ts), so registration never counts as
|
|
6087
5745
|
// evidence the user has a wallet.
|
|
6088
5746
|
await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
|
|
6089
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
5747
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-D39pzPTV.mjs');
|
|
6090
5748
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
6091
5749
|
break;
|
|
6092
5750
|
}
|
|
@@ -6099,7 +5757,7 @@ async function getAuthProvider(config) {
|
|
|
6099
5757
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
6100
5758
|
// to point at a specific wallet or set chainId/domain.
|
|
6101
5759
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
6102
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
5760
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-HbgMQAbf.mjs');
|
|
6103
5761
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
6104
5762
|
break;
|
|
6105
5763
|
}
|
|
@@ -6124,7 +5782,7 @@ async function getAuthProvider(config) {
|
|
|
6124
5782
|
break;
|
|
6125
5783
|
case "guest":
|
|
6126
5784
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
6127
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
5785
|
+
currentAuthProvider = new (await import('./guest-auth-provider-pDVr5YRg.mjs')).GuestAuthProvider();
|
|
6128
5786
|
break;
|
|
6129
5787
|
}
|
|
6130
5788
|
if (!currentAuthProvider) {
|
|
@@ -6186,7 +5844,7 @@ async function signInAnonymously() {
|
|
|
6186
5844
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
6187
5845
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
6188
5846
|
// so bundle-splitting can see it.
|
|
6189
|
-
const provider = new (await import('./guest-auth-provider-
|
|
5847
|
+
const provider = new (await import('./guest-auth-provider-pDVr5YRg.mjs')).GuestAuthProvider();
|
|
6190
5848
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
6191
5849
|
// adoptSessionProvider awaits only getConfig() (already resolved here) and then
|
|
6192
5850
|
// runs every write - provider/method/config/marker/user - in one synchronous
|
|
@@ -6357,7 +6015,7 @@ function ensureSharedWalletLoginReady() {
|
|
|
6357
6015
|
if (!sharedWalletReady) {
|
|
6358
6016
|
sharedWalletReady = (async () => {
|
|
6359
6017
|
await getConfig();
|
|
6360
|
-
await import('./injected-wallet-provider-
|
|
6018
|
+
await import('./injected-wallet-provider-D39pzPTV.mjs');
|
|
6361
6019
|
})().catch((error) => {
|
|
6362
6020
|
sharedWalletReady = null;
|
|
6363
6021
|
throw error;
|
|
@@ -8686,4 +8344,4 @@ class PrivyExpoProvider {
|
|
|
8686
8344
|
}
|
|
8687
8345
|
|
|
8688
8346
|
export { BUILD_REVIEW_CAPABILITY_SCHEMA as $, logout as A, getAuthProvider as B, signInAnonymously as C, loginWithPrivy as D, loginWithRedirect as E, completeLoginFromRedirect as F, loginWithPopup as G, completeLoginInPopup as H, useAuth as I, useQuery as J, useBuildRun as K, apps as L, getIdToken as M, onramp as N, onrampQuote as O, onrampStatus as P, setPlatform as Q, OffchainAuthProvider as R, PrivyExpoProvider as S, builds as T, BuildsApiError as U, mediaAgentTools as V, NON_TERMINAL_STATES as W, TERMINAL_STATES as X, RUN_STATES as Y, PARK_REASONS as Z, FAILURE_REASONS as _, signMessageWithTurnkey as a, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as a0, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as a1, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, getWallets as f, getPlatform as g, hasTurnkeyWallet as h, isSolanaMobileWallet as i, solanaMobileWalletLeavesPage as j, setAuthLoading as k, bufferExports as l, setStoredAuthMethod as m, normalizeSolanaRpcUrl as n, confirmAndCheckTransaction as o, resolveSolanaRpcUrl as p, init as q, resolveSolanaWalletStandardChain as r, setCurrentUser as s, transactionHasSignature as t, getCurrentUser as u, onAuthStateChanged as v, onAuthLoadingChanged as w, getAuthLoading as x, waitForAuthReady as y, login as z };
|
|
8689
|
-
//# sourceMappingURL=index.native-
|
|
8347
|
+
//# sourceMappingURL=index.native-Bl2W-Wsi.mjs.map
|