@coinjinja/coinview-sdk
Advanced tools
Comparing version 1.0.2-dev to 1.0.3-dev
@@ -147,3 +147,3 @@ 'use strict'; | ||
var _methods = ['user.profile', 'user.assets', 'user.address', 'payment.create', 'navigate.back', 'navigate.close', 'navigate.toggleNavBar', 'ui.notice', 'ui.confirm', 'utils.setClipboard', 'utils.share', 'utils.scanQR', 'utils._choosePhoto', 'utils._openUrl']; | ||
var _methods = ['user.profile', 'user.assets', 'user.address', 'payment.create', 'navigate.back', 'navigate.close', 'navigate.toggleNavBar', 'ui.notice', 'ui.confirm', 'utils.setClipboard', 'utils.share', 'utils.scanQr', 'utils._choosePhoto', 'utils._openUrl']; | ||
@@ -150,0 +150,0 @@ _methods.forEach(register); |
@@ -1,1 +0,1 @@ | ||
var coinview=function(){"use strict";for(var n,a=(function(n){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var e=new Uint8Array(16);n.exports=function(){return r(e),e}}else{var t=new Array(16);n.exports=function(){for(var n,r=0;r<16;r++)0==(3&r)&&(n=4294967296*Math.random()),t[r]=n>>>((3&r)<<3)&255;return t}}}(n={exports:{}},n.exports),n.exports),o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);var u=function(n,r){var e=r||0,t=o;return[t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]]].join("")};var s=function(n,r,e){var t=r&&e||0;"string"==typeof n&&(r="binary"===n?new Array(16):null,n=null);var o=(n=n||{}).random||(n.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,r)for(var i=0;i<16;++i)r[t+i]=o[i];return r||u(o)},c={};function e(o,i){var a=0;return new Promise(function(e,t){function r(n,r){n?t(n):e(r)}!function n(){window.originalPostMessage?function(n,r,e){var t=s();c[t]=e;var o={method:n,uuid:t};r&&(o.payload=r),window.postMessage(JSON.stringify(o))}(o,i,r):3e3<a?t(new Error("Timeout")):(a+=10,setTimeout(n,10))}()})}function t(r){if("string"==typeof r)try{r=JSON.parse(r)}catch(n){return console.error("Invalid data:",r)}if(r.uuid){var n=c[r.uuid];n?(n(r.error,r.payload),delete c[r.uuid]):console.warn("Unregistered callback:",r.uuid)}else console.error("Invalid data:",r)}var i={send:e,receive:t,init:function(n){return window.document.addEventListener("message",function(n){t(n.data)}),n.$version="1.0",n.$url=location.href,e("app.init",n)}},f={},l=null,d=!1;f.init=function(n){return d?new Promise(function(n,r){n(f)}):i.init({appId:n}).then(function(n){return d=!0,l=n,f})},f.app=function(){if(!d)throw new Error('Please call after "coinview.init"');return new Promise(function(r,n){!function n(){l?r(l):setTimeout(n,10)}()})};var p=["user.profile","user.assets","user.address","payment.create","navigate.back","navigate.close","navigate.toggleNavBar","ui.notice","ui.confirm","utils.setClipboard","utils.share","utils.scanQR","utils._choosePhoto","utils._openUrl"];return p.forEach(function(r){var n=r.split("."),e=n[0],t=n[1];f[e]||(f[e]={}),f[e][t]=function(n){if(!d)throw new Error('Please call after "coinview.init"');return i.send(r,n)}}),f._methods=p,f}(); | ||
var coinview=function(){"use strict";for(var n,a=(function(n){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var e=new Uint8Array(16);n.exports=function(){return r(e),e}}else{var t=new Array(16);n.exports=function(){for(var n,r=0;r<16;r++)0==(3&r)&&(n=4294967296*Math.random()),t[r]=n>>>((3&r)<<3)&255;return t}}}(n={exports:{}},n.exports),n.exports),o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);var u=function(n,r){var e=r||0,t=o;return[t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],"-",t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]],t[n[e++]]].join("")};var s=function(n,r,e){var t=r&&e||0;"string"==typeof n&&(r="binary"===n?new Array(16):null,n=null);var o=(n=n||{}).random||(n.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,r)for(var i=0;i<16;++i)r[t+i]=o[i];return r||u(o)},c={};function e(o,i){var a=0;return new Promise(function(e,t){function r(n,r){n?t(n):e(r)}!function n(){window.originalPostMessage?function(n,r,e){var t=s();c[t]=e;var o={method:n,uuid:t};r&&(o.payload=r),window.postMessage(JSON.stringify(o))}(o,i,r):3e3<a?t(new Error("Timeout")):(a+=10,setTimeout(n,10))}()})}function t(r){if("string"==typeof r)try{r=JSON.parse(r)}catch(n){return console.error("Invalid data:",r)}if(r.uuid){var n=c[r.uuid];n?(n(r.error,r.payload),delete c[r.uuid]):console.warn("Unregistered callback:",r.uuid)}else console.error("Invalid data:",r)}var i={send:e,receive:t,init:function(n){return window.document.addEventListener("message",function(n){t(n.data)}),n.$version="1.0",n.$url=location.href,e("app.init",n)}},f={},l=null,d=!1;f.init=function(n){return d?new Promise(function(n,r){n(f)}):i.init({appId:n}).then(function(n){return d=!0,l=n,f})},f.app=function(){if(!d)throw new Error('Please call after "coinview.init"');return new Promise(function(r,n){!function n(){l?r(l):setTimeout(n,10)}()})};var p=["user.profile","user.assets","user.address","payment.create","navigate.back","navigate.close","navigate.toggleNavBar","ui.notice","ui.confirm","utils.setClipboard","utils.share","utils.scanQr","utils._choosePhoto","utils._openUrl"];return p.forEach(function(r){var n=r.split("."),e=n[0],t=n[1];f[e]||(f[e]={}),f[e][t]=function(n){if(!d)throw new Error('Please call after "coinview.init"');return i.send(r,n)}}),f._methods=p,f}(); |
{ | ||
"name": "@coinjinja/coinview-sdk", | ||
"version": "1.0.2-dev", | ||
"version": "1.0.3-dev", | ||
"author": "coinjinja", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -13,5 +13,5 @@ export default [ | ||
'utils.share', | ||
'utils.scanQR', | ||
'utils.scanQr', | ||
'utils._choosePhoto', | ||
'utils._openUrl', | ||
] |
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