Socket
Socket
Sign inDemoInstall

@taquito/utils

Package Overview
Dependencies
39
Maintainers
7
Versions
195
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 17.3.1 to 18.0.0-RC.0

3

dist/lib/constants.js

@@ -42,3 +42,2 @@ "use strict";

//rollups
Prefix["TXR1"] = "txr1";
Prefix["TXI"] = "txi";

@@ -90,3 +89,2 @@ Prefix["TXM"] = "txm";

[Prefix.ZET1]: new Uint8Array([18, 71, 40, 223]),
[Prefix.TXR1]: new Uint8Array([1, 128, 120, 31]),
[Prefix.TXI]: new Uint8Array([79, 148, 196]),

@@ -124,3 +122,2 @@ [Prefix.TXM]: new Uint8Array([79, 149, 30]),

[Prefix.ZET1]: 43,
[Prefix.TXR1]: 20,
[Prefix.TXI]: 32,

@@ -127,0 +124,0 @@ [Prefix.TXM]: 32,

@@ -103,7 +103,3 @@ "use strict";

};
const rollupPrefMap = {
[constants_1.prefix.txr1.toString()]: '02',
};
const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
const rollupPref = rollupPrefMap[new Uint8Array(buf.slice(0, 4)).toString()];
if (pref) {

@@ -114,6 +110,2 @@ // tz addresses

}
else if (rollupPref) {
const hex = exports.buf2hex(buf.slice(4));
return rollupPref + hex + '00';
}
else {

@@ -152,6 +144,2 @@ // other (kt addresses)

}
else if (value.substring(0, 2) === '02') {
// 42 also works but the removes the 00 padding at the end
return b58cencode(value.substring(2, value.length - 2), constants_1.prefix.txr1);
}
return b58cencode(value.substring(2, 42), constants_1.prefix.KT);

@@ -158,0 +146,0 @@ }

2

dist/lib/validators.js

@@ -59,3 +59,3 @@ "use strict";

const implicitPrefix = [constants_1.Prefix.TZ1, constants_1.Prefix.TZ2, constants_1.Prefix.TZ3, constants_1.Prefix.TZ4];
const contractPrefix = [constants_1.Prefix.KT1, constants_1.Prefix.TXR1];
const contractPrefix = [constants_1.Prefix.KT1];
const signaturePrefix = [constants_1.Prefix.EDSIG, constants_1.Prefix.P2SIG, constants_1.Prefix.SPSIG, constants_1.Prefix.SIG];

@@ -62,0 +62,0 @@ const pkPrefix = [constants_1.Prefix.EDPK, constants_1.Prefix.SPPK, constants_1.Prefix.P2PK, constants_1.Prefix.BLPK];

@@ -14,3 +14,3 @@ "use strict";

* @param messageBytes The forged message including the magic byte (11 for block,
* 12 for preendorsement, 13 for endorsement, 3 for generic, 5 for the PACK format of michelson)
* 12 for preendorsement/preattestation, 13 for endorsement/attestation, 3 for generic, 5 for the PACK format of michelson)
* @param publicKey The public key to verify the signature against

@@ -17,0 +17,0 @@ * @param signature The signature to verify

@@ -6,5 +6,5 @@ "use strict";

exports.VERSION = {
"commitHash": "9e27326dabf764c55402c50be4d78681f2c78cca",
"version": "17.3.1"
"commitHash": "21f25a09b87809102b0214544d2c5396eeb5872e",
"version": "18.0.0-RC.0"
};
//# sourceMappingURL=version.js.map

@@ -50,3 +50,2 @@ import { Buffer } from 'buffer';

//rollups
Prefix["TXR1"] = "txr1";
Prefix["TXI"] = "txi";

@@ -98,3 +97,2 @@ Prefix["TXM"] = "txm";

[Prefix.ZET1]: new Uint8Array([18, 71, 40, 223]),
[Prefix.TXR1]: new Uint8Array([1, 128, 120, 31]),
[Prefix.TXI]: new Uint8Array([79, 148, 196]),

@@ -132,3 +130,2 @@ [Prefix.TXM]: new Uint8Array([79, 149, 30]),

[Prefix.ZET1]: 43,
[Prefix.TXR1]: 20,
[Prefix.TXI]: 32,

@@ -148,3 +145,3 @@ [Prefix.TXM]: 32,

* @param messageBytes The forged message including the magic byte (11 for block,
* 12 for preendorsement, 13 for endorsement, 3 for generic, 5 for the PACK format of michelson)
* 12 for preendorsement/preattestation, 13 for endorsement/attestation, 3 for generic, 5 for the PACK format of michelson)
* @param publicKey The public key to verify the signature against

@@ -326,3 +323,3 @@ * @param signature The signature to verify

const implicitPrefix = [Prefix.TZ1, Prefix.TZ2, Prefix.TZ3, Prefix.TZ4];
const contractPrefix = [Prefix.KT1, Prefix.TXR1];
const contractPrefix = [Prefix.KT1];
const signaturePrefix = [Prefix.EDSIG, Prefix.P2SIG, Prefix.SPSIG, Prefix.SIG];

@@ -522,4 +519,4 @@ const pkPrefix = [Prefix.EDPK, Prefix.SPPK, Prefix.P2PK, Prefix.BLPK];

const VERSION = {
"commitHash": "9e27326dabf764c55402c50be4d78681f2c78cca",
"version": "17.3.1"
"commitHash": "21f25a09b87809102b0214544d2c5396eeb5872e",
"version": "18.0.0-RC.0"
};

