@magic-ext/farcaster
Advanced tools
Comparing version 0.18.1-canary.841.12039007622.0 to 0.18.1-canary.841.12039390406.0
@@ -1,2 +0,2 @@ | ||
"use strict";var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var E=(r,n)=>{for(var e in n)u(r,e,{get:n[e],enumerable:!0})},m=(r,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of v(n))!C.call(r,t)&&t!==e&&u(r,t,{get:()=>n[t],enumerable:!(o=w(n,t))||o.enumerable});return r};var b=r=>m(u({},"__esModule",{value:!0}),r);var p=(r,n,e)=>new Promise((o,t)=>{var c=a=>{try{i(e.next(a))}catch(d){t(d)}},l=a=>{try{i(e.throw(a))}catch(d){t(d)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(c,l);i((e=e.apply(r,n)).next())});var S={};E(S,{FarcasterExtension:()=>g,isMobile:()=>s});module.exports=b(S);var f=require("@magic-sdk/commons");function A(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function y(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function x(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function R(){return y()||x()}function s(){return A()||R()}function h(){return typeof window!="undefined"&&window===window.top}var I=!0;var O="https://relay.farcaster.xyz",g=class extends f.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>p(this,null,function*(){var i;let o=yield fetch(`${O}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!o.ok)throw new Error("Error creating channel.");let t=yield o.json();if(!t)throw new Error("Channel not created yet.");let c=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(i=e==null?void 0:e.showUI)!=null?i:I,domain:window.location.origin,isMobile:s(),channel:t}}]),l=this.request(c);return s()&&h()&&(window.location.href=t.url),l})}}; | ||
"use strict";var u=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var y=(r,n)=>{for(var e in n)u(r,e,{get:n[e],enumerable:!0})},b=(r,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of m(n))!C.call(r,o)&&o!==e&&u(r,o,{get:()=>n[o],enumerable:!(a=E(n,o))||a.enumerable});return r};var A=r=>b(u({},"__esModule",{value:!0}),r);var g=(r,n,e)=>new Promise((a,o)=>{var d=t=>{try{i(e.next(t))}catch(s){o(s)}},c=t=>{try{i(e.throw(t))}catch(s){o(s)}},i=t=>t.done?a(t.value):Promise.resolve(t.value).then(d,c);i((e=e.apply(r,n)).next())});var F={};y(F,{FarcasterExtension:()=>p,isMobile:()=>l});module.exports=A(F);var f=require("@magic-sdk/commons");function x(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function R(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function I(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function O(){return R()||I()}function l(){return x()||O()}function h(){return typeof window!="undefined"&&window===window.top}var P=!0;var S="https://relay.farcaster.xyz",p=class extends f.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>g(this,null,function*(){return this.utils.createPromiEvent((o,d)=>g(this,null,function*(){var c;try{let i=yield fetch(`${S}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!i.ok)throw new Error("Error creating channel.");let t=yield i.json();if(!t)throw new Error("Channel not created yet.");let s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(c=e==null?void 0:e.showUI)!=null?c:P,domain:window.location.origin,isMobile:l(),channel:t}}]),w=this.request(s);l()&&h()&&(window.location.href=t.url);let v=yield w;o(v)}catch(i){d(i)}}))})}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var u=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var E=(r,n)=>{for(var e in n)u(r,e,{get:n[e],enumerable:!0})},m=(r,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of v(n))!C.call(r,t)&&t!==e&&u(r,t,{get:()=>n[t],enumerable:!(o=w(n,t))||o.enumerable});return r};var b=r=>m(u({},"__esModule",{value:!0}),r);var p=(r,n,e)=>new Promise((o,t)=>{var c=a=>{try{i(e.next(a))}catch(d){t(d)}},l=a=>{try{i(e.throw(a))}catch(d){t(d)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(c,l);i((e=e.apply(r,n)).next())});var S={};E(S,{FarcasterExtension:()=>g,isMobile:()=>s});module.exports=b(S);var f=require("@magic-sdk/commons");function A(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function y(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function x(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function R(){return y()||x()}function s(){return A()||R()}function h(){return typeof window!="undefined"&&window===window.top}var I=!0;var O="https://relay.farcaster.xyz",g=class extends f.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>p(this,null,function*(){var i;let o=yield fetch(`${O}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!o.ok)throw new Error("Error creating channel.");let t=yield o.json();if(!t)throw new Error("Channel not created yet.");let c=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(i=e==null?void 0:e.showUI)!=null?i:I,domain:window.location.origin,isMobile:s(),channel:t}}]),l=this.request(c);return s()&&h()&&(window.location.href=t.url),l})}}; | ||
"use strict";var u=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var y=(r,n)=>{for(var e in n)u(r,e,{get:n[e],enumerable:!0})},b=(r,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of m(n))!C.call(r,o)&&o!==e&&u(r,o,{get:()=>n[o],enumerable:!(a=E(n,o))||a.enumerable});return r};var A=r=>b(u({},"__esModule",{value:!0}),r);var g=(r,n,e)=>new Promise((a,o)=>{var d=t=>{try{i(e.next(t))}catch(s){o(s)}},c=t=>{try{i(e.throw(t))}catch(s){o(s)}},i=t=>t.done?a(t.value):Promise.resolve(t.value).then(d,c);i((e=e.apply(r,n)).next())});var F={};y(F,{FarcasterExtension:()=>p,isMobile:()=>l});module.exports=A(F);var f=require("@magic-sdk/commons");function x(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function R(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function I(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function O(){return R()||I()}function l(){return x()||O()}function h(){return typeof window!="undefined"&&window===window.top}var P=!0;var S="https://relay.farcaster.xyz",p=class extends f.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>g(this,null,function*(){return this.utils.createPromiEvent((o,d)=>g(this,null,function*(){var c;try{let i=yield fetch(`${S}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!i.ok)throw new Error("Error creating channel.");let t=yield i.json();if(!t)throw new Error("Channel not created yet.");let s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(c=e==null?void 0:e.showUI)!=null?c:P,domain:window.location.origin,isMobile:l(),channel:t}}]),w=this.request(s);l()&&h()&&(window.location.href=t.url);let v=yield w;o(v)}catch(i){d(i)}}))})}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var u=(l,d,e)=>new Promise((o,t)=>{var a=n=>{try{r(e.next(n))}catch(s){t(s)}},i=n=>{try{r(e.throw(n))}catch(s){t(s)}},r=n=>n.done?o(n.value):Promise.resolve(n.value).then(a,i);r((e=e.apply(l,d)).next())});import{Extension as C}from"@magic-sdk/commons";function h(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function f(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function w(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function v(){return f()||w()}function c(){return h()||v()}function g(){return typeof window!="undefined"&&window===window.top}var E=!0;var m="https://relay.farcaster.xyz",p=class extends C.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>u(this,null,function*(){var r;let o=yield fetch(`${m}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!o.ok)throw new Error("Error creating channel.");let t=yield o.json();if(!t)throw new Error("Channel not created yet.");let a=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(r=e==null?void 0:e.showUI)!=null?r:E,domain:window.location.origin,isMobile:c(),channel:t}}]),i=this.request(a);return c()&&g()&&(window.location.href=t.url),i})}};export{p as FarcasterExtension,c as isMobile}; | ||
var s=(l,d,n)=>new Promise((u,o)=>{var a=e=>{try{t(n.next(e))}catch(r){o(r)}},i=e=>{try{t(n.throw(e))}catch(r){o(r)}},t=e=>e.done?u(e.value):Promise.resolve(e.value).then(a,i);t((n=n.apply(l,d)).next())});import{Extension as C}from"@magic-sdk/commons";function w(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function v(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function E(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function m(){return v()||E()}function c(){return w()||m()}function g(){return typeof window!="undefined"&&window===window.top}var y=!0;var b="https://relay.farcaster.xyz",p=class extends C.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=n=>s(this,null,function*(){return this.utils.createPromiEvent((o,a)=>s(this,null,function*(){var i;try{let t=yield fetch(`${b}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!t.ok)throw new Error("Error creating channel.");let e=yield t.json();if(!e)throw new Error("Channel not created yet.");let r=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(i=n==null?void 0:n.showUI)!=null?i:y,domain:window.location.origin,isMobile:c(),channel:e}}]),h=this.request(r);c()&&g()&&(window.location.href=e.url);let f=yield h;o(f)}catch(t){a(t)}}))})}};export{p as FarcasterExtension,c as isMobile}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var MagicFarcasterExtension=(()=>{var E=Object.create;var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var y=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),R=(e,n)=>{for(var t in n)s(e,t,{get:n[t],enumerable:!0})},p=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of b(n))!x.call(e,r)&&r!==t&&s(e,r,{get:()=>n[r],enumerable:!(o=m(n,r))||o.enumerable});return e};var I=(e,n,t)=>(t=e!=null?E(A(e)):{},p(n||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),O=e=>p(s({},"__esModule",{value:!0}),e);var h=(e,n,t)=>new Promise((o,r)=>{var l=a=>{try{i(t.next(a))}catch(u){r(u)}},d=a=>{try{i(t.throw(a))}catch(u){r(u)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(l,d);i((t=t.apply(e,n)).next())});var w=y((T,f)=>{f.exports=Magic});var H={};R(H,{FarcasterExtension:()=>g,isMobile:()=>c});var C=I(w());function S(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function F(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function L(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function P(){return F()||L()}function c(){return S()||P()}function v(){return typeof window!="undefined"&&window===window.top}var _=!0;var U="https://relay.farcaster.xyz",g=class extends C.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=t=>h(this,null,function*(){var i;let o=yield fetch(`${U}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!o.ok)throw new Error("Error creating channel.");let r=yield o.json();if(!r)throw new Error("Channel not created yet.");let l=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(i=t==null?void 0:t.showUI)!=null?i:_,domain:window.location.origin,isMobile:c(),channel:r}}]),d=this.request(l);return c()&&v()&&(window.location.href=r.url),d})}};return O(H);})(); | ||
"use strict";var MagicFarcasterExtension=(()=>{var y=Object.create;var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),O=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},h=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of A(n))!R.call(e,o)&&o!==t&&l(e,o,{get:()=>n[o],enumerable:!(a=b(n,o))||a.enumerable});return e};var P=(e,n,t)=>(t=e!=null?y(x(e)):{},h(n||!e||!e.__esModule?l(t,"default",{value:e,enumerable:!0}):t,e)),S=e=>h(l({},"__esModule",{value:!0}),e);var g=(e,n,t)=>new Promise((a,o)=>{var u=r=>{try{i(t.next(r))}catch(s){o(s)}},c=r=>{try{i(t.throw(r))}catch(s){o(s)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(u,c);i((t=t.apply(e,n)).next())});var w=I((k,f)=>{f.exports=Magic});var T={};O(T,{FarcasterExtension:()=>p,isMobile:()=>d});var E=P(w());function F(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function L(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function _(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function U(){return L()||_()}function d(){return F()||U()}function v(){return typeof window!="undefined"&&window===window.top}var H=!0;var M="https://relay.farcaster.xyz",p=class extends E.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=t=>g(this,null,function*(){return this.utils.createPromiEvent((o,u)=>g(this,null,function*(){var c;try{let i=yield fetch(`${M}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})});if(!i.ok)throw new Error("Error creating channel.");let r=yield i.json();if(!r)throw new Error("Channel not created yet.");let s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(c=t==null?void 0:t.showUI)!=null?c:H,domain:window.location.origin,isMobile:d(),channel:r}}]),m=this.request(s);d()&&v()&&(window.location.href=r.url);let C=yield m;o(C)}catch(i){u(i)}}))})}};return S(T);})(); | ||
if (MagicFarcasterExtension && MagicFarcasterExtension.default != null) { MagicFarcasterExtension = Object.assign(MagicFarcasterExtension.default, MagicFarcasterExtension); delete MagicFarcasterExtension.default; } |
{ | ||
"name": "@magic-ext/farcaster", | ||
"version": "0.18.1-canary.841.12039007622.0", | ||
"version": "0.18.1-canary.841.12039390406.0", | ||
"description": "magic farcaster extension", | ||
@@ -31,5 +31,5 @@ "author": "Magic <team@magic.link> (https://magic.link/)", | ||
"devDependencies": { | ||
"@magic-sdk/commons": "24.18.1-canary.841.12039007622.0" | ||
"@magic-sdk/commons": "24.18.1-canary.841.12039390406.0" | ||
}, | ||
"gitHead": "1f787a1f478ed4ae19bb2e45e91c7798a9c2993b" | ||
"gitHead": "50e7632f93995ef25082bdba316bbb13495da8cd" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39906