@bounded-sh/client 0.0.102 → 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
|
@@ -192,10 +192,14 @@ function getPlatform() {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* OffchainAuthProvider wraps a real auth provider (
|
|
195
|
+
* OffchainAuthProvider wraps a real auth provider (Turnkey, Phantom, ...) for the
|
|
196
|
+
* poofnet environment.
|
|
196
197
|
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
198
|
+
* Poofnet has no chain, but its onchain writes are still signed: the worker
|
|
199
|
+
* issues an unsendable approval message and verifies the wallet's signature
|
|
200
|
+
* before committing. So `signTransaction` and `signMessage` go straight to the
|
|
201
|
+
* wrapped wallet, whose own prompt is the only one the user sees. Only a raw
|
|
202
|
+
* submit - which needs a real cluster - is refused here.
|
|
199
203
|
*/
|
|
200
204
|
class OffchainAuthProvider {
|
|
201
205
|
constructor(wrappedProvider, config = {}) {
|
|
@@ -230,10 +234,7 @@ class OffchainAuthProvider {
|
|
|
230
234
|
return null;
|
|
231
235
|
}
|
|
232
236
|
async signTransaction(tx) {
|
|
233
|
-
|
|
234
|
-
await this.showUnsupportedTransactionModal();
|
|
235
|
-
}
|
|
236
|
-
throw new Error('Poofnet does not support real Solana transactions. Deploy your project to mainnet to use this feature.');
|
|
237
|
+
return this.wrappedProvider.signTransaction(tx);
|
|
237
238
|
}
|
|
238
239
|
/**
|
|
239
240
|
* Sign and submit transaction - not supported in poofnet environment.
|
|
@@ -258,21 +259,11 @@ class OffchainAuthProvider {
|
|
|
258
259
|
}
|
|
259
260
|
await this.wrappedProvider.exportWallet(address);
|
|
260
261
|
}
|
|
261
|
-
// ============ signMessage delegates to wrapped provider ============
|
|
262
262
|
async signMessage(message) {
|
|
263
263
|
var _a, _b, _c, _d, _e, _f;
|
|
264
264
|
(_b = (_a = this.config).onSigningStart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
265
265
|
try {
|
|
266
|
-
// On RN (no DOM), auto-confirm — there's no modal to show.
|
|
267
|
-
// On web, show the confirmation modal.
|
|
268
|
-
if (getPlatform().hasDOM) {
|
|
269
|
-
const confirmed = await this.showTransactionModal(message);
|
|
270
|
-
if (!confirmed) {
|
|
271
|
-
throw new Error("Transaction rejected by user");
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
266
|
const signature = await this.wrappedProvider.signMessage(message);
|
|
275
|
-
// Callback: signing complete
|
|
276
267
|
(_d = (_c = this.config).onSigningComplete) === null || _d === void 0 ? void 0 : _d.call(_c, signature);
|
|
277
268
|
return signature;
|
|
278
269
|
}
|
|
@@ -363,99 +354,6 @@ class OffchainAuthProvider {
|
|
|
363
354
|
document.addEventListener("keydown", escHandler);
|
|
364
355
|
});
|
|
365
356
|
}
|
|
366
|
-
async showTransactionModal(message) {
|
|
367
|
-
return new Promise((resolve) => {
|
|
368
|
-
// Parse the transaction message for display
|
|
369
|
-
let parsed = {};
|
|
370
|
-
try {
|
|
371
|
-
parsed = JSON.parse(message);
|
|
372
|
-
}
|
|
373
|
-
catch (_a) {
|
|
374
|
-
// If not JSON, just show raw message
|
|
375
|
-
}
|
|
376
|
-
// Create modal container. Captured in this closure so every teardown
|
|
377
|
-
// path acts on exactly this prompt, never on a newer one that may have
|
|
378
|
-
// replaced a shared field.
|
|
379
|
-
const container = document.createElement("div");
|
|
380
|
-
container.id = "poofnet-tx-modal";
|
|
381
|
-
container.appendChild(this.buildTransactionModalContent(parsed, message));
|
|
382
|
-
document.body.appendChild(container);
|
|
383
|
-
// Add styles
|
|
384
|
-
const style = document.createElement("style");
|
|
385
|
-
style.textContent = this.getModalStyles();
|
|
386
|
-
container.appendChild(style);
|
|
387
|
-
// Mark all OTHER body children as inert to disable focus traps from
|
|
388
|
-
// other modals, recording only the ones this modal changed (skipping
|
|
389
|
-
// any already-inert) so cleanup restores exactly what we set and never
|
|
390
|
-
// re-enables app-owned inert regions.
|
|
391
|
-
const selfInerted = [];
|
|
392
|
-
document.body.childNodes.forEach((child) => {
|
|
393
|
-
if (child !== container &&
|
|
394
|
-
child instanceof HTMLElement &&
|
|
395
|
-
!child.hasAttribute("inert")) {
|
|
396
|
-
child.setAttribute("inert", "");
|
|
397
|
-
selfInerted.push(child);
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
// Animate in
|
|
401
|
-
requestAnimationFrame(() => {
|
|
402
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
403
|
-
const content = container.querySelector(".poofnet-modal-content");
|
|
404
|
-
if (overlay)
|
|
405
|
-
overlay.style.opacity = "1";
|
|
406
|
-
if (content) {
|
|
407
|
-
content.style.opacity = "1";
|
|
408
|
-
content.style.transform = "translateY(0)";
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
// Single idempotent teardown for every settlement path: removes the key
|
|
412
|
-
// handler, restores only self-added inert, and removes exactly this
|
|
413
|
-
// captured container after the exit animation.
|
|
414
|
-
let settled = false;
|
|
415
|
-
const escHandler = (e) => {
|
|
416
|
-
if (e.key === "Escape")
|
|
417
|
-
settle(false);
|
|
418
|
-
};
|
|
419
|
-
const cleanup = () => {
|
|
420
|
-
if (settled)
|
|
421
|
-
return;
|
|
422
|
-
settled = true;
|
|
423
|
-
document.removeEventListener("keydown", escHandler);
|
|
424
|
-
for (const el of selfInerted)
|
|
425
|
-
el.removeAttribute("inert");
|
|
426
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
427
|
-
const content = container.querySelector(".poofnet-modal-content");
|
|
428
|
-
if (overlay)
|
|
429
|
-
overlay.style.opacity = "0";
|
|
430
|
-
if (content) {
|
|
431
|
-
content.style.opacity = "0";
|
|
432
|
-
content.style.transform = "translateY(20px)";
|
|
433
|
-
}
|
|
434
|
-
setTimeout(() => container.remove(), 200);
|
|
435
|
-
};
|
|
436
|
-
const settle = (confirmed) => {
|
|
437
|
-
cleanup();
|
|
438
|
-
resolve(confirmed);
|
|
439
|
-
};
|
|
440
|
-
// Handle confirm
|
|
441
|
-
const confirmBtn = container.querySelector("#poofnet-confirm-btn");
|
|
442
|
-
confirmBtn === null || confirmBtn === void 0 ? void 0 : confirmBtn.addEventListener("click", () => settle(true));
|
|
443
|
-
// Handle cancel
|
|
444
|
-
const cancelBtn = container.querySelector("#poofnet-cancel-btn");
|
|
445
|
-
cancelBtn === null || cancelBtn === void 0 ? void 0 : cancelBtn.addEventListener("click", () => settle(false));
|
|
446
|
-
// Handle close button
|
|
447
|
-
const closeBtn = container.querySelector("#poofnet-close-btn");
|
|
448
|
-
closeBtn === null || closeBtn === void 0 ? void 0 : closeBtn.addEventListener("click", () => settle(false));
|
|
449
|
-
// Handle overlay click
|
|
450
|
-
const overlay = container.querySelector(".poofnet-modal-overlay");
|
|
451
|
-
overlay === null || overlay === void 0 ? void 0 : overlay.addEventListener("click", (e) => {
|
|
452
|
-
if (e.target === overlay)
|
|
453
|
-
settle(false);
|
|
454
|
-
});
|
|
455
|
-
// Handle escape key
|
|
456
|
-
document.addEventListener("keydown", escHandler);
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
357
|
createElement(tag, className, text) {
|
|
460
358
|
const el = document.createElement(tag);
|
|
461
359
|
if (className)
|
|
@@ -510,113 +408,6 @@ class OffchainAuthProvider {
|
|
|
510
408
|
footer.appendChild(close);
|
|
511
409
|
return overlay;
|
|
512
410
|
}
|
|
513
|
-
formatPath(path) {
|
|
514
|
-
const parts = path.split("/").filter(Boolean);
|
|
515
|
-
if (parts.length >= 2) {
|
|
516
|
-
return {
|
|
517
|
-
collection: parts[0],
|
|
518
|
-
documentId: parts[parts.length - 1],
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
return { collection: parts[0] || path, documentId: null };
|
|
522
|
-
}
|
|
523
|
-
formatFieldValue(value) {
|
|
524
|
-
if (value === null || value === undefined)
|
|
525
|
-
return "null";
|
|
526
|
-
if (typeof value === "string") {
|
|
527
|
-
return value.length > 30
|
|
528
|
-
? `"${value.slice(0, 30)}..."`
|
|
529
|
-
: `"${value}"`;
|
|
530
|
-
}
|
|
531
|
-
if (typeof value === "number" || typeof value === "boolean")
|
|
532
|
-
return String(value);
|
|
533
|
-
if (Array.isArray(value))
|
|
534
|
-
return `[${value.length} items]`;
|
|
535
|
-
if (typeof value === "object")
|
|
536
|
-
return `{${Object.keys(value).length} fields}`;
|
|
537
|
-
return String(value);
|
|
538
|
-
}
|
|
539
|
-
getActionDescription(type, collection, isNew) {
|
|
540
|
-
if (type === "delete")
|
|
541
|
-
return `Delete from ${collection}`;
|
|
542
|
-
return isNew ? `Create in ${collection}` : `Update ${collection}`;
|
|
543
|
-
}
|
|
544
|
-
buildTransactionModalContent(parsed, rawMessage) {
|
|
545
|
-
const instructions = parsed.instructions || [];
|
|
546
|
-
// Group instructions by type for summary
|
|
547
|
-
const sets = instructions.filter((i) => i.type === "set");
|
|
548
|
-
const deletes = instructions.filter((i) => i.type === "delete");
|
|
549
|
-
// Create summary text
|
|
550
|
-
let summaryText = "";
|
|
551
|
-
if (sets.length > 0 && deletes.length > 0) {
|
|
552
|
-
summaryText = `${sets.length} update${sets.length > 1 ? "s" : ""}, ${deletes.length} delete${deletes.length > 1 ? "s" : ""}`;
|
|
553
|
-
}
|
|
554
|
-
else if (sets.length > 0) {
|
|
555
|
-
summaryText = `${sets.length} update${sets.length > 1 ? "s" : ""}`;
|
|
556
|
-
}
|
|
557
|
-
else if (deletes.length > 0) {
|
|
558
|
-
summaryText = `${deletes.length} delete${deletes.length > 1 ? "s" : ""}`;
|
|
559
|
-
}
|
|
560
|
-
const { overlay, body, footer } = this.buildModalShell("🔐", "Confirm Transaction");
|
|
561
|
-
if (instructions.length > 0) {
|
|
562
|
-
if (summaryText) {
|
|
563
|
-
this.appendTextElement(body, "div", "poofnet-summary", summaryText);
|
|
564
|
-
}
|
|
565
|
-
const list = this.createElement("div", "poofnet-instructions-list");
|
|
566
|
-
for (const inst of instructions) {
|
|
567
|
-
list.appendChild(this.buildInstructionElement(inst));
|
|
568
|
-
}
|
|
569
|
-
body.appendChild(list);
|
|
570
|
-
}
|
|
571
|
-
else {
|
|
572
|
-
const section = this.createElement("div", "poofnet-section");
|
|
573
|
-
this.appendTextElement(section, "h3", "poofnet-section-title", "Message");
|
|
574
|
-
const raw = this.createElement("pre", "poofnet-raw-message", rawMessage.slice(0, 200) + (rawMessage.length > 200 ? "..." : ""));
|
|
575
|
-
section.appendChild(raw);
|
|
576
|
-
body.appendChild(section);
|
|
577
|
-
}
|
|
578
|
-
body.appendChild(this.buildInfoBox("This is a simulated transaction. No real fees will be charged."));
|
|
579
|
-
const cancel = this.createElement("button", "poofnet-btn poofnet-btn-cancel", "Cancel");
|
|
580
|
-
cancel.id = "poofnet-cancel-btn";
|
|
581
|
-
cancel.type = "button";
|
|
582
|
-
footer.appendChild(cancel);
|
|
583
|
-
const confirm = this.createElement("button", "poofnet-btn poofnet-btn-confirm", "Confirm");
|
|
584
|
-
confirm.id = "poofnet-confirm-btn";
|
|
585
|
-
confirm.type = "button";
|
|
586
|
-
footer.appendChild(confirm);
|
|
587
|
-
return overlay;
|
|
588
|
-
}
|
|
589
|
-
buildInstructionElement(inst) {
|
|
590
|
-
const { collection, documentId } = this.formatPath(inst.path);
|
|
591
|
-
const isDelete = inst.type === "delete";
|
|
592
|
-
const card = this.createElement("div", `poofnet-instruction ${isDelete ? "poofnet-action-delete" : "poofnet-action-set"}`);
|
|
593
|
-
const header = this.createElement("div", "poofnet-instruction-header");
|
|
594
|
-
this.appendTextElement(header, "span", "poofnet-instruction-icon", isDelete ? "🗑️" : "✏️");
|
|
595
|
-
this.appendTextElement(header, "span", "poofnet-instruction-action", isDelete ? "Delete" : "Save");
|
|
596
|
-
this.appendTextElement(header, "span", "poofnet-instruction-collection", collection);
|
|
597
|
-
card.appendChild(header);
|
|
598
|
-
if (documentId) {
|
|
599
|
-
this.appendTextElement(card, "div", "poofnet-instruction-id", `ID: ${documentId}`);
|
|
600
|
-
}
|
|
601
|
-
if (inst.data && !isDelete) {
|
|
602
|
-
const fieldKeys = Object.keys(inst.data).filter((key) => !key.startsWith("_"));
|
|
603
|
-
const visibleFields = fieldKeys.slice(0, 4);
|
|
604
|
-
if (visibleFields.length > 0) {
|
|
605
|
-
const fields = this.createElement("div", "poofnet-fields");
|
|
606
|
-
for (const key of visibleFields) {
|
|
607
|
-
const row = this.createElement("div", "poofnet-field");
|
|
608
|
-
this.appendTextElement(row, "span", "poofnet-field-key", `${key}:`);
|
|
609
|
-
this.appendTextElement(row, "span", "poofnet-field-value", this.formatFieldValue(inst.data[key]));
|
|
610
|
-
fields.appendChild(row);
|
|
611
|
-
}
|
|
612
|
-
if (fieldKeys.length > 4) {
|
|
613
|
-
this.appendTextElement(fields, "div", "poofnet-field-more", `+${fieldKeys.length - 4} more fields`);
|
|
614
|
-
}
|
|
615
|
-
card.appendChild(fields);
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
return card;
|
|
619
|
-
}
|
|
620
411
|
getModalStyles() {
|
|
621
412
|
return `
|
|
622
413
|
/* Ensure inert elements remain visible while being non-interactive */
|
|
@@ -713,130 +504,6 @@ class OffchainAuthProvider {
|
|
|
713
504
|
flex: 1;
|
|
714
505
|
}
|
|
715
506
|
|
|
716
|
-
.poofnet-summary {
|
|
717
|
-
font-size: 13px;
|
|
718
|
-
color: #6b7280;
|
|
719
|
-
margin-bottom: 12px;
|
|
720
|
-
text-align: center;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
.poofnet-section {
|
|
724
|
-
margin-bottom: 16px;
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
.poofnet-section-title {
|
|
728
|
-
font-size: 12px;
|
|
729
|
-
font-weight: 600;
|
|
730
|
-
color: #666;
|
|
731
|
-
text-transform: uppercase;
|
|
732
|
-
letter-spacing: 0.5px;
|
|
733
|
-
margin: 0 0 8px;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.poofnet-instructions-list {
|
|
737
|
-
display: flex;
|
|
738
|
-
flex-direction: column;
|
|
739
|
-
gap: 10px;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.poofnet-instruction {
|
|
743
|
-
background: #f9fafb;
|
|
744
|
-
border-radius: 10px;
|
|
745
|
-
padding: 12px;
|
|
746
|
-
border-left: 3px solid #8b5cf6;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
.poofnet-instruction.poofnet-action-delete {
|
|
750
|
-
border-left-color: #ef4444;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
.poofnet-instruction-header {
|
|
754
|
-
display: flex;
|
|
755
|
-
align-items: center;
|
|
756
|
-
gap: 8px;
|
|
757
|
-
margin-bottom: 4px;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
.poofnet-instruction-icon {
|
|
761
|
-
font-size: 16px;
|
|
762
|
-
flex-shrink: 0;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
.poofnet-instruction-action {
|
|
766
|
-
font-size: 13px;
|
|
767
|
-
font-weight: 600;
|
|
768
|
-
color: #8b5cf6;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
.poofnet-action-delete .poofnet-instruction-action {
|
|
772
|
-
color: #ef4444;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
.poofnet-instruction-collection {
|
|
776
|
-
font-size: 13px;
|
|
777
|
-
font-weight: 500;
|
|
778
|
-
color: #374151;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.poofnet-instruction-id {
|
|
782
|
-
font-size: 11px;
|
|
783
|
-
color: #9ca3af;
|
|
784
|
-
font-family: monospace;
|
|
785
|
-
margin-bottom: 8px;
|
|
786
|
-
word-break: break-all;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
.poofnet-fields {
|
|
790
|
-
background: white;
|
|
791
|
-
border-radius: 6px;
|
|
792
|
-
padding: 8px 10px;
|
|
793
|
-
margin-top: 8px;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
.poofnet-field {
|
|
797
|
-
display: flex;
|
|
798
|
-
gap: 8px;
|
|
799
|
-
padding: 4px 0;
|
|
800
|
-
font-size: 12px;
|
|
801
|
-
border-bottom: 1px solid #f3f4f6;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
.poofnet-field:last-child {
|
|
805
|
-
border-bottom: none;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
.poofnet-field-key {
|
|
809
|
-
color: #6b7280;
|
|
810
|
-
font-weight: 500;
|
|
811
|
-
flex-shrink: 0;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
.poofnet-field-value {
|
|
815
|
-
color: #374151;
|
|
816
|
-
word-break: break-all;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
.poofnet-field-more {
|
|
820
|
-
font-size: 11px;
|
|
821
|
-
color: #9ca3af;
|
|
822
|
-
padding-top: 4px;
|
|
823
|
-
font-style: italic;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.poofnet-raw-message {
|
|
827
|
-
background: #f9fafb;
|
|
828
|
-
border-radius: 8px;
|
|
829
|
-
padding: 12px;
|
|
830
|
-
font-size: 11px;
|
|
831
|
-
font-family: monospace;
|
|
832
|
-
color: #4b5563;
|
|
833
|
-
white-space: pre-wrap;
|
|
834
|
-
word-break: break-all;
|
|
835
|
-
margin: 0;
|
|
836
|
-
max-height: 120px;
|
|
837
|
-
overflow-y: auto;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
507
|
.poofnet-info-box {
|
|
841
508
|
display: flex;
|
|
842
509
|
align-items: center;
|
|
@@ -885,15 +552,6 @@ class OffchainAuthProvider {
|
|
|
885
552
|
.poofnet-btn-cancel:hover {
|
|
886
553
|
background: #e5e7eb;
|
|
887
554
|
}
|
|
888
|
-
|
|
889
|
-
.poofnet-btn-confirm {
|
|
890
|
-
background: #8b5cf6;
|
|
891
|
-
color: white;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
.poofnet-btn-confirm:hover {
|
|
895
|
-
background: #7c3aed;
|
|
896
|
-
}
|
|
897
555
|
`;
|
|
898
556
|
}
|
|
899
557
|
}
|
|
@@ -6308,7 +5966,7 @@ async function getAuthProvider(config) {
|
|
|
6308
5966
|
// manager as legacy email sessions. Human login should be started
|
|
6309
5967
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
6310
5968
|
// logout surface for those sessions.
|
|
6311
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
5969
|
+
currentAuthProvider = new (await import('./email-auth-provider-DA2dPFXt.mjs')).EmailAuthProvider();
|
|
6312
5970
|
break;
|
|
6313
5971
|
case "phantom": {
|
|
6314
5972
|
// First-class Solana WALLET LOGIN (the poof/TaroBase-style "connect
|
|
@@ -6350,7 +6008,7 @@ async function getAuthProvider(config) {
|
|
|
6350
6008
|
// (bounded-login-widget.ts), so registration never counts as
|
|
6351
6009
|
// evidence the user has a wallet.
|
|
6352
6010
|
await ensureSolanaMobileWalletRegistered(config, configuredNetwork);
|
|
6353
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
6011
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-BGeNaoEY.mjs');
|
|
6354
6012
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
6355
6013
|
break;
|
|
6356
6014
|
}
|
|
@@ -6363,7 +6021,7 @@ async function getAuthProvider(config) {
|
|
|
6363
6021
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
6364
6022
|
// to point at a specific wallet or set chainId/domain.
|
|
6365
6023
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
6366
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
6024
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BPkcFSQX.mjs');
|
|
6367
6025
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
6368
6026
|
break;
|
|
6369
6027
|
}
|
|
@@ -6388,7 +6046,7 @@ async function getAuthProvider(config) {
|
|
|
6388
6046
|
break;
|
|
6389
6047
|
case "guest":
|
|
6390
6048
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
6391
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
6049
|
+
currentAuthProvider = new (await import('./guest-auth-provider-BiWPelOD.mjs')).GuestAuthProvider();
|
|
6392
6050
|
break;
|
|
6393
6051
|
}
|
|
6394
6052
|
if (!currentAuthProvider) {
|
|
@@ -6450,7 +6108,7 @@ async function signInAnonymously() {
|
|
|
6450
6108
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
6451
6109
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
6452
6110
|
// so bundle-splitting can see it.
|
|
6453
|
-
const provider = new (await import('./guest-auth-provider-
|
|
6111
|
+
const provider = new (await import('./guest-auth-provider-BiWPelOD.mjs')).GuestAuthProvider();
|
|
6454
6112
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
6455
6113
|
// adoptSessionProvider awaits only getConfig() (already resolved here) and then
|
|
6456
6114
|
// runs every write - provider/method/config/marker/user - in one synchronous
|
|
@@ -6621,7 +6279,7 @@ function ensureSharedWalletLoginReady() {
|
|
|
6621
6279
|
if (!sharedWalletReady) {
|
|
6622
6280
|
sharedWalletReady = (async () => {
|
|
6623
6281
|
await getConfig();
|
|
6624
|
-
await import('./injected-wallet-provider-
|
|
6282
|
+
await import('./injected-wallet-provider-BGeNaoEY.mjs');
|
|
6625
6283
|
})().catch((error) => {
|
|
6626
6284
|
sharedWalletReady = null;
|
|
6627
6285
|
throw error;
|
|
@@ -6724,7 +6382,7 @@ async function loginWithWallet(options) {
|
|
|
6724
6382
|
await ensureSharedWalletLoginReady();
|
|
6725
6383
|
else
|
|
6726
6384
|
await ensureWalletLoginReady();
|
|
6727
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
6385
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-BGeNaoEY.mjs');
|
|
6728
6386
|
// Keep the RAW wallet provider: the offchain wrapper forwards only a fixed
|
|
6729
6387
|
// set of methods, so cleanup below must speak to the provider that actually
|
|
6730
6388
|
// holds the config rather than to whatever is wrapping it.
|
|
@@ -11028,4 +10686,4 @@ async function connectServiceSession(ticket, options) {
|
|
|
11028
10686
|
}
|
|
11029
10687
|
|
|
11030
10688
|
export { onrampStatus as $, getAuthProvider as A, signInAnonymously as B, loginWithPrivy as C, loginWithWallet as D, ensureWalletLoginReady as E, ensureSharedWalletLoginReady as F, preloadWalletLogin as G, loginWithRedirect as H, completeLoginFromRedirect as I, loginWithPopup as J, completeLoginInPopup as K, openBoundedWidget as L, ensureSignedIn as M, useAuth as N, useQuery as O, useBuildRun as P, apps as Q, signSolanaMessageViaTurnkey as R, getOrCreateTurnkeyWallet as S, openTurnkeyKeyExport as T, getTurnkeyWalletSessionState as U, getTurnkeyWalletRecoveryUrl as V, WalletConfigError as W, startTurnkeyEmailLogin as X, getIdToken as Y, onramp as Z, onrampQuote as _, signMessageWithTurnkey as a, setPlatform as a0, OffchainAuthProvider as a1, PrivyExpoProvider as a2, requestEip6963Providers as a3, connectBroadcast as a4, connectServiceSession as a5, builds as a6, BuildsApiError as a7, mediaAgentTools as a8, NON_TERMINAL_STATES as a9, TERMINAL_STATES as aa, RUN_STATES as ab, PARK_REASONS as ac, FAILURE_REASONS as ad, BUILD_REVIEW_CAPABILITY_SCHEMA as ae, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as af, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as ag, signTransactionWithTurnkey as b, signTransactionV1WithTurnkey as c, signAndSubmitTransactionWithTurnkey as d, bs58 as e, defaultInjectedProvider as f, getPlatform as g, hasTurnkeyWallet as h, firstStandardWalletProvider as i, setAuthLoading as j, bufferExports as k, setStoredAuthMethod as l, confirmAndCheckTransaction as m, normalizeSolanaRpcUrl as n, defaultInjectedEvmProvider as o, init as p, getCurrentUser as q, resolveSolanaRpcUrl as r, setCurrentUser as s, transactionHasSignature as t, onAuthStateChanged as u, onAuthLoadingChanged as v, getAuthLoading as w, waitForAuthReady as x, login as y, logout as z };
|
|
11031
|
-
//# sourceMappingURL=index-
|
|
10689
|
+
//# sourceMappingURL=index-DKkAO0g-.mjs.map
|