@@ -608,7 +605,3 @@

};
const rollupPrefMap = {
[prefix.txr1.toString()]: '02',
};
const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
const rollupPref = rollupPrefMap[new Uint8Array(buf.slice(0, 4)).toString()];
if (pref) {

@@ -619,6 +612,2 @@ // tz addresses

}
else if (rollupPref) {
const hex = buf2hex(buf.slice(4));
return rollupPref + hex + '00';
}
else {

@@ -655,6 +644,2 @@ // other (kt addresses)

}
else if (value.substring(0, 2) === '02') {
// 42 also works but the removes the 00 padding at the end
return b58cencode(value.substring(2, value.length - 2), prefix.txr1);
}
return b58cencode(value.substring(2, 42), prefix.KT);

@@ -661,0 +646,0 @@ }

@@ -53,3 +53,2 @@ (function (global, factory) {

//rollups
Prefix["TXR1"] = "txr1";
Prefix["TXI"] = "txi";

@@ -101,3 +100,2 @@ Prefix["TXM"] = "txm";

[exports.Prefix.ZET1]: new Uint8Array([18, 71, 40, 223]),
[exports.Prefix.TXR1]: new Uint8Array([1, 128, 120, 31]),
[exports.Prefix.TXI]: new Uint8Array([79, 148, 196]),

@@ -135,3 +133,2 @@ [exports.Prefix.TXM]: new Uint8Array([79, 149, 30]),

[exports.Prefix.ZET1]: 43,
[exports.Prefix.TXR1]: 20,
[exports.Prefix.TXI]: 32,

@@ -151,3 +148,3 @@ [exports.Prefix.TXM]: 32,

* @param messageBytes The forged message including the magic byte (11 for block,
* 12 for preendorsement, 13 for endorsement, 3 for generic, 5 for the PACK format of michelson)
* 12 for preendorsement/preattestation, 13 for endorsement/attestation, 3 for generic, 5 for the PACK format of michelson)
* @param publicKey The public key to verify the signature against

@@ -329,3 +326,3 @@ * @param signature The signature to verify

const implicitPrefix = [exports.Prefix.TZ1, exports.Prefix.TZ2, exports.Prefix.TZ3, exports.Prefix.TZ4];
const contractPrefix = [exports.Prefix.KT1, exports.Prefix.TXR1];
const contractPrefix = [exports.Prefix.KT1];
const signaturePrefix = [exports.Prefix.EDSIG, exports.Prefix.P2SIG, exports.Prefix.SPSIG, exports.Prefix.SIG];

@@ -525,4 +522,4 @@ const pkPrefix = [exports.Prefix.EDPK, exports.Prefix.SPPK, exports.Prefix.P2PK, exports.Prefix.BLPK];

const VERSION = {
"commitHash": "9e27326dabf764c55402c50be4d78681f2c78cca",
"version": "17.3.1"
"commitHash": "21f25a09b87809102b0214544d2c5396eeb5872e",
"version": "18.0.0-RC.0"
};

@@ -611,7 +608,3 @@

};
const rollupPrefMap = {
[prefix.txr1.toString()]: '02',
};
const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
const rollupPref = rollupPrefMap[new Uint8Array(buf.slice(0, 4)).toString()];
if (pref) {

@@ -622,6 +615,2 @@ // tz addresses

}
else if (rollupPref) {
const hex = buf2hex(buf.slice(4));
return rollupPref + hex + '00';
}
else {

@@ -658,6 +647,2 @@ // other (kt addresses)

}
else if (value.substring(0, 2) === '02') {
// 42 also works but the removes the 00 padding at the end
return b58cencode(value.substring(2, value.length - 2), prefix.txr1);
}
return b58cencode(value.substring(2, 42), prefix.KT);

@@ -664,0 +649,0 @@ }

@@ -37,3 +37,2 @@ export declare enum Prefix {

ZET1 = "zet1",
TXR1 = "txr1",
TXI = "txi",

@@ -84,3 +83,2 @@ TXM = "txm",

zet1: Uint8Array;
txr1: Uint8Array;
txi: Uint8Array;

@@ -87,0 +85,0 @@ txm: Uint8Array;

@@ -7,3 +7,3 @@ import { Prefix } from './taquito-utils';

* @param messageBytes The forged message including the magic byte (11 for block,
* 12 for preendorsement, 13 for endorsement, 3 for generic, 5 for the PACK format of michelson)
* 12 for preendorsement/preattestation, 13 for endorsement/attestation, 3 for generic, 5 for the PACK format of michelson)
* @param publicKey The public key to verify the signature against

@@ -10,0 +10,0 @@ * @param signature The signature to verify

{
"name": "@taquito/utils",
"version": "17.3.1",
"version": "18.0.0-RC.0",
"description": "converts michelson data and types into convenient JS/TS objects",

@@ -68,3 +68,3 @@ "keywords": [

"@stablelib/ed25519": "^1.0.3",
"@taquito/core": "^17.3.1",
"@taquito/core": "^18.0.0-RC.0",
"@types/bs58check": "^2.1.0",

@@ -107,3 +107,3 @@ "bignumber.js": "^9.1.0",

},
"gitHead": "3eac9219d501eb9c1334ee8d8aaf9f195e8300cb"
"gitHead": "998e588c7c72f45bb8d95bed54152b618aa18ec3"
}

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc