@magic-ext/farcaster
Advanced tools
Comparing version 0.19.0-canary.835.12168660550.0 to 0.19.0-canary.846.12489063737.0
@@ -1,2 +0,2 @@ | ||
"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())})}}; | ||
"use strict";var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},v=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!f.call(t,n)&&n!==r&&a(t,n,{get:()=>e[n],enumerable:!(o=g(e,n))||o.enumerable});return t};var C=t=>v(a({},"__esModule",{value:!0}),t);var A={};h(A,{FarcasterExtension:()=>l,isMobile:()=>s});module.exports=C(A);var i=require("@magic-sdk/commons");function m(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function E(){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 b(){return E()||w()}function s(){return m()||b()}function d(){return typeof window!="undefined"&&window===window.top}var x=!0;var l=class extends i.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=r=>{var c;let o=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(c=r==null?void 0:r.showUI)!=null?c:x,domain:window.location.host,siweUri:window.location.origin}}]),n=this.request(o);return n.on("channel",u=>{s()&&d()&&(window.location.href=u.url)}),n.on(i.FarcasterLoginEventEmit.Cancel,()=>{this.createIntermediaryEvent(i.FarcasterLoginEventEmit.Cancel,o.id)()}),n}}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"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())})}}; | ||
"use strict";var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},v=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!f.call(t,n)&&n!==r&&a(t,n,{get:()=>e[n],enumerable:!(o=g(e,n))||o.enumerable});return t};var C=t=>v(a({},"__esModule",{value:!0}),t);var A={};h(A,{FarcasterExtension:()=>l,isMobile:()=>s});module.exports=C(A);var i=require("@magic-sdk/commons");function m(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function E(){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 b(){return E()||w()}function s(){return m()||b()}function d(){return typeof window!="undefined"&&window===window.top}var x=!0;var l=class extends i.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=r=>{var c;let o=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(c=r==null?void 0:r.showUI)!=null?c:x,domain:window.location.host,siweUri:window.location.origin}}]),n=this.request(o);return n.on("channel",u=>{s()&&d()&&(window.location.href=u.url)}),n.on(i.FarcasterLoginEventEmit.Cancel,()=>{this.createIntermediaryEvent(i.FarcasterLoginEventEmit.Cancel,o.id)()}),n}}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
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}; | ||
import{Extension as p,FarcasterLoginEventEmit as a}from"@magic-sdk/commons";function c(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function d(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function u(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function g(){return d()||u()}function o(){return c()||g()}function i(){return typeof window!="undefined"&&window===window.top}var f=!0;var s=class extends p.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=e=>{var r;let t=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(r=e==null?void 0:e.showUI)!=null?r:f,domain:window.location.host,siweUri:window.location.origin}}]),n=this.request(t);return n.on("channel",l=>{o()&&i()&&(window.location.href=l.url)}),n.on(a.Cancel,()=>{this.createIntermediaryEvent(a.Cancel,t.id)()}),n}}};export{s as FarcasterExtension,o as isMobile}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"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);})(); | ||
"use strict";var MagicFarcasterExtension=(()=>{var h=Object.create;var a=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var w=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),b=(e,n)=>{for(var t in n)a(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of C(n))!E.call(e,r)&&r!==t&&a(e,r,{get:()=>n[r],enumerable:!(o=v(n,r))||o.enumerable});return e};var x=(e,n,t)=>(t=e!=null?h(m(e)):{},d(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),A=e=>d(a({},"__esModule",{value:!0}),e);var g=w((S,u)=>{u.exports=Magic});var O={};b(O,{FarcasterExtension:()=>c,isMobile:()=>s});var i=x(g());function I(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function y(){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 R(){return y()||F()}function s(){return I()||R()}function p(){return typeof window!="undefined"&&window===window.top}var L=!0;var c=class extends i.Extension.Internal{constructor(){super(...arguments);this.name="farcaster";this.config={};this.login=t=>{var l;let o=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:(l=t==null?void 0:t.showUI)!=null?l:L,domain:window.location.host,siweUri:window.location.origin}}]),r=this.request(o);return r.on("channel",f=>{s()&&p()&&(window.location.href=f.url)}),r.on(i.FarcasterLoginEventEmit.Cancel,()=>{this.createIntermediaryEvent(i.FarcasterLoginEventEmit.Cancel,o.id)()}),r}}};return A(O);})(); | ||
if (MagicFarcasterExtension && MagicFarcasterExtension.default != null) { MagicFarcasterExtension = Object.assign(MagicFarcasterExtension.default, MagicFarcasterExtension); delete MagicFarcasterExtension.default; } |
@@ -1,2 +0,2 @@ | ||
import { Extension } from '@magic-sdk/commons'; | ||
import { Extension, FarcasterLoginEventEmit } from '@magic-sdk/commons'; | ||
import { isMobile } from './utils'; | ||
@@ -50,2 +50,3 @@ type LoginParams = { | ||
[FarcasterLoginEventOnReceived.Failed]: (error: AuthClientError) => void; | ||
[FarcasterLoginEventEmit.Cancel]: () => void; | ||
}; | ||
@@ -55,4 +56,2 @@ export declare class FarcasterExtension extends Extension.Internal<'farcaster'> { | ||
config: {}; | ||
channel: CreateChannelAPIResponse | null; | ||
constructor(); | ||
login: (params?: LoginParams) => import("@magic-sdk/commons").PromiEvent<string, FarcasterLoginEventHandlers & { | ||
@@ -59,0 +58,0 @@ done: (result: string) => void; |
{ | ||
"name": "@magic-ext/farcaster", | ||
"version": "0.19.0-canary.835.12168660550.0", | ||
"version": "0.19.0-canary.846.12489063737.0", | ||
"description": "magic farcaster extension", | ||
@@ -31,5 +31,5 @@ "author": "Magic <team@magic.link> (https://magic.link/)", | ||
"devDependencies": { | ||
"@magic-sdk/commons": "24.19.0-canary.835.12168660550.0" | ||
"@magic-sdk/commons": "24.19.0-canary.846.12489063737.0" | ||
}, | ||
"gitHead": "915fedee65605330a4deb973a070abed6bcb7893" | ||
"gitHead": "49323a0cd9173cd3bfc8a509813acdf710df5fd4" | ||
} |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
0
36032
104