@onflow/fcl
Advanced tools
Comparing version 1.10.0 to 1.10.1
@@ -8,8 +8,4 @@ { | ||
}, | ||
"extends": [ | ||
"plugin:jsdoc/recommended" | ||
], | ||
"plugins": [ | ||
"jsdoc" | ||
], | ||
"extends": ["plugin:jsdoc/recommended"], | ||
"plugins": ["jsdoc"], | ||
"parserOptions": { | ||
@@ -32,2 +28,2 @@ "ecmaVersion": "latest", | ||
} | ||
} | ||
} |
# @onflow/fcl | ||
## 1.10.1 | ||
### Patch Changes | ||
- Updated dependencies [[`7ef7edf1`](https://github.com/onflow/fcl-js/commit/7ef7edf1e134041da944f24f49e661caadcc7074), [`6c635f9f`](https://github.com/onflow/fcl-js/commit/6c635f9ff340284845ffe1196965ced7c748294f), [`8fb453b5`](https://github.com/onflow/fcl-js/commit/8fb453b5ff3a00285d91a5432972afbe9e779706), [`ad089fe7`](https://github.com/onflow/fcl-js/commit/ad089fe7556767e1fae96f3f2e98fd76c49bba88)]: | ||
- @onflow/sdk@1.5.0 | ||
- @onflow/types@1.4.0 | ||
- @onflow/util-invariant@1.2.3 | ||
- @onflow/config@1.4.0 | ||
- @onflow/fcl-core@1.9.1 | ||
## 1.10.0 | ||
@@ -4,0 +15,0 @@ |
@@ -157,3 +157,3 @@ 'use strict'; | ||
const VERSION = "1.10.0" ; | ||
const VERSION = "1.10.1" ; | ||
@@ -160,0 +160,0 @@ function execIframeRPC(_ref) { |
@@ -154,3 +154,3 @@ import { buildMessageHandler, serviceEndpoint, normalizePollingResponse, CORE_STRATEGIES, getExecHttpPost, getMutate, getCurrentUser, initServiceRegistry } from '@onflow/fcl-core'; | ||
const VERSION = "1.10.0" ; | ||
const VERSION = "1.10.1" ; | ||
@@ -157,0 +157,0 @@ function execIframeRPC(_ref) { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@onflow/fcl-core"),require("@onflow/config"),require("@onflow/util-invariant"),require("@onflow/util-uid")):"function"==typeof define&&define.amd?define(["exports","@onflow/fcl-core","@onflow/config","@onflow/util-invariant","@onflow/util-uid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).onflowFcl={},e.fclCore,e.config,e.utilInvariant,e.utilUid)}(this,(function(e,t,n,r,o){"use strict";const a="FCL_IFRAME",s="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n";function c(e){r.invariant(!document.getElementById(a),"Attempt at triggering multiple Frames",{src:e});const t=document.createElement("iframe");t.src=e,t.id=a,t.allow="usb *; hid *",t.frameBorder="0",t.style.cssText=s,document.body.append(t);return[t.contentWindow,()=>{document.getElementById(a)&&document.getElementById(a).remove()}]}const i="FCL_POP";let l=null,u=null;function d(e){null==l||l?.closed?l=function(e,t,n,r,o){const a=n.top.outerHeight/2+n.top.screenY-o/2,s=n.top.outerWidth/2+n.top.screenX-r/2,c=n.open(e,t,`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${r}, height=${o}, top=${a}, left=${s}`);if(!c)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return c}(e,i,window,640,770):u!==e?(l.location.replace(e),l.focus()):l.focus(),u=e;return[l,()=>{l&&!l.closed&&l.close(),l=null}]}let p=null,f=null;function g(e){if(null==p||p?.closed){if(p=window.open(e,"_blank"),!p)throw new Error("Tab failed to open (was it blocked by the browser?)")}else f!==e?(p.location.replace(e),p.focus()):p.focus();f=e;return[p,()=>{p&&!p.closed&&p.close(),p=null}]}const b=()=>{try{return{can:!("undefined"==typeof window),get:async e=>JSON.parse(sessionStorage.getItem(e)),put:async(e,t)=>sessionStorage.setItem(e,JSON.stringify(t))}}catch(e){return null}},y=()=>{};const E="1.10.0";const m=()=>{};const P=()=>{};const R=()=>{};const O=()=>{throw new Error("Strategy util has not been implemented on this platform")},h={"VIEW/IFRAME":c,"VIEW/POP":d,"VIEW/TAB":g,"VIEW/MOBILE_BROWSER":O,"VIEW/DEEPLINK":O};async function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{serviceEndpoint:()=>{}};const{serviceEndpoint:n}=t;try{return h[e.method](n(e),t)}catch(n){throw console.error("execLocal({service, opts = {}})",n,{service:e,opts:t}),n}}const j={[t.CORE_STRATEGIES["HTTP/RPC"]]:t.getExecHttpPost(w),[t.CORE_STRATEGIES["HTTP/POST"]]:t.getExecHttpPost(w),[t.CORE_STRATEGIES["IFRAME/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,i)=>{const l=o.uid(),u=s.includeOlderJsonRpcCall;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:y,close:y};const r=n.onClose||y,o=n.onMessage||y,a=n.onReady||y,s=n.onResponse||y,i=t.buildMessageHandler({close:d,send:p,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",i);const[l,u]=c(t.serviceEndpoint(e));return{send:p,close:d};function d(){try{window.removeEventListener("message",i),u(),r()}catch(e){console.error("Frame Close Error",e)}}function p(e){try{l.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Frame Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({type:"FCL:VIEW:READY:RESPONSE",fclVersion:E,body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:l,method:"fcl:sign",params:[r,n.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":i(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:i("Declined: No reason supplied"),o()}}catch(e){throw console.error("execIframeRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==l)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":i(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:i("Declined: No reason supplied"),o()}}catch(e){throw console.error("execIframeRPC onMessage error",e),e}},onClose(){i("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["POP/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,c)=>{const i=o.uid(),{redir:l,includeOlderJsonRpcCall:u}=s;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:m,close:m};const r=n.onClose||m,o=n.onMessage||m,a=n.onReady||m,s=n.onResponse||m,c=t.buildMessageHandler({close:p,send:f,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",c);const[i,l]=d(t.serviceEndpoint(e)),u=setInterval((function(){i&&i.closed&&p()}),500);return{send:f,close:p};function p(){try{window.removeEventListener("message",c),clearInterval(u),l(),r()}catch(e){console.error("Popup Close Error",e)}}function f(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Popup Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==i)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){c("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["TAB/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,c)=>{const i=o.uid(),{redir:l,includeOlderJsonRpcCall:u}=s;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:P,close:P};const r=n.onClose||P,o=n.onMessage||P,a=n.onReady||P,s=n.onResponse||P,c=t.buildMessageHandler({close:d,send:p,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",c);const[i,l]=g(t.serviceEndpoint(e)),u=setInterval((function(){i&&i.closed&&d()}),500);return{send:p,close:d};function d(){try{window.removeEventListener("message",c),clearInterval(u),l(),r()}catch(e){console.error("Tab Close Error",e)}}function p(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Tab Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==i)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){c("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["EXT/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,a)=>{!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:R,close:R};const r=n.onClose||R,o=n.onMessage||R,a=n.onReady||R,s=n.onResponse||R,c=t.buildMessageHandler({close:i,send:l,onReady:a,onResponse:s,onMessage:o});return window.addEventListener("message",c),l({service:e}),{send:l,close:i};function i(){try{window.removeEventListener("message",c),r()}catch(e){console.error("Ext Close Error",e)}}function l(e){try{window&&window.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Ext Send Error",e,t)}}}(n,{async onReady(e,t){let{send:a}=t;try{a({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":a(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:a("Declined: No reason supplied"),o()}}catch(e){throw console.error("execExtRPC onResponse error",e),e}},onClose(){a("Declined: Externally Halted")}})}))}},v=t.getMutate({platform:"web"}),C=t.getCurrentUser({platform:"web"}),I=C().authorization;n.config({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":b()}),t.initServiceRegistry({coreStrategies:j}),Object.defineProperty(e,"AppUtils",{enumerable:!0,get:function(){return t.AppUtils}}),Object.defineProperty(e,"InteractionTemplateUtils",{enumerable:!0,get:function(){return t.InteractionTemplateUtils}}),Object.defineProperty(e,"TestUtils",{enumerable:!0,get:function(){return t.TestUtils}}),Object.defineProperty(e,"VERSION",{enumerable:!0,get:function(){return t.VERSION}}),Object.defineProperty(e,"WalletUtils",{enumerable:!0,get:function(){return t.WalletUtils}}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return t.account}}),Object.defineProperty(e,"arg",{enumerable:!0,get:function(){return t.arg}}),Object.defineProperty(e,"args",{enumerable:!0,get:function(){return t.args}}),Object.defineProperty(e,"atBlockHeight",{enumerable:!0,get:function(){return t.atBlockHeight}}),Object.defineProperty(e,"atBlockId",{enumerable:!0,get:function(){return t.atBlockId}}),Object.defineProperty(e,"authorization",{enumerable:!0,get:function(){return t.authorization}}),Object.defineProperty(e,"authorizations",{enumerable:!0,get:function(){return t.authorizations}}),Object.defineProperty(e,"block",{enumerable:!0,get:function(){return t.block}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return t.build}}),Object.defineProperty(e,"cadence",{enumerable:!0,get:function(){return t.cadence}}),Object.defineProperty(e,"cdc",{enumerable:!0,get:function(){return t.cdc}}),Object.defineProperty(e,"config",{enumerable:!0,get:function(){return t.config}}),Object.defineProperty(e,"createSignableVoucher",{enumerable:!0,get:function(){return t.createSignableVoucher}}),Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return t.decode}}),Object.defineProperty(e,"discovery",{enumerable:!0,get:function(){return t.discovery}}),Object.defineProperty(e,"display",{enumerable:!0,get:function(){return t.display}}),Object.defineProperty(e,"events",{enumerable:!0,get:function(){return t.events}}),Object.defineProperty(e,"getAccount",{enumerable:!0,get:function(){return t.getAccount}}),Object.defineProperty(e,"getBlock",{enumerable:!0,get:function(){return t.getBlock}}),Object.defineProperty(e,"getBlockHeader",{enumerable:!0,get:function(){return t.getBlockHeader}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return t.getChainId}}),Object.defineProperty(e,"getCollection",{enumerable:!0,get:function(){return t.getCollection}}),Object.defineProperty(e,"getEvents",{enumerable:!0,get:function(){return t.getEvents}}),Object.defineProperty(e,"getEventsAtBlockHeightRange",{enumerable:!0,get:function(){return t.getEventsAtBlockHeightRange}}),Object.defineProperty(e,"getEventsAtBlockIds",{enumerable:!0,get:function(){return t.getEventsAtBlockIds}}),Object.defineProperty(e,"getNetworkParameters",{enumerable:!0,get:function(){return t.getNetworkParameters}}),Object.defineProperty(e,"getNodeVersionInfo",{enumerable:!0,get:function(){return t.getNodeVersionInfo}}),Object.defineProperty(e,"getTransaction",{enumerable:!0,get:function(){return t.getTransaction}}),Object.defineProperty(e,"getTransactionStatus",{enumerable:!0,get:function(){return t.getTransactionStatus}}),Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return t.invariant}}),Object.defineProperty(e,"isBad",{enumerable:!0,get:function(){return t.isBad}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return t.isOk}}),Object.defineProperty(e,"limit",{enumerable:!0,get:function(){return t.limit}}),Object.defineProperty(e,"nodeVersionInfo",{enumerable:!0,get:function(){return t.nodeVersionInfo}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return t.param}}),Object.defineProperty(e,"params",{enumerable:!0,get:function(){return t.params}}),Object.defineProperty(e,"payer",{enumerable:!0,get:function(){return t.payer}}),Object.defineProperty(e,"ping",{enumerable:!0,get:function(){return t.ping}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),Object.defineProperty(e,"pluginRegistry",{enumerable:!0,get:function(){return t.pluginRegistry}}),Object.defineProperty(e,"proposer",{enumerable:!0,get:function(){return t.proposer}}),Object.defineProperty(e,"query",{enumerable:!0,get:function(){return t.query}}),Object.defineProperty(e,"ref",{enumerable:!0,get:function(){return t.ref}}),Object.defineProperty(e,"sansPrefix",{enumerable:!0,get:function(){return t.sansPrefix}}),Object.defineProperty(e,"script",{enumerable:!0,get:function(){return t.script}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return t.send}}),Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return t.serialize}}),Object.defineProperty(e,"subscribeEvents",{enumerable:!0,get:function(){return t.subscribeEvents}}),Object.defineProperty(e,"t",{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return t.transaction}}),Object.defineProperty(e,"tx",{enumerable:!0,get:function(){return t.tx}}),Object.defineProperty(e,"validator",{enumerable:!0,get:function(){return t.validator}}),Object.defineProperty(e,"verifyUserSignatures",{enumerable:!0,get:function(){return t.verifyUserSignatures}}),Object.defineProperty(e,"voucherIntercept",{enumerable:!0,get:function(){return t.voucherIntercept}}),Object.defineProperty(e,"voucherToTxId",{enumerable:!0,get:function(){return t.voucherToTxId}}),Object.defineProperty(e,"why",{enumerable:!0,get:function(){return t.why}}),Object.defineProperty(e,"withPrefix",{enumerable:!0,get:function(){return t.withPrefix}}),e.authenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.authz=I,e.currentUser=C,e.logIn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.mutate=v,e.reauthenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().unauthenticate(),C().authenticate(e)},e.signUp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.unauthenticate=()=>C().unauthenticate(),Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@onflow/fcl-core"),require("@onflow/config"),require("@onflow/util-invariant"),require("@onflow/util-uid")):"function"==typeof define&&define.amd?define(["exports","@onflow/fcl-core","@onflow/config","@onflow/util-invariant","@onflow/util-uid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).onflowFcl={},e.fclCore,e.config,e.utilInvariant,e.utilUid)}(this,(function(e,t,n,r,o){"use strict";const a="FCL_IFRAME",s="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n";function c(e){r.invariant(!document.getElementById(a),"Attempt at triggering multiple Frames",{src:e});const t=document.createElement("iframe");t.src=e,t.id=a,t.allow="usb *; hid *",t.frameBorder="0",t.style.cssText=s,document.body.append(t);return[t.contentWindow,()=>{document.getElementById(a)&&document.getElementById(a).remove()}]}const i="FCL_POP";let l=null,u=null;function d(e){null==l||l?.closed?l=function(e,t,n,r,o){const a=n.top.outerHeight/2+n.top.screenY-o/2,s=n.top.outerWidth/2+n.top.screenX-r/2,c=n.open(e,t,`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${r}, height=${o}, top=${a}, left=${s}`);if(!c)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return c}(e,i,window,640,770):u!==e?(l.location.replace(e),l.focus()):l.focus(),u=e;return[l,()=>{l&&!l.closed&&l.close(),l=null}]}let p=null,f=null;function g(e){if(null==p||p?.closed){if(p=window.open(e,"_blank"),!p)throw new Error("Tab failed to open (was it blocked by the browser?)")}else f!==e?(p.location.replace(e),p.focus()):p.focus();f=e;return[p,()=>{p&&!p.closed&&p.close(),p=null}]}const b=()=>{try{return{can:!("undefined"==typeof window),get:async e=>JSON.parse(sessionStorage.getItem(e)),put:async(e,t)=>sessionStorage.setItem(e,JSON.stringify(t))}}catch(e){return null}},y=()=>{};const E="1.10.1";const m=()=>{};const P=()=>{};const R=()=>{};const O=()=>{throw new Error("Strategy util has not been implemented on this platform")},h={"VIEW/IFRAME":c,"VIEW/POP":d,"VIEW/TAB":g,"VIEW/MOBILE_BROWSER":O,"VIEW/DEEPLINK":O};async function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{serviceEndpoint:()=>{}};const{serviceEndpoint:n}=t;try{return h[e.method](n(e),t)}catch(n){throw console.error("execLocal({service, opts = {}})",n,{service:e,opts:t}),n}}const j={[t.CORE_STRATEGIES["HTTP/RPC"]]:t.getExecHttpPost(w),[t.CORE_STRATEGIES["HTTP/POST"]]:t.getExecHttpPost(w),[t.CORE_STRATEGIES["IFRAME/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,i)=>{const l=o.uid(),u=s.includeOlderJsonRpcCall;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:y,close:y};const r=n.onClose||y,o=n.onMessage||y,a=n.onReady||y,s=n.onResponse||y,i=t.buildMessageHandler({close:d,send:p,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",i);const[l,u]=c(t.serviceEndpoint(e));return{send:p,close:d};function d(){try{window.removeEventListener("message",i),u(),r()}catch(e){console.error("Frame Close Error",e)}}function p(e){try{l.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Frame Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({type:"FCL:VIEW:READY:RESPONSE",fclVersion:E,body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:l,method:"fcl:sign",params:[r,n.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":i(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:i("Declined: No reason supplied"),o()}}catch(e){throw console.error("execIframeRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==l)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":i(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:i("Declined: No reason supplied"),o()}}catch(e){throw console.error("execIframeRPC onMessage error",e),e}},onClose(){i("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["POP/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,c)=>{const i=o.uid(),{redir:l,includeOlderJsonRpcCall:u}=s;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:m,close:m};const r=n.onClose||m,o=n.onMessage||m,a=n.onReady||m,s=n.onResponse||m,c=t.buildMessageHandler({close:p,send:f,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",c);const[i,l]=d(t.serviceEndpoint(e)),u=setInterval((function(){i&&i.closed&&p()}),500);return{send:f,close:p};function p(){try{window.removeEventListener("message",c),clearInterval(u),l(),r()}catch(e){console.error("Popup Close Error",e)}}function f(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Popup Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==i)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){c("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["TAB/RPC"]]:function(e){let{service:n,body:r,config:a,opts:s}=e;return new Promise(((e,c)=>{const i=o.uid(),{redir:l,includeOlderJsonRpcCall:u}=s;!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:P,close:P};const r=n.onClose||P,o=n.onMessage||P,a=n.onReady||P,s=n.onResponse||P,c=t.buildMessageHandler({close:d,send:p,onReady:a,onResponse:s,onMessage:o});window.addEventListener("message",c);const[i,l]=g(t.serviceEndpoint(e)),u=setInterval((function(){i&&i.closed&&d()}),500);return{send:p,close:d};function d(){try{window.removeEventListener("message",c),clearInterval(u),l(),r()}catch(e){console.error("Tab Close Error",e)}}function p(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Tab Send Error",e,t)}}}(n,{async onReady(e,t){let{send:o}=t;try{o({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a}),o({fclVersion:E,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:a,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;if("2.0"!==n.data.jsonrpc)return;if(n.data.id!==i)return;const r=t.normalizePollingResponse(n.data.result);switch(r.status){case"APPROVED":e(r.data),!l&&o();break;case"DECLINED":c(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:c("Declined: No reason supplied"),o()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){c("Declined: Externally Halted")}})}))},[t.CORE_STRATEGIES["EXT/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,a)=>{!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:R,close:R};const r=n.onClose||R,o=n.onMessage||R,a=n.onReady||R,s=n.onResponse||R,c=t.buildMessageHandler({close:i,send:l,onReady:a,onResponse:s,onMessage:o});return window.addEventListener("message",c),l({service:e}),{send:l,close:i};function i(){try{window.removeEventListener("message",c),r()}catch(e){console.error("Ext Close Error",e)}}function l(e){try{window&&window.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Ext Send Error",e,t)}}}(n,{async onReady(e,t){let{send:a}=t;try{a({fclVersion:E,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o})}catch(e){throw e}},onResponse(n,r){let{close:o}=r;try{if("object"!=typeof n.data)return;const r=t.normalizePollingResponse(n.data);switch(r.status){case"APPROVED":e(r.data),o();break;case"DECLINED":a(`Declined: ${r.reason||"No reason supplied"}`),o();break;case"REDIRECT":e(r),o();break;default:a("Declined: No reason supplied"),o()}}catch(e){throw console.error("execExtRPC onResponse error",e),e}},onClose(){a("Declined: Externally Halted")}})}))}},v=t.getMutate({platform:"web"}),C=t.getCurrentUser({platform:"web"}),I=C().authorization;n.config({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":b()}),t.initServiceRegistry({coreStrategies:j}),Object.defineProperty(e,"AppUtils",{enumerable:!0,get:function(){return t.AppUtils}}),Object.defineProperty(e,"InteractionTemplateUtils",{enumerable:!0,get:function(){return t.InteractionTemplateUtils}}),Object.defineProperty(e,"TestUtils",{enumerable:!0,get:function(){return t.TestUtils}}),Object.defineProperty(e,"VERSION",{enumerable:!0,get:function(){return t.VERSION}}),Object.defineProperty(e,"WalletUtils",{enumerable:!0,get:function(){return t.WalletUtils}}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return t.account}}),Object.defineProperty(e,"arg",{enumerable:!0,get:function(){return t.arg}}),Object.defineProperty(e,"args",{enumerable:!0,get:function(){return t.args}}),Object.defineProperty(e,"atBlockHeight",{enumerable:!0,get:function(){return t.atBlockHeight}}),Object.defineProperty(e,"atBlockId",{enumerable:!0,get:function(){return t.atBlockId}}),Object.defineProperty(e,"authorization",{enumerable:!0,get:function(){return t.authorization}}),Object.defineProperty(e,"authorizations",{enumerable:!0,get:function(){return t.authorizations}}),Object.defineProperty(e,"block",{enumerable:!0,get:function(){return t.block}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return t.build}}),Object.defineProperty(e,"cadence",{enumerable:!0,get:function(){return t.cadence}}),Object.defineProperty(e,"cdc",{enumerable:!0,get:function(){return t.cdc}}),Object.defineProperty(e,"config",{enumerable:!0,get:function(){return t.config}}),Object.defineProperty(e,"createSignableVoucher",{enumerable:!0,get:function(){return t.createSignableVoucher}}),Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return t.decode}}),Object.defineProperty(e,"discovery",{enumerable:!0,get:function(){return t.discovery}}),Object.defineProperty(e,"display",{enumerable:!0,get:function(){return t.display}}),Object.defineProperty(e,"events",{enumerable:!0,get:function(){return t.events}}),Object.defineProperty(e,"getAccount",{enumerable:!0,get:function(){return t.getAccount}}),Object.defineProperty(e,"getBlock",{enumerable:!0,get:function(){return t.getBlock}}),Object.defineProperty(e,"getBlockHeader",{enumerable:!0,get:function(){return t.getBlockHeader}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return t.getChainId}}),Object.defineProperty(e,"getCollection",{enumerable:!0,get:function(){return t.getCollection}}),Object.defineProperty(e,"getEvents",{enumerable:!0,get:function(){return t.getEvents}}),Object.defineProperty(e,"getEventsAtBlockHeightRange",{enumerable:!0,get:function(){return t.getEventsAtBlockHeightRange}}),Object.defineProperty(e,"getEventsAtBlockIds",{enumerable:!0,get:function(){return t.getEventsAtBlockIds}}),Object.defineProperty(e,"getNetworkParameters",{enumerable:!0,get:function(){return t.getNetworkParameters}}),Object.defineProperty(e,"getNodeVersionInfo",{enumerable:!0,get:function(){return t.getNodeVersionInfo}}),Object.defineProperty(e,"getTransaction",{enumerable:!0,get:function(){return t.getTransaction}}),Object.defineProperty(e,"getTransactionStatus",{enumerable:!0,get:function(){return t.getTransactionStatus}}),Object.defineProperty(e,"invariant",{enumerable:!0,get:function(){return t.invariant}}),Object.defineProperty(e,"isBad",{enumerable:!0,get:function(){return t.isBad}}),Object.defineProperty(e,"isOk",{enumerable:!0,get:function(){return t.isOk}}),Object.defineProperty(e,"limit",{enumerable:!0,get:function(){return t.limit}}),Object.defineProperty(e,"nodeVersionInfo",{enumerable:!0,get:function(){return t.nodeVersionInfo}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return t.param}}),Object.defineProperty(e,"params",{enumerable:!0,get:function(){return t.params}}),Object.defineProperty(e,"payer",{enumerable:!0,get:function(){return t.payer}}),Object.defineProperty(e,"ping",{enumerable:!0,get:function(){return t.ping}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),Object.defineProperty(e,"pluginRegistry",{enumerable:!0,get:function(){return t.pluginRegistry}}),Object.defineProperty(e,"proposer",{enumerable:!0,get:function(){return t.proposer}}),Object.defineProperty(e,"query",{enumerable:!0,get:function(){return t.query}}),Object.defineProperty(e,"ref",{enumerable:!0,get:function(){return t.ref}}),Object.defineProperty(e,"sansPrefix",{enumerable:!0,get:function(){return t.sansPrefix}}),Object.defineProperty(e,"script",{enumerable:!0,get:function(){return t.script}}),Object.defineProperty(e,"send",{enumerable:!0,get:function(){return t.send}}),Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return t.serialize}}),Object.defineProperty(e,"subscribeEvents",{enumerable:!0,get:function(){return t.subscribeEvents}}),Object.defineProperty(e,"t",{enumerable:!0,get:function(){return t.t}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return t.transaction}}),Object.defineProperty(e,"tx",{enumerable:!0,get:function(){return t.tx}}),Object.defineProperty(e,"validator",{enumerable:!0,get:function(){return t.validator}}),Object.defineProperty(e,"verifyUserSignatures",{enumerable:!0,get:function(){return t.verifyUserSignatures}}),Object.defineProperty(e,"voucherIntercept",{enumerable:!0,get:function(){return t.voucherIntercept}}),Object.defineProperty(e,"voucherToTxId",{enumerable:!0,get:function(){return t.voucherToTxId}}),Object.defineProperty(e,"why",{enumerable:!0,get:function(){return t.why}}),Object.defineProperty(e,"withPrefix",{enumerable:!0,get:function(){return t.withPrefix}}),e.authenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.authz=I,e.currentUser=C,e.logIn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.mutate=v,e.reauthenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().unauthenticate(),C().authenticate(e)},e.signUp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return C().authenticate(e)},e.unauthenticate=()=>C().unauthenticate(),Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=fcl.umd.min.js.map |
{ | ||
"name": "@onflow/fcl", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"description": "Flow Client Library", | ||
@@ -51,11 +51,11 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.18.6", | ||
"@onflow/fcl-core": "1.9.0", | ||
"@onflow/config": "1.3.0", | ||
"@onflow/fcl-core": "1.9.1", | ||
"@onflow/config": "1.4.0", | ||
"@onflow/interaction": "0.0.11", | ||
"@onflow/rlp": "1.2.2", | ||
"@onflow/sdk": "1.4.0", | ||
"@onflow/types": "1.3.0", | ||
"@onflow/sdk": "1.5.0", | ||
"@onflow/types": "1.4.0", | ||
"@onflow/util-actor": "1.3.2", | ||
"@onflow/util-address": "1.2.2", | ||
"@onflow/util-invariant": "1.2.2", | ||
"@onflow/util-invariant": "1.2.3", | ||
"@onflow/util-logger": "1.3.2", | ||
@@ -62,0 +62,0 @@ "@onflow/util-semver": "1.0.2", |
@@ -7,4 +7,4 @@ { | ||
"declarationDir": "types", | ||
"rootDir": "src", | ||
"rootDir": "src" | ||
} | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
219468
0
2035
+ Added@onflow/config@1.4.0(transitive)
+ Added@onflow/fcl-core@1.9.1(transitive)
+ Added@onflow/sdk@1.5.0(transitive)
+ Added@onflow/transport-http@1.10.1(transitive)
+ Added@onflow/types@1.4.0(transitive)
+ Added@onflow/util-invariant@1.2.3(transitive)
- Removed@onflow/config@1.3.0(transitive)
- Removed@onflow/fcl-core@1.9.0(transitive)
- Removed@onflow/sdk@1.4.0(transitive)
- Removed@onflow/transport-http@1.10.0(transitive)
- Removed@onflow/types@1.3.0(transitive)
- Removed@onflow/util-invariant@1.2.2(transitive)
Updated@onflow/config@1.4.0
Updated@onflow/fcl-core@1.9.1
Updated@onflow/sdk@1.5.0
Updated@onflow/types@1.4.0
Updated@onflow/util-invariant@1.2.3