uport-lite
Advanced tools
Comparing version 1.0.0-alpha-6 to 1.0.0
@@ -1,12 +0,61 @@ | ||
var $jscomp={scope:{},owns:function(a,b){return Object.prototype.hasOwnProperty.call(a,b)}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this); | ||
$jscomp.polyfill=function(a,b,c,e){if(b){c=$jscomp.global;a=a.split(".");for(e=0;e<a.length-1;e++){var d=a[e];d in c||(c[d]={});c=c[d]}a=a[a.length-1];e=c[a];b=b(e);b!=e&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Object.assign",function(a){return a?a:function(b,a){for(var e=1;e<arguments.length;e++){var d=arguments[e];if(d)for(var c in d)$jscomp.owns(d,c)&&(b[c]=d[c])}return b}},"es6-impl","es3"); | ||
(function(a,b){"object"===typeof exports&&"object"===typeof module?module.exports=b():"function"===typeof define&&define.amd?define("UportLite",[],b):"object"===typeof exports?exports.UportLite=b():a.UportLite=b()})(this,function(){return function(a){function b(e){if(c[e])return c[e].exports;var d=c[e]={i:e,l:!1,exports:{}};a[e].call(d.exports,d,d.exports,b);d.l=!0;return d.exports}var c={};b.m=a;b.c=c;b.i=function(b){return b};b.d=function(a,d,c){b.o(a,d)||Object.defineProperty(a,d,{configurable:!1, | ||
enumerable:!0,get:c})};b.n=function(a){var d=a&&a.__esModule?function(){return a["default"]}:function(){return a};b.d(d,"a",d);return d};b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};b.p="";return b(b.s=3)}([function(a,b,c){(function(b){var c=b&&b.Buffer?b.Buffer:Uint8Array;a.exports=function(b){function a(b){if(0===b.length)return new c(0);for(var a=[0],f=0;f<b.length;f++){var h=d[b[f]];if(void 0===h)return;for(var g=0;g<a.length;++g)h+=a[g]*e,a[g]=h&255,h>>=8;for(;0<h;)a.push(h& | ||
255),h>>=8}for(f=0;b[f]===v&&f<b.length-1;++f)a.push(0);return"Uint8array"===c.name?new Uint8Array(a.reverse()):c.from(a.reverse())}for(var d={},e=b.length,v=b.charAt(0),g=0;g<b.length;g++){var f=b.charAt(g);if(void 0!==d[f])throw new TypeError(f+" is ambiguous");d[f]=g}return{encode:function(a){if(0===a.length)return"";for(var c=[0],f=0;f<a.length;++f){for(var d=0,g=a[f];d<c.length;++d)g+=c[d]<<8,c[d]=g%e,g=g/e|0;for(;0<g;)c.push(g%e),g=g/e|0}f="";for(d=0;0===a[d]&&d<a.length-1;++d)f+=b[0];for(a= | ||
c.length-1;0<=a;--a)f+=b[c[a]];return f},decodeUnsafe:a,decode:function(b){if(b=a(b))return b;throw Error("Non-base"+e+" character");}}}}).call(b,c(2))},function(a,b){},function(a,b){b=function(){return this}();try{b=b||Function("return this")()||(0,eval)("this")}catch(c){"object"===typeof window&&(b=window)}a.exports=b},function(a,b,c){function e(a,b){var c=new p,d=a||{};c.onreadystatechange=function(){if(4===c.readyState&&1!==c.timeout)if(200!==c.status)b(Error("[uport-lite] status "+c.status+": "+ | ||
c.responseText));else try{b(null,JSON.parse(c.responseText))}catch(n){b(Error("[uport-lite] while parsing data: '"+String(c.responseText)+"', error: "+String(n)))}};d.data?c.open("POST",a.uri):c.open("GET",a.uri);d.accept&&c.setRequestHeader("accept",d.accept);d.data?(c.setRequestHeader("Content-Type","application/json"),c.send(JSON.stringify(d.data))):c.send()}function d(a){var b=m.decode(a),c=b.length-24;a=b.slice(1,c);b=b.slice(c,20+c);return{network:"0x"+k.encode(a),address:"0x"+k.encode(b)}} | ||
var m=c(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),k=c(0)("0123456789abcdef"),p="undefined"!==typeof window?window.XMLHttpRequest:c(1).XMLHttpRequest,u={"0x1":{registry:"0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6",rpcUrl:"https://mainnet.infura.io"},"0x3":{registry:"0x41566e3a081f5032bdcad470adb797635ddfe1f0",rpcUrl:"https://ropsten.infura.io"},"0x2a":{registry:"0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758",rpcUrl:"https://kovan.infura.io"}};a.exports=function(){function b(a,b){return a.split("").map(function(a){return("0"+ | ||
a.charCodeAt(0).toString(16)).slice(-2)}).join(b||"")}function a(a,b,c){return"undefined"===typeof b?a:c?(a+b).slice(-a.length):(b+a).substring(0,a.length)}function c(c,d,e,f){c+=a("0000000000000000000000000000000000000000000000000000000000000000",b(d));c+=a("0000000000000000000000000000000000000000000000000000000000000000",e.slice(2),!0);return c+=a("0000000000000000000000000000000000000000000000000000000000000000",f.slice(2),!0)}function h(a,b){var c="https://ropsten.infura.io/"+t;return a?e({uri:c, | ||
accept:"application/json",data:{method:"eth_call",params:[{to:"0xb9C1598e24650437a3055F7f66AC1820c419a679",data:"0x446d5aa4000000000000000000000000"+a.slice(2)},"latest"],id:1,jsonrpc:"2.0"}},function(a,c){if(a)return b(a);if(c.error)return b(c.error);a=c.result.slice(130).slice(0,68);return b(null,m.encode(k.decode(a)))}):b(null)}function n(a,b,f,g){b=d(b);var h=d(f);if(b.network!==h.network)throw Error("Issuer and subject must be on the same network");if(!q[b.network])throw Error("Network id "+ | ||
b.network+" is not configured");f=q[b.network].rpcUrl;var w=q[b.network].registry;a=c("0x447885f0",a,b.address,h.address);return e({uri:f+"/"+t,accept:"application/json",data:{method:"eth_call",params:[{to:w,data:a},"latest"],id:1,jsonrpc:"2.0"}},function(a,b){return a?g(a):b.error?g(b.error):0==b.result?g(a):g(null,m.encode(k.decode("1220"+b.result.slice(2))))})}function r(a,b){return a&&"0x"!==a?e({uri:""+p+a},b):b()}var l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=l.infuraKey|| | ||
"uport-lite-library",p=l.ipfsGw||"https://ipfs.infura.io/ipfs/",q=l.networks?Object.assign({},u,l.networks):u;return function(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"uPortProfileIPFS1220";if(!a)return b(null);var e=c||a;return a.match(/0x[0-9a-fA-F]{40}/)?h(a,function(a,c){if(a)return b(a);r(c,b)}):n(d,a,e,function(a,c){if(a)return b(a);r(c,b)})}}}])}); | ||
/* | ||
The buffer module from node.js, for the browser. | ||
@author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> | ||
@license MIT | ||
*/ | ||
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(k,f,l){if(l.get||l.set)throw new TypeError("ES3 does not support getters and setters.");k!=Array.prototype&&k!=Object.prototype&&(k[f]=l.value)};$jscomp.getGlobal=function(k){return"undefined"!=typeof window&&window===k?k:"undefined"!=typeof global&&null!=global?global:k};$jscomp.global=$jscomp.getGlobal(this); | ||
$jscomp.polyfill=function(k,f,l,e){if(f){l=$jscomp.global;k=k.split(".");for(e=0;e<k.length-1;e++){var h=k[e];h in l||(l[h]={});l=l[h]}k=k[k.length-1];e=l[k];f=f(e);f!=e&&null!=f&&$jscomp.defineProperty(l,k,{configurable:!0,writable:!0,value:f})}};$jscomp.polyfill("Array.prototype.fill",function(k){return k?k:function(f,l,e){var h=this.length||0;0>l&&(l=Math.max(0,h+l));if(null==e||e>h)e=h;e=Number(e);0>e&&(e=Math.max(0,h+e));for(l=Number(l||0);l<e;l++)this[l]=f;return this}},"es6-impl","es3"); | ||
$jscomp.owns=function(k,f){return Object.prototype.hasOwnProperty.call(k,f)};$jscomp.polyfill("Object.assign",function(k){return k?k:function(f,l){for(var e=1;e<arguments.length;e++){var h=arguments[e];if(h)for(var p in h)$jscomp.owns(h,p)&&(f[p]=h[p])}return f}},"es6-impl","es3"); | ||
(function(k,f){"object"===typeof exports&&"object"===typeof module?module.exports=f():"function"===typeof define&&define.amd?define("UportLite",[],f):"object"===typeof exports?exports.UportLite=f():k.UportLite=f()})(this,function(){return function(k){function f(e){if(l[e])return l[e].exports;var h=l[e]={i:e,l:!1,exports:{}};k[e].call(h.exports,h,h.exports,f);h.l=!0;return h.exports}var l={};f.m=k;f.c=l;f.i=function(e){return e};f.d=function(e,h,p){f.o(e,h)||Object.defineProperty(e,h,{configurable:!1, | ||
enumerable:!0,get:p})};f.n=function(e){var h=e&&e.__esModule?function(){return e["default"]}:function(){return e};f.d(h,"a",h);return h};f.o=function(e,h){return Object.prototype.hasOwnProperty.call(e,h)};f.p="";return f(f.s=7)}([function(k,f,l){(function(e){k.exports=function(h){function f(m){if(0===m.length)return e.allocUnsafe(0);for(var f=[0],h=0;h<m.length;h++){var n=c[m[h]];if(void 0===n)return;for(var k=0;k<f.length;++k)n+=f[k]*l,f[k]=n&255,n>>=8;for(;0<n;)f.push(n&255),n>>=8}for(h=0;m[h]=== | ||
v&&h<m.length-1;++h)f.push(0);return e.from(f.reverse())}for(var c={},l=h.length,v=h.charAt(0),n=0;n<h.length;n++){var k=h.charAt(n);if(void 0!==c[k])throw new TypeError(k+" is ambiguous");c[k]=n}return{encode:function(c){if(0===c.length)return"";for(var e=[0],f=0;f<c.length;++f){for(var n=0,m=c[f];n<e.length;++n)m+=e[n]<<8,e[n]=m%l,m=m/l|0;for(;0<m;)e.push(m%l),m=m/l|0}f="";for(n=0;0===c[n]&&n<c.length-1;++n)f+=h[0];for(c=e.length-1;0<=c;--c)f+=h[e[c]];return f},decodeUnsafe:f,decode:function(c){if(c= | ||
f(c))return c;throw Error("Non-base"+l+" character");}}}}).call(f,l(3).Buffer)},function(k,f){},function(k,f,l){function e(c){var e=c.length;if(0<e%4)throw Error("Invalid string. Length must be a multiple of 4");return"\x3d"===c[e-2]?2:"\x3d"===c[e-1]?1:0}function h(c,e,f){for(var m=[],h=e;h<f;h+=3)e=(c[h]<<16)+(c[h+1]<<8)+c[h+2],m.push(p[e>>18&63]+p[e>>12&63]+p[e>>6&63]+p[e&63]);return m.join("")}f.byteLength=function(c){return 3*c.length/4-e(c)};f.toByteArray=function(f){var h,k,m,l,p;h=f.length; | ||
l=e(f);p=new q(3*h/4-l);k=0<l?h-4:h;var v=0;for(h=0;h<k;h+=4)m=c[f.charCodeAt(h)]<<18|c[f.charCodeAt(h+1)]<<12|c[f.charCodeAt(h+2)]<<6|c[f.charCodeAt(h+3)],p[v++]=m>>16&255,p[v++]=m>>8&255,p[v++]=m&255;2===l?(m=c[f.charCodeAt(h)]<<2|c[f.charCodeAt(h+1)]>>4,p[v++]=m&255):1===l&&(m=c[f.charCodeAt(h)]<<10|c[f.charCodeAt(h+1)]<<4|c[f.charCodeAt(h+2)]>>2,p[v++]=m>>8&255,p[v++]=m&255);return p};f.fromByteArray=function(c){for(var e=c.length,f=e%3,m="",l=[],k=0,q=e-f;k<q;k+=16383)l.push(h(c,k,k+16383>q? | ||
q:k+16383));1===f?(c=c[e-1],m+=p[c>>2],m+=p[c<<4&63],m+="\x3d\x3d"):2===f&&(c=(c[e-2]<<8)+c[e-1],m+=p[c>>10],m+=p[c>>4&63],m+=p[c<<2&63],m+="\x3d");l.push(m);return l.join("")};var p=[],c=[],q="undefined"!==typeof Uint8Array?Uint8Array:Array;for(k=0;64>k;++k)p[k]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[k],c["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(k)]=k;c[45]=62;c[95]=63},function(k,f,l){(function(e){function h(){try{var a=new Uint8Array(1); | ||
a.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===a.foo()&&"function"===typeof a.subarray&&0===a.subarray(1,1).byteLength}catch(b){return!1}}function k(a,b){if((c.TYPED_ARRAY_SUPPORT?2147483647:1073741823)<b)throw new RangeError("Invalid typed array length");c.TYPED_ARRAY_SUPPORT?(a=new Uint8Array(b),a.__proto__=c.prototype):(null===a&&(a=new c(b)),a.length=b);return a}function c(a,b,d){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(a,b,d);if("number"=== | ||
typeof a){if("string"===typeof b)throw Error("If encoding is specified then the first argument must be a string");return n(this,a)}return q(this,a,b,d)}function q(a,b,d,g){if("number"===typeof b)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&b instanceof ArrayBuffer){b.byteLength;if(0>d||b.byteLength<d)throw new RangeError("'offset' is out of bounds");if(b.byteLength<d+(g||0))throw new RangeError("'length' is out of bounds");b=void 0===d&&void 0=== | ||
g?new Uint8Array(b):void 0===g?new Uint8Array(b,d):new Uint8Array(b,d,g);c.TYPED_ARRAY_SUPPORT?(a=b,a.__proto__=c.prototype):a=t(a,b);return a}if("string"===typeof b){g=a;a=d;if("string"!==typeof a||""===a)a="utf8";if(!c.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding');d=x(b,a)|0;g=k(g,d);b=g.write(b,a);b!==d&&(g=g.slice(0,b));return g}return m(a,b)}function v(a){if("number"!==typeof a)throw new TypeError('"size" argument must be a number');if(0>a)throw new RangeError('"size" argument must not be negative'); | ||
}function n(a,b){v(b);a=k(a,0>b?0:z(b)|0);if(!c.TYPED_ARRAY_SUPPORT)for(var d=0;d<b;++d)a[d]=0;return a}function t(a,b){var d=0>b.length?0:z(b.length)|0;a=k(a,d);for(var g=0;g<d;g+=1)a[g]=b[g]&255;return a}function m(a,b){if(c.isBuffer(b)){var d=z(b.length)|0;a=k(a,d);if(0===a.length)return a;b.copy(a,0,0,d);return a}if(b){if("undefined"!==typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer||"length"in b)return(d="number"!==typeof b.length)||(d=b.length,d=d!==d),d?k(a,0):t(a,b);if("Buffer"===b.type&& | ||
K(b.data))return t(a,b.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}function z(a){if(a>=(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(c.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return a|0}function x(a,b){if(c.isBuffer(a))return a.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(a)|| | ||
a instanceof ArrayBuffer))return a.byteLength;"string"!==typeof a&&(a=""+a);var d=a.length;if(0===d)return 0;for(var g=!1;;)switch(b){case "ascii":case "latin1":case "binary":return d;case "utf8":case "utf-8":case void 0:return F(a).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*d;case "hex":return d>>>1;case "base64":return G.toByteArray(L(a)).length;default:if(g)return F(a).length;b=(""+b).toLowerCase();g=!0}}function A(a,b,d){var g=!1;if(void 0===b||0>b)b=0;if(b>this.length)return""; | ||
if(void 0===d||d>this.length)d=this.length;if(0>=d)return"";d>>>=0;b>>>=0;if(d<=b)return"";for(a||(a="utf8");;)switch(a){case "hex":a=b;b=d;d=this.length;if(!a||0>a)a=0;if(!b||0>b||b>d)b=d;g="";for(d=a;d<b;++d)a=g,g=this[d],g=16>g?"0"+g.toString(16):g.toString(16),g=a+g;return g;case "utf8":case "utf-8":return B(this,b,d);case "ascii":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]&127);return a;case "latin1":case "binary":a="";for(d=Math.min(this.length,d);b<d;++b)a+=String.fromCharCode(this[b]); | ||
return a;case "base64":return b=0===b&&d===this.length?G.fromByteArray(this):G.fromByteArray(this.slice(b,d)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,d);d="";for(a=0;a<b.length;a+=2)d+=String.fromCharCode(b[a]+256*b[a+1]);return d;default:if(g)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase();g=!0}}function w(a,b,d){var g=a[b];a[b]=a[d];a[d]=g}function D(a,b,d,g,y){if(0===a.length)return-1;"string"===typeof d?(g=d,d=0):2147483647<d?d=2147483647:-2147483648> | ||
d&&(d=-2147483648);d=+d;isNaN(d)&&(d=y?0:a.length-1);0>d&&(d=a.length+d);if(d>=a.length){if(y)return-1;d=a.length-1}else if(0>d)if(y)d=0;else return-1;"string"===typeof b&&(b=c.from(b,g));if(c.isBuffer(b))return 0===b.length?-1:H(a,b,d,g,y);if("number"===typeof b)return b&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?y?Uint8Array.prototype.indexOf.call(a,b,d):Uint8Array.prototype.lastIndexOf.call(a,b,d):H(a,[b],d,g,y);throw new TypeError("val must be string, number or Buffer"); | ||
}function H(a,b,d,g,c){function y(a,b){return 1===e?a[b]:a.readUInt16BE(b*e)}var e=1,f=a.length,h=b.length;if(void 0!==g&&(g=String(g).toLowerCase(),"ucs2"===g||"ucs-2"===g||"utf16le"===g||"utf-16le"===g)){if(2>a.length||2>b.length)return-1;e=2;f/=2;h/=2;d/=2}if(c)for(g=-1;d<f;d++)if(y(a,d)===y(b,-1===g?0:d-g)){if(-1===g&&(g=d),d-g+1===h)return g*e}else-1!==g&&(d-=d-g),g=-1;else for(d+h>f&&(d=f-h);0<=d;d--){f=!0;for(g=0;g<h;g++)if(y(a,d+g)!==y(b,g)){f=!1;break}if(f)return d}return-1}function B(a, | ||
b,d){d=Math.min(a.length,d);for(var g=[];b<d;){var c=a[b],e=null,f=239<c?4:223<c?3:191<c?2:1;if(b+f<=d){var h,k,m;switch(f){case 1:128>c&&(e=c);break;case 2:h=a[b+1];128===(h&192)&&(c=(c&31)<<6|h&63,127<c&&(e=c));break;case 3:h=a[b+1];k=a[b+2];128===(h&192)&&128===(k&192)&&(c=(c&15)<<12|(h&63)<<6|k&63,2047<c&&(55296>c||57343<c)&&(e=c));break;case 4:h=a[b+1],k=a[b+2],m=a[b+3],128===(h&192)&&128===(k&192)&&128===(m&192)&&(c=(c&15)<<18|(h&63)<<12|(k&63)<<6|m&63,65535<c&&1114112>c&&(e=c))}}null===e?(e= | ||
65533,f=1):65535<e&&(e-=65536,g.push(e>>>10&1023|55296),e=56320|e&1023);g.push(e);b+=f}a=g.length;if(a<=M)g=String.fromCharCode.apply(String,g);else{d="";for(b=0;b<a;)d+=String.fromCharCode.apply(String,g.slice(b,b+=M));g=d}return g}function r(a,b,d){if(0!==a%1||0>a)throw new RangeError("offset is not uint");if(a+b>d)throw new RangeError("Trying to access beyond buffer length");}function u(a,b,d,g,e,f){if(!c.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>e||b< | ||
f)throw new RangeError('"value" argument is out of bounds');if(d+g>a.length)throw new RangeError("Index out of range");}function I(a,b,d,g){0>b&&(b=65535+b+1);for(var c=0,e=Math.min(a.length-d,2);c<e;++c)a[d+c]=(b&255<<8*(g?c:1-c))>>>8*(g?c:1-c)}function J(a,b,d,g){0>b&&(b=4294967295+b+1);for(var c=0,e=Math.min(a.length-d,4);c<e;++c)a[d+c]=b>>>8*(g?c:3-c)&255}function N(a,b,d,c,e,f){if(d+c>a.length)throw new RangeError("Index out of range");if(0>d)throw new RangeError("Index out of range");}function O(a, | ||
b,d,c,e){e||N(a,b,d,4,3.4028234663852886e+38,-3.4028234663852886e+38);C.write(a,b,d,c,23,4);return d+4}function P(a,b,d,c,e){e||N(a,b,d,8,1.7976931348623157e+308,-1.7976931348623157e+308);C.write(a,b,d,c,52,8);return d+8}function L(a){a=a.trim?a.trim():a.replace(/^\s+|\s+$/g,"");a=a.replace(R,"");if(2>a.length)return"";for(;0!==a.length%4;)a+="\x3d";return a}function F(a,b){b=b||Infinity;for(var d,c=a.length,e=null,f=[],h=0;h<c;++h){d=a.charCodeAt(h);if(55295<d&&57344>d){if(!e){if(56319<d){-1<(b-= | ||
3)&&f.push(239,191,189);continue}else if(h+1===c){-1<(b-=3)&&f.push(239,191,189);continue}e=d;continue}if(56320>d){-1<(b-=3)&&f.push(239,191,189);e=d;continue}d=(e-55296<<10|d-56320)+65536}else e&&-1<(b-=3)&&f.push(239,191,189);e=null;if(128>d){if(0>--b)break;f.push(d)}else if(2048>d){if(0>(b-=2))break;f.push(d>>6|192,d&63|128)}else if(65536>d){if(0>(b-=3))break;f.push(d>>12|224,d>>6&63|128,d&63|128)}else if(1114112>d){if(0>(b-=4))break;f.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw Error("Invalid code point"); | ||
}return f}function Q(a){for(var b=[],d=0;d<a.length;++d)b.push(a.charCodeAt(d)&255);return b}function E(a,b,d,c){for(var g=0;g<c&&!(g+d>=b.length||g>=a.length);++g)b[g+d]=a[g];return g}var G=l(2),C=l(4),K=l(5);f.Buffer=c;f.SlowBuffer=function(a){+a!=a&&(a=0);return c.alloc(+a)};f.INSPECT_MAX_BYTES=50;c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:h();f.kMaxLength=c.TYPED_ARRAY_SUPPORT?2147483647:1073741823;c.poolSize=8192;c._augment=function(a){a.__proto__=c.prototype; | ||
return a};c.from=function(a,b,d){return q(null,a,b,d)};c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0}));c.alloc=function(a,b,d){v(a);a=0>=a?k(null,a):void 0!==b?"string"===typeof d?k(null,a).fill(b,d):k(null,a).fill(b):k(null,a);return a};c.allocUnsafe=function(a){return n(null,a)};c.allocUnsafeSlow=function(a){return n(null, | ||
a)};c.isBuffer=function(a){return!(null==a||!a._isBuffer)};c.compare=function(a,b){if(!c.isBuffer(a)||!c.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var d=a.length,g=b.length,e=0,f=Math.min(d,g);e<f;++e)if(a[e]!==b[e]){d=a[e];g=b[e];break}return d<g?-1:g<d?1:0};c.isEncoding=function(a){switch(String(a).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "latin1":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0; | ||
default:return!1}};c.concat=function(a,b){if(!K(a))throw new TypeError('"list" argument must be an Array of Buffers');if(0===a.length)return c.alloc(0);var d;if(void 0===b)for(d=b=0;d<a.length;++d)b+=a[d].length;b=c.allocUnsafe(b);var g=0;for(d=0;d<a.length;++d){var e=a[d];if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(b,g);g+=e.length}return b};c.byteLength=x;c.prototype._isBuffer=!0;c.prototype.swap16=function(){var a=this.length;if(0!==a%2)throw new RangeError("Buffer size must be a multiple of 16-bits"); | ||
for(var b=0;b<a;b+=2)w(this,b,b+1);return this};c.prototype.swap32=function(){var a=this.length;if(0!==a%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var b=0;b<a;b+=4)w(this,b,b+3),w(this,b+1,b+2);return this};c.prototype.swap64=function(){var a=this.length;if(0!==a%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var b=0;b<a;b+=8)w(this,b,b+7),w(this,b+1,b+6),w(this,b+2,b+5),w(this,b+3,b+4);return this};c.prototype.toString=function(){var a=this.length| | ||
0;return 0===a?"":0===arguments.length?B(this,0,a):A.apply(this,arguments)};c.prototype.equals=function(a){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:0===c.compare(this,a)};c.prototype.inspect=function(){var a="",b=f.INSPECT_MAX_BYTES;0<this.length&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... "));return"\x3cBuffer "+a+"\x3e"};c.prototype.compare=function(a,b,d,g,e){if(!c.isBuffer(a))throw new TypeError("Argument must be a Buffer"); | ||
void 0===b&&(b=0);void 0===d&&(d=a?a.length:0);void 0===g&&(g=0);void 0===e&&(e=this.length);if(0>b||d>a.length||0>g||e>this.length)throw new RangeError("out of range index");if(g>=e&&b>=d)return 0;if(g>=e)return-1;if(b>=d)return 1;b>>>=0;d>>>=0;g>>>=0;e>>>=0;if(this===a)return 0;var f=e-g,h=d-b,k=Math.min(f,h);g=this.slice(g,e);a=a.slice(b,d);for(b=0;b<k;++b)if(g[b]!==a[b]){f=g[b];h=a[b];break}return f<h?-1:h<f?1:0};c.prototype.includes=function(a,b,d){return-1!==this.indexOf(a,b,d)};c.prototype.indexOf= | ||
function(a,b,d){return D(this,a,b,d,!0)};c.prototype.lastIndexOf=function(a,b,d){return D(this,a,b,d,!1)};c.prototype.write=function(a,b,d,c){if(void 0===b)c="utf8",d=this.length,b=0;else if(void 0===d&&"string"===typeof b)c=b,d=this.length,b=0;else if(isFinite(b))b|=0,isFinite(d)?(d|=0,void 0===c&&(c="utf8")):(c=d,d=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var g=this.length-b;if(void 0===d||d>g)d=g;if(0<a.length&&(0>d||0>b)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds"); | ||
c||(c="utf8");for(g=!1;;)switch(c){case "hex":a:{b=Number(b)||0;c=this.length-b;d?(d=Number(d),d>c&&(d=c)):d=c;c=a.length;if(0!==c%2)throw new TypeError("Invalid hex string");d>c/2&&(d=c/2);for(c=0;c<d;++c){g=parseInt(a.substr(2*c,2),16);if(isNaN(g)){a=c;break a}this[b+c]=g}a=c}return a;case "utf8":case "utf-8":return E(F(a,this.length-b),this,b,d);case "ascii":return E(Q(a),this,b,d);case "latin1":case "binary":return E(Q(a),this,b,d);case "base64":return E(G.toByteArray(L(a)),this,b,d);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":var e; | ||
c=a;for(var g=this.length-b,f=[],h=0;h<c.length&&!(0>(g-=2));++h)e=c.charCodeAt(h),a=e>>8,e%=256,f.push(e),f.push(a);return E(f,this,b,d);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase();g=!0}};c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;c.prototype.slice=function(a,b){var d=this.length;a=~~a;b=void 0===b?d:~~b;0>a?(a+=d,0>a&&(a=0)):a>d&&(a=d);0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d);b<a&&(b=a);if(c.TYPED_ARRAY_SUPPORT)b= | ||
this.subarray(a,b),b.__proto__=c.prototype;else{d=b-a;b=new c(d,void 0);for(var g=0;g<d;++g)b[g]=this[g+a]}return b};c.prototype.readUIntLE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a];for(var c=1,e=0;++e<b&&(c*=256);)d+=this[a+e]*c;return d};c.prototype.readUIntBE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a+--b];for(var c=1;0<b&&(c*=256);)d+=this[a+--b]*c;return d};c.prototype.readUInt8=function(a,b){b||r(a,1,this.length);return this[a]};c.prototype.readUInt16LE=function(a, | ||
b){b||r(a,2,this.length);return this[a]|this[a+1]<<8};c.prototype.readUInt16BE=function(a,b){b||r(a,2,this.length);return this[a]<<8|this[a+1]};c.prototype.readUInt32LE=function(a,b){b||r(a,4,this.length);return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]};c.prototype.readUInt32BE=function(a,b){b||r(a,4,this.length);return 16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])};c.prototype.readIntLE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=this[a];for(var c=1,e=0;++e<b&&(c*=256);)d+= | ||
this[a+e]*c;d>=128*c&&(d-=Math.pow(2,8*b));return d};c.prototype.readIntBE=function(a,b,d){a|=0;b|=0;d||r(a,b,this.length);d=b;for(var c=1,e=this[a+--d];0<d&&(c*=256);)e+=this[a+--d]*c;e>=128*c&&(e-=Math.pow(2,8*b));return e};c.prototype.readInt8=function(a,b){b||r(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]};c.prototype.readInt16LE=function(a,b){b||r(a,2,this.length);a=this[a]|this[a+1]<<8;return a&32768?a|4294901760:a};c.prototype.readInt16BE=function(a,b){b||r(a,2,this.length); | ||
a=this[a+1]|this[a]<<8;return a&32768?a|4294901760:a};c.prototype.readInt32LE=function(a,b){b||r(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};c.prototype.readInt32BE=function(a,b){b||r(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};c.prototype.readFloatLE=function(a,b){b||r(a,4,this.length);return C.read(this,a,!0,23,4)};c.prototype.readFloatBE=function(a,b){b||r(a,4,this.length);return C.read(this,a,!1,23,4)};c.prototype.readDoubleLE=function(a, | ||
b){b||r(a,8,this.length);return C.read(this,a,!0,52,8)};c.prototype.readDoubleBE=function(a,b){b||r(a,8,this.length);return C.read(this,a,!1,52,8)};c.prototype.writeUIntLE=function(a,b,d,c){a=+a;b|=0;d|=0;c||u(this,a,b,d,Math.pow(2,8*d)-1,0);c=1;var g=0;for(this[b]=a&255;++g<d&&(c*=256);)this[b+g]=a/c&255;return b+d};c.prototype.writeUIntBE=function(a,b,d,c){a=+a;b|=0;d|=0;c||u(this,a,b,d,Math.pow(2,8*d)-1,0);c=d-1;var g=1;for(this[b+c]=a&255;0<=--c&&(g*=256);)this[b+c]=a/g&255;return b+d};c.prototype.writeUInt8= | ||
function(a,b,d){a=+a;b|=0;d||u(this,a,b,1,255,0);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a&255;return b+1};c.prototype.writeUInt16LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8):I(this,a,b,!0);return b+2};c.prototype.writeUInt16BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,65535,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):I(this,a,b,!1);return b+2};c.prototype.writeUInt32LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,4294967295, | ||
0);c.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a&255):J(this,a,b,!0);return b+4};c.prototype.writeUInt32BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,4294967295,0);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):J(this,a,b,!1);return b+4};c.prototype.writeIntLE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),u(this,a,b,d,c-1,-c));c=0;var g=1,e=0;for(this[b]=a&255;++c<d&&(g*=256);)0>a&&0===e&&0!==this[b+c-1]&&(e=1),this[b+ | ||
c]=(a/g>>0)-e&255;return b+d};c.prototype.writeIntBE=function(a,b,d,c){a=+a;b|=0;c||(c=Math.pow(2,8*d-1),u(this,a,b,d,c-1,-c));c=d-1;var e=1,g=0;for(this[b+c]=a&255;0<=--c&&(e*=256);)0>a&&0===g&&0!==this[b+c+1]&&(g=1),this[b+c]=(a/e>>0)-g&255;return b+d};c.prototype.writeInt8=function(a,b,d){a=+a;b|=0;d||u(this,a,b,1,127,-128);c.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a&255;return b+1};c.prototype.writeInt16LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT? | ||
(this[b]=a&255,this[b+1]=a>>>8):I(this,a,b,!0);return b+2};c.prototype.writeInt16BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,2,32767,-32768);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a&255):I(this,a,b,!1);return b+2};c.prototype.writeInt32LE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,2147483647,-2147483648);c.TYPED_ARRAY_SUPPORT?(this[b]=a&255,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):J(this,a,b,!0);return b+4};c.prototype.writeInt32BE=function(a,b,d){a=+a;b|=0;d||u(this,a,b,4,2147483647, | ||
-2147483648);0>a&&(a=4294967295+a+1);c.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a&255):J(this,a,b,!1);return b+4};c.prototype.writeFloatLE=function(a,b,d){return O(this,a,b,!0,d)};c.prototype.writeFloatBE=function(a,b,d){return O(this,a,b,!1,d)};c.prototype.writeDoubleLE=function(a,b,d){return P(this,a,b,!0,d)};c.prototype.writeDoubleBE=function(a,b,d){return P(this,a,b,!1,d)};c.prototype.copy=function(a,b,d,e){d||(d=0);e||0===e||(e=this.length);b>=a.length&& | ||
(b=a.length);b||(b=0);0<e&&e<d&&(e=d);if(e===d||0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length);a.length-b<e-d&&(e=a.length-b+d);var g=e-d;if(this===a&&d<b&&b<e)for(e=g-1;0<=e;--e)a[e+b]=this[e+d];else if(1E3>g||!c.TYPED_ARRAY_SUPPORT)for(e=0;e<g;++e)a[e+b]=this[e+d];else Uint8Array.prototype.set.call(a, | ||
this.subarray(d,d+g),b);return g};c.prototype.fill=function(a,b,d,e){if("string"===typeof a){"string"===typeof b?(e=b,b=0,d=this.length):"string"===typeof d&&(e=d,d=this.length);if(1===a.length){var g=a.charCodeAt(0);256>g&&(a=g)}if(void 0!==e&&"string"!==typeof e)throw new TypeError("encoding must be a string");if("string"===typeof e&&!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);}else"number"===typeof a&&(a&=255);if(0>b||this.length<b||this.length<d)throw new RangeError("Out of range index"); | ||
if(d<=b)return this;b>>>=0;d=void 0===d?this.length:d>>>0;a||(a=0);if("number"===typeof a)for(e=b;e<d;++e)this[e]=a;else for(a=c.isBuffer(a)?a:F((new c(a,e)).toString()),g=a.length,e=0;e<d-b;++e)this[e+b]=a[e%g];return this};var R=/[^+\/0-9A-Za-z-_]/g}).call(f,l(6))},function(k,f){f.read=function(f,e,h,k,c){var l;l=8*c-k-1;var p=(1<<l)-1,n=p>>1,t=-7;c=h?c-1:0;var m=h?-1:1,z=f[e+c];c+=m;h=z&(1<<-t)-1;z>>=-t;for(t+=l;0<t;h=256*h+f[e+c],c+=m,t-=8);l=h&(1<<-t)-1;h>>=-t;for(t+=k;0<t;l=256*l+f[e+c],c+= | ||
m,t-=8);if(0===h)h=1-n;else{if(h===p)return l?NaN:Infinity*(z?-1:1);l+=Math.pow(2,k);h-=n}return(z?-1:1)*l*Math.pow(2,h-k)};f.write=function(f,e,h,k,c,q){var l,n=8*q-c-1,t=(1<<n)-1,m=t>>1,p=23===c?Math.pow(2,-24)-Math.pow(2,-77):0;q=k?0:q-1;var x=k?1:-1,A=0>e||0===e&&0>1/e?1:0;e=Math.abs(e);isNaN(e)||Infinity===e?(e=isNaN(e)?1:0,k=t):(k=Math.floor(Math.log(e)/Math.LN2),1>e*(l=Math.pow(2,-k))&&(k--,l*=2),e=1<=k+m?e+p/l:e+p*Math.pow(2,1-m),2<=e*l&&(k++,l/=2),k+m>=t?(e=0,k=t):1<=k+m?(e=(e*l-1)*Math.pow(2, | ||
c),k+=m):(e=e*Math.pow(2,m-1)*Math.pow(2,c),k=0));for(;8<=c;f[h+q]=e&255,q+=x,e/=256,c-=8);k=k<<c|e;for(n+=c;0<n;f[h+q]=k&255,q+=x,k/=256,n-=8);f[h+q-x]|=128*A}},function(k,f){var l={}.toString;k.exports=Array.isArray||function(e){return"[object Array]"==l.call(e)}},function(k,f){f=function(){return this}();try{f=f||Function("return this")()||(0,eval)("this")}catch(l){"object"===typeof window&&(f=window)}k.exports=f},function(k,f,l){function e(c,e){var f=new q,h=c||{};f.onreadystatechange=function(){if(4=== | ||
f.readyState&&1!==f.timeout)if(200!==f.status)e(Error("[uport-lite] status "+f.status+": "+f.responseText));else try{e(null,JSON.parse(f.responseText))}catch(x){e(Error("[uport-lite] while parsing data: '"+String(f.responseText)+"', error: "+String(x)))}};h.data?f.open("POST",c.uri):f.open("GET",c.uri);h.accept&&f.setRequestHeader("accept",h.accept);h.data?(f.setRequestHeader("Content-Type","application/json"),f.send(JSON.stringify(h.data))):f.send()}function h(e){var f=p.decode(e),h=f.length-24; | ||
e=f.slice(1,h);f=f.slice(h,20+h);return{network:"0x"+c.encode(e),address:"0x"+c.encode(f)}}var p=l(0)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),c=l(0)("0123456789abcdef"),q="undefined"!==typeof window?window.XMLHttpRequest:l(1).XMLHttpRequest,v={"0x1":{registry:"0xab5c8051b9a1df1aab0149f8b0630848b7ecabf6",rpcUrl:"https://mainnet.infura.io"},"0x3":{registry:"0x41566e3a081f5032bdcad470adb797635ddfe1f0",rpcUrl:"https://ropsten.infura.io"},"0x2a":{registry:"0x5f8e9351dc2d238fb878b6ae43aa740d62fc9758", | ||
rpcUrl:"https://kovan.infura.io"}};k.exports=function(){function f(c,e){return c.split("").map(function(c){return("0"+c.charCodeAt(0).toString(16)).slice(-2)}).join(e||"")}function k(c,e,f){return"undefined"===typeof e?c:f?(c+e).slice(-c.length):(e+c).substring(0,c.length)}function l(c,e,h,l){c+=k("0000000000000000000000000000000000000000000000000000000000000000",f(e));c+=k("0000000000000000000000000000000000000000000000000000000000000000",h.slice(2),!0);return c+=k("0000000000000000000000000000000000000000000000000000000000000000", | ||
l.slice(2),!0)}function q(f,h){var k="https://ropsten.infura.io/"+D;return f?e({uri:k,accept:"application/json",data:{method:"eth_call",params:[{to:"0xb9C1598e24650437a3055F7f66AC1820c419a679",data:"0x446d5aa4000000000000000000000000"+f.slice(2)},"latest"],id:1,jsonrpc:"2.0"}},function(e,f){if(e)return h(e);if(f.error)return h(f.error);e=f.result.slice(130).slice(0,68);return h(null,p.encode(c.decode(e)))}):h(null)}function x(f,k,m,n){k=h(k);var r=h(m);if(k.network!==r.network)throw Error("Issuer and subject must be on the same network"); | ||
if(!B[k.network])throw Error("Network id "+k.network+" is not configured");m=B[k.network].rpcUrl;var u=B[k.network].registry;f=l("0x447885f0",f,k.address,r.address);return e({uri:m+"/"+D,accept:"application/json",data:{method:"eth_call",params:[{to:u,data:f},"latest"],id:1,jsonrpc:"2.0"}},function(e,f){return e?n(e):f.error?n(f.error):0==f.result?n(e):n(null,p.encode(c.decode("1220"+f.result.slice(2))))})}function A(c,f){return c&&"0x"!==c?e({uri:""+H+c},f):f()}var w=0<arguments.length&&void 0!== | ||
arguments[0]?arguments[0]:{},D=w.infuraKey||"uport-lite-library",H=w.ipfsGw||"https://ipfs.infura.io/ipfs/",B=w.networks?Object.assign({},v,w.networks):v;return function(c,e,f){var h=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"uPortProfileIPFS1220";if(!c)return e(null);var k=f||c;return c.match(/0x[0-9a-fA-F]{40}/)?q(c,function(c,f){if(c)return e(c);A(f,e)}):x(h,c,k,function(c,f){if(c)return e(c);A(f,e)})}}}])}); |
'use strict'; | ||
var BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; | ||
var base58 = require('base-x-bytearray')(BASE58); | ||
var hex = require('base-x-bytearray')('0123456789abcdef'); | ||
var base58 = require('base-x')(BASE58); | ||
var hex = require('base-x')('0123456789abcdef'); | ||
@@ -7,0 +7,0 @@ var XMLHttpRequest = typeof window !== 'undefined' ? window.XMLHttpRequest : require('xmlhttprequest').XMLHttpRequest; |
{ | ||
"name": "uport-lite", | ||
"version": "1.0.0-alpha-6", | ||
"version": "1.0.0", | ||
"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.2", | ||
"base-x": "^3.0.0", | ||
"xmlhttprequest": "^1.8.0" | ||
@@ -28,0 +28,0 @@ }, |
# Light weight library for fetching public uPort profiles | ||
A uPort is an ethereum address representing an identity of a person, thing or other entitity. We are using the NID address encoding scheme to support safe use of multiple networks. | ||
A uPort is an ethereum address representing an identity of a person, thing or other entitity. We are using the [MNID address encoding](https://github.com/uport-project/mnid) scheme to safely support multiple networks. | ||
A public profile is stored on ipfs at a hash registered in the [uPortRegistry](https://github.com/ConsenSys/uport-registry). | ||
This library aims to let developers look up a profile for a given ethereum address and nothing else. It is designed to be tiny (<3k with all dependencies), | ||
This library aims to let developers look up a profile for a given ethereum address and nothing else. It is designed to be tiny, | ||
so you can easily add uport functionality to non Ethereum apps. | ||
@@ -9,0 +9,0 @@ |
var BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' | ||
var base58 = require('base-x-bytearray')(BASE58) | ||
var hex = require('base-x-bytearray')('0123456789abcdef') | ||
var base58 = require('base-x')(BASE58) | ||
var hex = require('base-x')('0123456789abcdef') | ||
@@ -5,0 +5,0 @@ const XMLHttpRequest = (typeof window !== 'undefined') ? window.XMLHttpRequest : require('xmlhttprequest').XMLHttpRequest |
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
119969
2752
1
1
+ Addedbase-x@^3.0.0
+ Addedbase-x@3.0.10(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
- Removedbase-x-bytearray@^0.1.2
- Removedbase-x-bytearray@0.1.3(transitive)