uport-lite
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -157,3 +157,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
if (ByteArray.name === 'Uint8array') { | ||
// This handles an issue in safari | ||
return new Uint8Array(bytes.reverse()) | ||
} | ||
return ByteArray.from(bytes.reverse()) | ||
@@ -160,0 +163,0 @@ } |
(function(d,a){"object"===typeof exports&&"object"===typeof module?module.exports=a():"function"===typeof define&&define.amd?define("UportLite",[],a):"object"===typeof exports?exports.UportLite=a():d.UportLite=a()})(this,function(){return function(d){function a(c){if(e[c])return e[c].exports;var b=e[c]={i:c,l:!1,exports:{}};d[c].call(b.exports,b,b.exports,a);b.l=!0;return b.exports}var e={};a.m=d;a.c=e;a.i=function(a){return a};a.d=function(c,b,d){a.o(c,b)||Object.defineProperty(c,b,{configurable:!1, | ||
enumerable:!0,get:d})};a.n=function(c){var b=c&&c.__esModule?function(){return c["default"]}:function(){return c};a.d(b,"a",b);return b};a.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};a.p="";return a(a.s=3)}([function(d,a,e){(function(a){var b=a&&a.Buffer?a.Buffer:Uint8Array;d.exports=function(a){function c(a){if(0===a.length)return new b(0);for(var h=[0],g=0;g<a.length;g++){var f=l[a[g]];if(void 0===f)return;for(var c=0;c<h.length;++c)f+=h[c]*d,h[c]=f&255,f>>=8;for(;0<f;)h.push(f& | ||
255),f>>=8}for(g=0;a[g]===p&&g<a.length-1;++g)h.push(0);return b.from(h.reverse())}for(var l={},d=a.length,p=a.charAt(0),k=0;k<a.length;k++){var e=a.charAt(k);if(void 0!==l[e])throw new TypeError(e+" is ambiguous");l[e]=k}return{encode:function(c){if(0===c.length)return"";for(var h=[0],g=0;g<c.length;++g){for(var f=0,b=c[g];f<h.length;++f)b+=h[f]<<8,h[f]=b%d,b=b/d|0;for(;0<b;)h.push(b%d),b=b/d|0}g="";for(f=0;0===c[f]&&f<c.length-1;++f)g+=a[0];for(c=h.length-1;0<=c;--c)g+=a[h[c]];return g},decodeUnsafe:c, | ||
decode:function(a){if(a=c(a))return a;throw Error("Non-base"+d+" character");}}}}).call(a,e(2))},function(d,a){},function(d,a){a=function(){return this}();try{a=a||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(a=window)}d.exports=a},function(d,a,e){function c(a,c){var b=new n,d=a||{};b.onreadystatechange=function(){if(4===b.readyState&&1!==b.timeout)if(200!==b.status)c(Error("[uport-lite] status "+b.status+": "+b.responseText));else try{c(null,JSON.parse(b.responseText))}catch(q){c(Error("[uport-lite] while parsing data: '"+ | ||
String(b.responseText)+"', error: "+String(q)))}};d.data?b.open("POST",a.uri):b.open("GET",a.uri);d.accept&&b.setRequestHeader("accept",d.accept);d.data?(b.setRequestHeader("Content-Type","application/json"),b.send(JSON.stringify(d.data))):b.send()}var b=e(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),m=e(0)("0123456789abcdef"),n="undefined"!==typeof window?window.XMLHttpRequest:e(1).XMLHttpRequest;d.exports=function(a){function d(a,d){return a?c({uri:l,accept:"application/json", | ||
data:{method:"eth_call",params:[{to:e,data:"0x446d5aa4000000000000000000000000"+a.slice(2)},"latest"],id:1,jsonrpc:"2.0"}},function(a,c){if(a)return d(a);a=c.result.slice(130).slice(0,68);return d(null,b.encode(m.decode(a)))}):d(null)}a=void 0===a?{}:a;var e=a.registryAddress||"0xb9C1598e24650437a3055F7f66AC1820c419a679",k=a.ipfsGw||"https://ipfs.infura.io/ipfs/",l=a.rpcUrl||"https://ropsten.infura.io/uport-lite-library";return function(a,b){return d(a,function(a,d){if(a)return b(a);d&&"0x"!==d?c({uri:""+ | ||
k+d},b):b()})}}}])}); | ||
255),f>>=8}for(g=0;a[g]===p&&g<a.length-1;++g)h.push(0);return"Uint8array"===b.name?new Uint8Array(h.reverse()):b.from(h.reverse())}for(var l={},d=a.length,p=a.charAt(0),k=0;k<a.length;k++){var e=a.charAt(k);if(void 0!==l[e])throw new TypeError(e+" is ambiguous");l[e]=k}return{encode:function(c){if(0===c.length)return"";for(var h=[0],g=0;g<c.length;++g){for(var f=0,b=c[g];f<h.length;++f)b+=h[f]<<8,h[f]=b%d,b=b/d|0;for(;0<b;)h.push(b%d),b=b/d|0}g="";for(f=0;0===c[f]&&f<c.length-1;++f)g+=a[0];for(c= | ||
h.length-1;0<=c;--c)g+=a[h[c]];return g},decodeUnsafe:c,decode:function(a){if(a=c(a))return a;throw Error("Non-base"+d+" character");}}}}).call(a,e(2))},function(d,a){},function(d,a){a=function(){return this}();try{a=a||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(a=window)}d.exports=a},function(d,a,e){function c(a,c){var b=new n,d=a||{};b.onreadystatechange=function(){if(4===b.readyState&&1!==b.timeout)if(200!==b.status)c(Error("[uport-lite] status "+b.status+": "+ | ||
b.responseText));else try{c(null,JSON.parse(b.responseText))}catch(q){c(Error("[uport-lite] while parsing data: '"+String(b.responseText)+"', error: "+String(q)))}};d.data?b.open("POST",a.uri):b.open("GET",a.uri);d.accept&&b.setRequestHeader("accept",d.accept);d.data?(b.setRequestHeader("Content-Type","application/json"),b.send(JSON.stringify(d.data))):b.send()}var b=e(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),m=e(0)("0123456789abcdef"),n="undefined"!==typeof window?window.XMLHttpRequest: | ||
e(1).XMLHttpRequest;d.exports=function(a){function d(a,d){return a?c({uri:l,accept:"application/json",data:{method:"eth_call",params:[{to:e,data:"0x446d5aa4000000000000000000000000"+a.slice(2)},"latest"],id:1,jsonrpc:"2.0"}},function(a,c){if(a)return d(a);a=c.result.slice(130).slice(0,68);return d(null,b.encode(m.decode(a)))}):d(null)}a=void 0===a?{}:a;var e=a.registryAddress||"0xb9C1598e24650437a3055F7f66AC1820c419a679",k=a.ipfsGw||"https://ipfs.infura.io/ipfs/",l=a.rpcUrl||"https://ropsten.infura.io/uport-lite-library"; | ||
return function(a,b){return d(a,function(a,d){if(a)return b(a);d&&"0x"!==d?c({uri:""+k+d},b):b()})}}}])}); |
{ | ||
"name": "uport-lite", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Lightweight library for looking up public profiles on uport-registry", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"base-x-bytearray": "^0.1.0", | ||
"base-x-bytearray": "^0.1.2", | ||
"xmlhttprequest": "^1.8.0" | ||
@@ -28,0 +28,0 @@ }, |
21988
458
Updatedbase-x-bytearray@^0.1.2