@taquito/utils
Version:
converts michelson data and types into convenient JS/TS objects
120 lines (119 loc) • 4.19 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.prefixLength = exports.prefix = exports.Prefix = void 0;
// ref https://gitlab.com/tezos/tezos/-/blob/master/src/lib_crypto/base58.ml
var Prefix;
(function (Prefix) {
Prefix["TZ1"] = "tz1";
Prefix["TZ2"] = "tz2";
Prefix["TZ3"] = "tz3";
Prefix["TZ4"] = "tz4";
Prefix["KT"] = "KT";
Prefix["KT1"] = "KT1";
Prefix["EDSK"] = "edsk";
Prefix["EDSK2"] = "edsk2";
Prefix["SPSK"] = "spsk";
Prefix["P2SK"] = "p2sk";
Prefix["BLSK"] = "BLsk";
Prefix["EDPK"] = "edpk";
Prefix["SPPK"] = "sppk";
Prefix["P2PK"] = "p2pk";
Prefix["BLPK"] = "BLpk";
Prefix["EDESK"] = "edesk";
Prefix["SPESK"] = "spesk";
Prefix["P2ESK"] = "p2esk";
Prefix["BLESK"] = "BLesk";
Prefix["EDSIG"] = "edsig";
Prefix["SPSIG"] = "spsig";
Prefix["P2SIG"] = "p2sig";
Prefix["BLSIG"] = "BLsig";
Prefix["SIG"] = "sig";
Prefix["NET"] = "Net";
Prefix["NCE"] = "nce";
Prefix["B"] = "B";
Prefix["O"] = "o";
Prefix["LO"] = "Lo";
Prefix["LLO"] = "LLo";
Prefix["P"] = "P";
Prefix["CO"] = "Co";
Prefix["ID"] = "id";
Prefix["EXPR"] = "expr";
Prefix["TZ"] = "TZ";
Prefix["VH"] = "vh";
Prefix["SASK"] = "sask";
Prefix["ZET1"] = "zet1";
Prefix["SR1"] = "sr1";
Prefix["SRC1"] = "src1";
Prefix["SH"] = "sh";
})(Prefix || (exports.Prefix = Prefix = {}));
exports.prefix = {
[ ]: new Uint8Array([6, 161, 159]),
[ ]: new Uint8Array([6, 161, 161]),
[ ]: new Uint8Array([6, 161, 164]),
[ ]: new Uint8Array([6, 161, 166]),
[ ]: new Uint8Array([2, 90, 121]),
[ ]: new Uint8Array([2, 90, 121]),
[ ]: new Uint8Array([43, 246, 78, 7]),
[ ]: new Uint8Array([13, 15, 58, 7]),
[ ]: new Uint8Array([17, 162, 224, 201]),
[ ]: new Uint8Array([16, 81, 238, 189]),
[ ]: new Uint8Array([3, 150, 192, 40]),
[ ]: new Uint8Array([13, 15, 37, 217]),
[ ]: new Uint8Array([3, 254, 226, 86]),
[ ]: new Uint8Array([3, 178, 139, 127]),
[ ]: new Uint8Array([6, 149, 135, 204]),
[ ]: new Uint8Array([7, 90, 60, 179, 41]),
[ ]: new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
[ ]: new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
[ ]: new Uint8Array([2, 5, 30, 53, 25]),
[ ]: new Uint8Array([9, 245, 205, 134, 18]),
[ ]: new Uint8Array([13, 115, 101, 19, 63]),
[ ]: new Uint8Array([54, 240, 44, 52]),
[ ]: new Uint8Array([40, 171, 64, 207]),
[ ]: new Uint8Array([4, 130, 43]),
[ ]: new Uint8Array([87, 82, 0]),
[ ]: new Uint8Array([69, 220, 169]),
[ ]: new Uint8Array([1, 52]),
[ ]: new Uint8Array([5, 116]),
[ ]: new Uint8Array([133, 233]),
[ ]: new Uint8Array([29, 159, 109]),
[ ]: new Uint8Array([2, 170]),
[ ]: new Uint8Array([79, 179]),
[ ]: new Uint8Array([153, 103]),
[ ]: new Uint8Array([13, 44, 64, 27]),
// Legacy prefix
[ ]: new Uint8Array([2, 90, 121]),
[ ]: new Uint8Array([1, 106, 242]),
[ ]: new Uint8Array([11, 237, 20, 92]),
[ ]: new Uint8Array([18, 71, 40, 223]),
[ ]: new Uint8Array([6, 124, 117]),
[ ]: new Uint8Array([17, 165, 134, 138]),
[ ]: new Uint8Array([2, 116, 180]),
};
exports.prefixLength = {
[ ]: 20,
[ ]: 20,
[ ]: 20,
[ ]: 20,
[ ]: 20,
[ ]: 20,
[ ]: 32,
[ ]: 33,
[ ]: 33,
[ ]: 48,
[ ]: 64,
[ ]: 64,
[ ]: 64,
[ ]: 96,
[ ]: 64,
[ ]: 4,
[ ]: 32,
[ ]: 32,
[ ]: 32,
[ ]: 32,
[ ]: 169,
[ ]: 43,
[ ]: 20,
[ ]: 32,
[ ]: 48,
};