@taquito/utils
Advanced tools
Comparing version 4.1.0-beta.5 to 4.1.0-beta.6
@@ -77,2 +77,24 @@ "use strict"; | ||
exports.encodePubKey = encodePubKey; | ||
function encodeKey(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([13, 15, 37, 217]), | ||
'01': new Uint8Array([3, 254, 226, 86]), | ||
'02': new Uint8Array([3, 178, 139, 127]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
exports.encodeKey = encodeKey; | ||
function encodeKeyHash(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([6, 161, 159]), | ||
'01': new Uint8Array([6, 161, 161]), | ||
'02': new Uint8Array([6, 161, 164]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
exports.encodeKeyHash = encodeKeyHash; | ||
/** | ||
@@ -79,0 +101,0 @@ * |
@@ -102,2 +102,22 @@ import { Buffer } from 'buffer'; | ||
} | ||
function encodeKey(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([13, 15, 37, 217]), | ||
'01': new Uint8Array([3, 254, 226, 86]), | ||
'02': new Uint8Array([3, 178, 139, 127]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
function encodeKeyHash(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([6, 161, 159]), | ||
'01': new Uint8Array([6, 161, 161]), | ||
'02': new Uint8Array([6, 161, 164]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
/** | ||
@@ -369,3 +389,3 @@ * | ||
export { b58cdecode, b58cencode, b58decode, buf2hex, encodePubKey, hex2buf, hexNonce, mergebuf, mic2arr, ml2mic, prefix, sexp2mic }; | ||
export { b58cdecode, b58cencode, b58decode, buf2hex, encodeKey, encodeKeyHash, encodePubKey, hex2buf, hexNonce, mergebuf, mic2arr, ml2mic, prefix, sexp2mic }; | ||
//# sourceMappingURL=taquito-utils.es5.js.map |
@@ -106,2 +106,22 @@ (function (global, factory) { | ||
} | ||
function encodeKey(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([13, 15, 37, 217]), | ||
'01': new Uint8Array([3, 254, 226, 86]), | ||
'02': new Uint8Array([3, 178, 139, 127]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
function encodeKeyHash(value) { | ||
if (value[0] === '0') { | ||
var pref = { | ||
'00': new Uint8Array([6, 161, 159]), | ||
'01': new Uint8Array([6, 161, 161]), | ||
'02': new Uint8Array([6, 161, 164]), | ||
}; | ||
return b58cencode(value.substring(2), pref[value.substring(0, 2)]); | ||
} | ||
} | ||
/** | ||
@@ -377,2 +397,4 @@ * | ||
exports.buf2hex = buf2hex; | ||
exports.encodeKey = encodeKey; | ||
exports.encodeKeyHash = encodeKeyHash; | ||
exports.encodePubKey = encodePubKey; | ||
@@ -379,0 +401,0 @@ exports.hex2buf = hex2buf; |
@@ -33,2 +33,4 @@ /// <reference types="node" /> | ||
export declare function encodePubKey(value: string): any; | ||
export declare function encodeKey(value: string): any; | ||
export declare function encodeKeyHash(value: string): any; | ||
/** | ||
@@ -35,0 +37,0 @@ * |
{ | ||
"name": "@taquito/utils", | ||
"version": "4.1.0-beta.5", | ||
"version": "4.1.0-beta.6", | ||
"description": "converts michelson data and types into convenient JS/TS objects", | ||
@@ -93,3 +93,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "4def21171eb9f4ac5df94945c89593031d4a9304" | ||
"gitHead": "0621a733f1d260781131fd7494424dca7563388a" | ||
} |
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
99544
1276