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