@magic-ext/farcaster
Advanced tools
Comparing version 0.0.7-canary.742.9767810670.0 to 0.0.7-canary.758.9773883232.0
@@ -1,2 +0,2 @@ | ||
"use strict";var h=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var A=(t,n)=>{for(var e in n)h(t,e,{get:n[e],enumerable:!0})},C=(t,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of v(n))!R.call(t,o)&&o!==e&&h(t,o,{get:()=>n[o],enumerable:!(a=g(n,o))||a.enumerable});return t};var I=t=>C(h({},"__esModule",{value:!0}),t);var p=(t,n,e)=>new Promise((a,o)=>{var s=r=>{try{i(e.next(r))}catch(l){o(l)}},c=r=>{try{i(e.throw(r))}catch(l){o(l)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(s,c);i((e=e.apply(t,n)).next())});var S={};A(S,{FarcasterExtension:()=>d});module.exports=I(S);var f=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 L(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function P(){return y()||L()}function u(){return m()||P()}var E=!0;var O="https://relay.farcaster.xyz",d=class extends f.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=(i=e==null?void 0:e.showUI)!=null?i:E,o=location.origin,s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:a,domain:o,isMobile:u(),channel:this.channel}}]),c=this.request(s);return u()&&(location.href=this.channel.url),c};p(this,null,function*(){let e=yield fetch(`${O}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:location.host,siweUri:location.origin})}).then(a=>a.json());this.channel=e})}}; | ||
"use strict";var u=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var A=(t,n)=>{for(var e in n)u(t,e,{get:n[e],enumerable:!0})},E=(t,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of C(n))!v.call(t,r)&&r!==e&&u(t,r,{get:()=>n[r],enumerable:!(o=f(n,r))||o.enumerable});return t};var b=t=>E(u({},"__esModule",{value:!0}),t);var g=(t,n,e)=>new Promise((o,r)=>{var s=a=>{try{i(e.next(a))}catch(c){r(c)}},l=a=>{try{i(e.throw(a))}catch(c){r(c)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(s,l);i((e=e.apply(t,n)).next())});var O={};A(O,{FarcasterExtension:()=>h});module.exports=b(O);var p=require("@magic-sdk/commons");function m(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function w(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function y(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function R(){return w()||y()}function d(){return m()||R()}var x=!0;var I="https://relay.farcaster.xyz",h=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 o=(i=e==null?void 0:e.showUI)!=null?i:x,r=window.location.origin,s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:o,domain:r,isMobile:d(),channel:this.channel}}]),l=this.request(s);return d()&&(window.location.href=this.channel.url),l};g(this,null,function*(){let e=yield fetch(`${I}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})}).then(o=>o.json());this.channel=e})}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var h=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var A=(t,n)=>{for(var e in n)h(t,e,{get:n[e],enumerable:!0})},C=(t,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of v(n))!R.call(t,o)&&o!==e&&h(t,o,{get:()=>n[o],enumerable:!(a=g(n,o))||a.enumerable});return t};var I=t=>C(h({},"__esModule",{value:!0}),t);var p=(t,n,e)=>new Promise((a,o)=>{var s=r=>{try{i(e.next(r))}catch(l){o(l)}},c=r=>{try{i(e.throw(r))}catch(l){o(l)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(s,c);i((e=e.apply(t,n)).next())});var S={};A(S,{FarcasterExtension:()=>d});module.exports=I(S);var f=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 L(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function P(){return y()||L()}function u(){return m()||P()}var E=!0;var O="https://relay.farcaster.xyz",d=class extends f.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=(i=e==null?void 0:e.showUI)!=null?i:E,o=location.origin,s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:a,domain:o,isMobile:u(),channel:this.channel}}]),c=this.request(s);return u()&&(location.href=this.channel.url),c};p(this,null,function*(){let e=yield fetch(`${O}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:location.host,siweUri:location.origin})}).then(a=>a.json());this.channel=e})}}; | ||
"use strict";var u=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var A=(t,n)=>{for(var e in n)u(t,e,{get:n[e],enumerable:!0})},E=(t,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of C(n))!v.call(t,r)&&r!==e&&u(t,r,{get:()=>n[r],enumerable:!(o=f(n,r))||o.enumerable});return t};var b=t=>E(u({},"__esModule",{value:!0}),t);var g=(t,n,e)=>new Promise((o,r)=>{var s=a=>{try{i(e.next(a))}catch(c){r(c)}},l=a=>{try{i(e.throw(a))}catch(c){r(c)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(s,l);i((e=e.apply(t,n)).next())});var O={};A(O,{FarcasterExtension:()=>h});module.exports=b(O);var p=require("@magic-sdk/commons");function m(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function w(){return typeof navigator!="undefined"&&/iPhone|iPod/.test(navigator.userAgent)}function y(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function R(){return w()||y()}function d(){return m()||R()}var x=!0;var I="https://relay.farcaster.xyz",h=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 o=(i=e==null?void 0:e.showUI)!=null?i:x,r=window.location.origin,s=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:o,domain:r,isMobile:d(),channel:this.channel}}]),l=this.request(s);return d()&&(window.location.href=this.channel.url),l};g(this,null,function*(){let e=yield fetch(`${I}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})}).then(o=>o.json());this.channel=e})}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
var u=(l,h,e)=>new Promise((o,a)=>{var r=n=>{try{t(e.next(n))}catch(s){a(s)}},i=n=>{try{t(e.throw(n))}catch(s){a(s)}},t=n=>n.done?o(n.value):Promise.resolve(n.value).then(r,i);t((e=e.apply(l,h)).next())});import{Extension as R}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 g(){return typeof navigator!="undefined"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function v(){return f()||g()}function c(){return p()||v()}var A=!0;var C="https://relay.farcaster.xyz",d=class extends R.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 o=(t=e==null?void 0:e.showUI)!=null?t:A,a=location.origin,r=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:o,domain:a,isMobile:c(),channel:this.channel}}]),i=this.request(r);return c()&&(location.href=this.channel.url),i};u(this,null,function*(){let e=yield fetch(`${C}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:location.host,siweUri:location.origin})}).then(o=>o.json());this.channel=e})}};export{d as FarcasterExtension}; | ||
var d=(c,u,e)=>new Promise((r,o)=>{var a=n=>{try{t(e.next(n))}catch(s){o(s)}},i=n=>{try{t(e.throw(n))}catch(s){o(s)}},t=n=>n.done?r(n.value):Promise.resolve(n.value).then(a,i);t((e=e.apply(c,u)).next())});import{Extension as v}from"@magic-sdk/commons";function g(){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 l(){return g()||C()}var A=!0;var E="https://relay.farcaster.xyz",h=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=(t=e==null?void 0:e.showUI)!=null?t:A,o=window.location.origin,a=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:r,domain:o,isMobile:l(),channel:this.channel}}]),i=this.request(a);return l()&&(window.location.href=this.channel.url),i};d(this,null,function*(){let e=yield fetch(`${E}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})}).then(r=>r.json());this.channel=e})}};export{h as FarcasterExtension}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var MagicFarcasterExtension=(()=>{var A=Object.create;var s=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var L=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),P=(e,n)=>{for(var t in n)s(e,t,{get:n[t],enumerable:!0})},p=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of I(n))!y.call(e,o)&&o!==t&&s(e,o,{get:()=>n[o],enumerable:!(a=C(n,o))||a.enumerable});return e};var E=(e,n,t)=>(t=e!=null?A(m(e)):{},p(n||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),O=e=>p(s({},"__esModule",{value:!0}),e);var f=(e,n,t)=>new Promise((a,o)=>{var c=r=>{try{i(t.next(r))}catch(h){o(h)}},l=r=>{try{i(t.throw(r))}catch(h){o(h)}},i=r=>r.done?a(r.value):Promise.resolve(r.value).then(c,l);i((t=t.apply(e,n)).next())});var v=L((M,g)=>{g.exports=Magic});var _={};P(_,{FarcasterExtension:()=>d});var R=E(v());function S(){return typeof navigator!="undefined"&&/android/i.test(navigator.userAgent)}function b(){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 F(){return b()||x()}function u(){return S()||F()}var w=!0;var U="https://relay.farcaster.xyz",d=class extends R.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=(i=t==null?void 0:t.showUI)!=null?i:w,o=location.origin,c=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:a,domain:o,isMobile:u(),channel:this.channel}}]),l=this.request(c);return u()&&(location.href=this.channel.url),l};f(this,null,function*(){let t=yield fetch(`${U}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:location.host,siweUri:location.origin})}).then(a=>a.json());this.channel=t})}};return O(_);})(); | ||
"use strict";var MagicFarcasterExtension=(()=>{var A=Object.create;var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,w=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})},g=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of b(n))!w.call(e,r)&&r!==t&&s(e,r,{get:()=>n[r],enumerable:!(o=E(n,r))||o.enumerable});return e};var x=(e,n,t)=>(t=e!=null?A(m(e)):{},g(n||!e||!e.__esModule?s(t,"default",{value:e,enumerable:!0}):t,e)),I=e=>g(s({},"__esModule",{value:!0}),e);var p=(e,n,t)=>new Promise((o,r)=>{var l=a=>{try{i(t.next(a))}catch(u){r(u)}},c=a=>{try{i(t.throw(a))}catch(u){r(u)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(l,c);i((t=t.apply(e,n)).next())});var C=y((T,f)=>{f.exports=Magic});var U={};R(U,{FarcasterExtension:()=>h});var v=x(C());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 d(){return O()||L()}var _=!0;var F="https://relay.farcaster.xyz",h=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 o=(i=t==null?void 0:t.showUI)!=null?i:_,r=window.location.origin,l=this.utils.createJsonRpcRequestPayload("farcaster_show_QR",[{data:{showUI:o,domain:r,isMobile:d(),channel:this.channel}}]),c=this.request(l);return d()&&(window.location.href=this.channel.url),c};p(this,null,function*(){let t=yield fetch(`${F}/v1/channel`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({domain:window.location.host,siweUri:window.location.origin})}).then(o=>o.json());this.channel=t})}};return I(U);})(); | ||
if (MagicFarcasterExtension && MagicFarcasterExtension.default != null) { MagicFarcasterExtension = Object.assign(MagicFarcasterExtension.default, MagicFarcasterExtension); delete MagicFarcasterExtension.default; } |
import { Extension } from '@magic-sdk/commons'; | ||
import type { CreateChannelAPIResponse, AuthenticateAPIResponse, AuthClientError } from '@farcaster/auth-client'; | ||
type LoginParams = { | ||
declare type LoginParams = { | ||
showUI: boolean; | ||
@@ -11,5 +10,40 @@ }; | ||
}; | ||
type FarcasterLoginEventHandlers = { | ||
interface CreateChannelAPIResponse { | ||
channelToken: string; | ||
url: string; | ||
nonce: string; | ||
} | ||
declare type Hex = `0x${string}`; | ||
interface StatusAPIResponse { | ||
state: 'pending' | 'completed'; | ||
nonce: string; | ||
url: string; | ||
message?: string; | ||
signature?: `0x${string}`; | ||
fid?: number; | ||
username?: string; | ||
bio?: string; | ||
displayName?: string; | ||
pfpUrl?: string; | ||
verifications?: Hex[]; | ||
custody?: Hex; | ||
} | ||
declare type AuthClientErrorCode = 'unauthenticated' | 'unauthorized' | 'bad_request' | 'bad_request.validation_failure' | 'not_found' | 'not_implemented' | 'unavailable' | 'unknown'; | ||
interface AuthClientErrorOpts { | ||
message: string; | ||
cause: Error | AuthClientError; | ||
presentable: boolean; | ||
} | ||
declare class AuthClientError extends Error { | ||
readonly errCode: AuthClientErrorCode; | ||
readonly presentable: boolean; | ||
/** | ||
* @param errCode - the AuthClientError code for this message | ||
* @param context - a message, another Error, or a AuthClientErrorOpts | ||
*/ | ||
constructor(errCode: AuthClientErrorCode, context: Partial<AuthClientErrorOpts> | string | Error); | ||
} | ||
declare type FarcasterLoginEventHandlers = { | ||
[FarcasterLoginEventOnReceived.OpenChannel]: (channel: CreateChannelAPIResponse) => void; | ||
[FarcasterLoginEventOnReceived.Success]: (data: AuthenticateAPIResponse) => void; | ||
[FarcasterLoginEventOnReceived.Success]: (data: StatusAPIResponse) => void; | ||
[FarcasterLoginEventOnReceived.Failed]: (error: AuthClientError) => void; | ||
@@ -22,3 +56,3 @@ }; | ||
constructor(); | ||
login: (params?: LoginParams) => import("@magic-sdk/commons").PromiEvent<string, FarcasterLoginEventHandlers & { | ||
login: (params?: LoginParams | undefined) => import("@magic-sdk/commons").PromiEvent<string, FarcasterLoginEventHandlers & { | ||
done: (result: string) => void; | ||
@@ -25,0 +59,0 @@ error: (reason: any) => void; |
{ | ||
"name": "@magic-ext/farcaster", | ||
"version": "0.0.7-canary.742.9767810670.0", | ||
"version": "0.0.7-canary.758.9773883232.0", | ||
"description": "magic farcaster extension", | ||
@@ -27,18 +27,9 @@ "author": "Magic <team@magic.link> (https://magic.link/)", | ||
"include": [ | ||
"@magic-sdk/commons", | ||
"viem" | ||
], | ||
"exclude": [ | ||
"ethers" | ||
"@magic-sdk/commons" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@magic-sdk/commons": "24.0.7-canary.742.9767810670.0" | ||
"@magic-sdk/commons": "^24.0.5" | ||
}, | ||
"dependencies": { | ||
"@farcaster/auth-client": "^0.1.1", | ||
"ethers": "^6.13.0", | ||
"viem": "^2.15.1" | ||
}, | ||
"gitHead": "764b4cf2dfa3b44e4880357a552ada2034cc9358" | ||
"gitHead": "3f8fe4c55ecba2fbe6e02200ae1e39ef119be51e" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38832
0
112
- Removed@farcaster/auth-client@^0.1.1
- Removedethers@^6.13.0
- Removedviem@^2.15.1
- Removed@adraffy/ens-normalize@1.10.1(transitive)
- Removed@farcaster/auth-client@0.1.1(transitive)
- Removed@noble/curves@1.2.01.7.01.8.0(transitive)
- Removed@noble/hashes@1.3.21.6.01.6.11.7.0(transitive)
- Removed@scure/base@1.2.1(transitive)
- Removed@scure/bip32@1.6.0(transitive)
- Removed@scure/bip39@1.5.0(transitive)
- Removed@spruceid/siwe-parser@2.1.2(transitive)
- Removed@stablelib/binary@1.0.1(transitive)
- Removed@stablelib/int@1.0.1(transitive)
- Removed@stablelib/random@1.0.2(transitive)
- Removed@stablelib/wipe@1.0.1(transitive)
- Removed@types/node@22.7.5(transitive)
- Removedabitype@1.0.7(transitive)
- Removedaes-js@4.0.0-beta.5(transitive)
- Removedapg-js@4.4.0(transitive)
- Removedethers@6.13.5(transitive)
- Removedeventemitter3@5.0.1(transitive)
- Removedisows@1.0.6(transitive)
- Removedneverthrow@6.2.2(transitive)
- Removedox@0.6.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedsiwe@2.3.2(transitive)
- Removedtslib@2.7.0(transitive)
- Removedundici-types@6.19.8(transitive)
- Removeduri-js@4.4.1(transitive)
- Removedvalid-url@1.0.9(transitive)
- Removedviem@2.22.6(transitive)
- Removedwebauthn-p256@0.0.10(transitive)
- Removedws@8.17.18.18.0(transitive)