@taquito/utils
Advanced tools
Comparing version 20.0.2-beta.1 to 20.0.2-beta.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.format = void 0; | ||
exports.format = format; | ||
const bignumber_js_1 = require("bignumber.js"); | ||
@@ -27,2 +27,1 @@ const TZ_DECIMALS = 6; | ||
} | ||
exports.format = format; |
@@ -21,3 +21,22 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stripHexPrefix = exports.num2PaddedHex = exports.numToHexBuffer = exports.toHexBuf = exports.hex2Bytes = exports.bytesToString = exports.bytes2Char = exports.stringToBytes = exports.char2Bytes = exports.getPkhfromPk = exports.buf2hex = exports.mic2arr = exports.mergebuf = exports.hex2buf = exports.encodeKeyHash = exports.encodeKey = exports.encodeL2Address = exports.encodeAddress = exports.encodePubKey = exports.b58decodeL2Address = exports.b58decode = exports.b58cdecode = exports.b58cencode = exports.encodeOpHash = exports.encodeExpr = exports.format = exports.validatePkAndExtractPrefix = exports.verifySignature = exports.prefixLength = exports.Prefix = exports.prefix = exports.VERSION = void 0; | ||
exports.getPkhfromPk = exports.buf2hex = exports.mic2arr = exports.mergebuf = exports.hex2buf = exports.b58cdecode = exports.format = exports.validatePkAndExtractPrefix = exports.verifySignature = exports.prefixLength = exports.Prefix = exports.prefix = exports.VERSION = void 0; | ||
exports.encodeExpr = encodeExpr; | ||
exports.encodeOpHash = encodeOpHash; | ||
exports.b58cencode = b58cencode; | ||
exports.b58decode = b58decode; | ||
exports.b58decodeL2Address = b58decodeL2Address; | ||
exports.encodePubKey = encodePubKey; | ||
exports.encodeAddress = encodeAddress; | ||
exports.encodeL2Address = encodeL2Address; | ||
exports.encodeKey = encodeKey; | ||
exports.encodeKeyHash = encodeKeyHash; | ||
exports.char2Bytes = char2Bytes; | ||
exports.stringToBytes = stringToBytes; | ||
exports.bytes2Char = bytes2Char; | ||
exports.bytesToString = bytesToString; | ||
exports.hex2Bytes = hex2Bytes; | ||
exports.toHexBuf = toHexBuf; | ||
exports.numToHexBuffer = numToHexBuffer; | ||
exports.num2PaddedHex = num2PaddedHex; | ||
exports.stripHexPrefix = stripHexPrefix; | ||
/* | ||
@@ -60,3 +79,2 @@ * Some code in this file is originally from sotez and eztz | ||
} | ||
exports.encodeExpr = encodeExpr; | ||
/** | ||
@@ -71,3 +89,2 @@ * | ||
} | ||
exports.encodeOpHash = encodeOpHash; | ||
/** | ||
@@ -87,3 +104,2 @@ * | ||
} | ||
exports.b58cencode = b58cencode; | ||
/** | ||
@@ -122,3 +138,2 @@ * | ||
} | ||
exports.b58decode = b58decode; | ||
/** | ||
@@ -135,3 +150,2 @@ * | ||
} | ||
exports.b58decodeL2Address = b58decodeL2Address; | ||
/** | ||
@@ -155,3 +169,2 @@ * | ||
} | ||
exports.encodePubKey = encodePubKey; | ||
/** | ||
@@ -177,3 +190,2 @@ * | ||
} | ||
exports.encodeAddress = encodeAddress; | ||
/** | ||
@@ -188,3 +200,2 @@ * | ||
} | ||
exports.encodeL2Address = encodeL2Address; | ||
/** | ||
@@ -206,3 +217,2 @@ * | ||
} | ||
exports.encodeKey = encodeKey; | ||
/** | ||
@@ -224,3 +234,2 @@ * | ||
} | ||
exports.encodeKeyHash = encodeKeyHash; | ||
/** | ||
@@ -384,3 +393,2 @@ * | ||
} | ||
exports.char2Bytes = char2Bytes; | ||
/** | ||
@@ -395,3 +403,2 @@ * | ||
} | ||
exports.stringToBytes = stringToBytes; | ||
/** | ||
@@ -407,3 +414,2 @@ * | ||
} | ||
exports.bytes2Char = bytes2Char; | ||
/** | ||
@@ -418,3 +424,2 @@ * | ||
} | ||
exports.bytesToString = bytesToString; | ||
/** | ||
@@ -433,3 +438,2 @@ * | ||
} | ||
exports.hex2Bytes = hex2Bytes; | ||
/** | ||
@@ -444,7 +448,5 @@ * | ||
} | ||
exports.toHexBuf = toHexBuf; | ||
function numToHexBuffer(val, bitLength = 8) { | ||
return buffer_1.Buffer.from(num2PaddedHex(val, bitLength), 'hex'); | ||
} | ||
exports.numToHexBuffer = numToHexBuffer; | ||
/** | ||
@@ -474,3 +476,2 @@ * | ||
} | ||
exports.num2PaddedHex = num2PaddedHex; | ||
function padHexWithZero(hex, targetLength) { | ||
@@ -495,2 +496,1 @@ const padString = '0'; | ||
} | ||
exports.stripHexPrefix = stripHexPrefix; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateSmartRollupAddress = exports.invalidDetail = exports.validateSpendingKey = exports.validateBlock = exports.validateProtocol = exports.validateOperation = exports.validatePublicKey = exports.validateSignature = exports.validateKeyHash = exports.validateContractAddress = exports.validateChain = exports.validateAddress = exports.isValidPrefix = exports.ValidationResult = void 0; | ||
exports.ValidationResult = void 0; | ||
exports.isValidPrefix = isValidPrefix; | ||
exports.validateAddress = validateAddress; | ||
exports.validateChain = validateChain; | ||
exports.validateContractAddress = validateContractAddress; | ||
exports.validateKeyHash = validateKeyHash; | ||
exports.validateSignature = validateSignature; | ||
exports.validatePublicKey = validatePublicKey; | ||
exports.validateOperation = validateOperation; | ||
exports.validateProtocol = validateProtocol; | ||
exports.validateBlock = validateBlock; | ||
exports.validateSpendingKey = validateSpendingKey; | ||
exports.invalidDetail = invalidDetail; | ||
exports.validateSmartRollupAddress = validateSmartRollupAddress; | ||
const constants_1 = require("./constants"); | ||
@@ -19,3 +32,2 @@ const bs58check_1 = require("bs58check"); | ||
} | ||
exports.isValidPrefix = isValidPrefix; | ||
/** | ||
@@ -85,3 +97,2 @@ * @description This function is called by the validation functions ([[validateAddress]], [[validateChain]], [[validateContractAddress]], [[validateKeyHash]], [[validateSignature]], [[validatePublicKey]]). | ||
} | ||
exports.validateAddress = validateAddress; | ||
/** | ||
@@ -105,3 +116,2 @@ * @description Used to check if a chain id is valid. | ||
} | ||
exports.validateChain = validateChain; | ||
/** | ||
@@ -125,3 +135,2 @@ * @description Used to check if a contract address is valid. | ||
} | ||
exports.validateContractAddress = validateContractAddress; | ||
/** | ||
@@ -145,3 +154,2 @@ * @description Used to check if a key hash is valid. | ||
} | ||
exports.validateKeyHash = validateKeyHash; | ||
/** | ||
@@ -165,3 +173,2 @@ * @description Used to check if a signature is valid. | ||
} | ||
exports.validateSignature = validateSignature; | ||
/** | ||
@@ -185,3 +192,2 @@ * @description Used to check if a public key is valid. | ||
} | ||
exports.validatePublicKey = validatePublicKey; | ||
/** | ||
@@ -205,3 +211,2 @@ * @description Used to check if an operation hash is valid. | ||
} | ||
exports.validateOperation = validateOperation; | ||
/** | ||
@@ -225,3 +230,2 @@ * @description Used to check if a protocol hash is valid. | ||
} | ||
exports.validateProtocol = validateProtocol; | ||
/** | ||
@@ -245,3 +249,2 @@ * @description Used to check if a block hash is valid. | ||
} | ||
exports.validateBlock = validateBlock; | ||
/** | ||
@@ -255,3 +258,2 @@ * @description Used to check if a spending key is valid. | ||
} | ||
exports.validateSpendingKey = validateSpendingKey; | ||
function invalidDetail(validation) { | ||
@@ -269,6 +271,4 @@ switch (validation) { | ||
} | ||
exports.invalidDetail = invalidDetail; | ||
function validateSmartRollupAddress(value) { | ||
return validatePrefixedValue(value, [...smartRollupPrefix]); | ||
} | ||
exports.validateSmartRollupAddress = validateSmartRollupAddress; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validatePkAndExtractPrefix = exports.verifySignature = void 0; | ||
exports.verifySignature = verifySignature; | ||
exports.validatePkAndExtractPrefix = validatePkAndExtractPrefix; | ||
const ed25519_1 = require("@stablelib/ed25519"); | ||
@@ -52,3 +53,2 @@ const blake2b_1 = require("@stablelib/blake2b"); | ||
} | ||
exports.verifySignature = verifySignature; | ||
function validateMessageNotEmpty(message) { | ||
@@ -71,3 +71,2 @@ if (message === '') { | ||
} | ||
exports.validatePkAndExtractPrefix = validatePkAndExtractPrefix; | ||
function validateSigAndExtractPrefix(signature) { | ||
@@ -74,0 +73,0 @@ const signaturePrefix = signature.startsWith('sig') |
@@ -6,4 +6,4 @@ "use strict"; | ||
exports.VERSION = { | ||
"commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02", | ||
"version": "20.0.2-beta.1" | ||
"commitHash": "943d5fd11790da35f4a3e6ecfcaae3c4f0399a97", | ||
"version": "20.0.2-beta.2" | ||
}; |
@@ -499,4 +499,4 @@ import { Buffer } from 'buffer'; | ||
const VERSION = { | ||
"commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02", | ||
"version": "20.0.2-beta.1" | ||
"commitHash": "943d5fd11790da35f4a3e6ecfcaae3c4f0399a97", | ||
"version": "20.0.2-beta.2" | ||
}; | ||
@@ -503,0 +503,0 @@ |
@@ -494,4 +494,4 @@ (function (global, factory) { | ||
const VERSION = { | ||
"commitHash": "a9cdc31ccbc6e2ed58dedaf3c8c4f0c62bc3ae02", | ||
"version": "20.0.2-beta.1" | ||
"commitHash": "943d5fd11790da35f4a3e6ecfcaae3c4f0399a97", | ||
"version": "20.0.2-beta.2" | ||
}; | ||
@@ -498,0 +498,0 @@ |
@@ -34,5 +34,5 @@ export declare enum Prefix { | ||
TZ = "TZ", | ||
VH = "vh", | ||
SASK = "sask", | ||
ZET1 = "zet1", | ||
VH = "vh",// block_payload_hash | ||
SASK = "sask",// sapling_spending_key | ||
ZET1 = "zet1",// sapling_address | ||
SR1 = "sr1", | ||
@@ -39,0 +39,0 @@ SRC1 = "src1", |
@@ -5,3 +5,2 @@ /** | ||
*/ | ||
/// <reference types="node" /> | ||
import { Buffer } from 'buffer'; | ||
@@ -8,0 +7,0 @@ import BigNumber from 'bignumber.js'; |
{ | ||
"name": "@taquito/utils", | ||
"version": "20.0.2-beta.1", | ||
"version": "20.0.2-beta.2", | ||
"description": "converts michelson data and types into convenient JS/TS objects", | ||
@@ -67,4 +67,4 @@ "keywords": [ | ||
"@stablelib/ed25519": "^1.0.3", | ||
"@taquito/core": "^20.0.2-beta.1", | ||
"@types/bs58check": "^2.1.0", | ||
"@taquito/core": "^20.0.2-beta.2", | ||
"@types/bs58check": "^2.1.2", | ||
"bignumber.js": "^9.1.2", | ||
@@ -74,34 +74,34 @@ "blakejs": "^1.2.1", | ||
"buffer": "^6.0.3", | ||
"elliptic": "^6.5.4", | ||
"elliptic": "^6.5.6", | ||
"typedarray-to-buffer": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/bluebird": "^3.5.40", | ||
"@types/elliptic": "^6.4.15", | ||
"@types/jest": "^29.5.5", | ||
"@types/node": "^20", | ||
"@typescript-eslint/eslint-plugin": "^6.8.0", | ||
"@typescript-eslint/parser": "^6.8.0", | ||
"@types/bluebird": "^3.5.42", | ||
"@types/elliptic": "^6.4.18", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^22", | ||
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"colors": "^1.4.0", | ||
"coveralls": "^3.1.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.51.0", | ||
"eslint": "^8.57.0", | ||
"jest": "^29.7.0", | ||
"jest-config": "^29.7.0", | ||
"lint-staged": "^14.0.1", | ||
"lint-staged": "^15.2.7", | ||
"lodash.camelcase": "^4.3.0", | ||
"prettier": "^3.0.3", | ||
"prettier": "^3.3.3", | ||
"prompt": "^1.3.0", | ||
"replace-in-file": "^7.0.1", | ||
"rimraf": "^5.0.5", | ||
"rollup": "^4.1.4", | ||
"replace-in-file": "^8.1.0", | ||
"rimraf": "^6.0.1", | ||
"rollup": "^4.19.1", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-typescript2": "^0.36.0", | ||
"shelljs": "^0.8.5", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"ts-jest": "^29.2.3", | ||
"ts-node": "^10.9.2", | ||
"ts-toolbelt": "^9.6.0", | ||
"typescript": "~5.2.2" | ||
"typescript": "~5.5.4" | ||
}, | ||
"gitHead": "6d1e4d129ac57c1bdeb5464601e40c50f413e43f" | ||
"gitHead": "f0f9e4d22a374c72913abbb1991b0e5b34f4c978" | ||
} |
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
157529
3706
Updated@taquito/core@^20.0.2-beta.2
Updated@types/bs58check@^2.1.2
Updatedelliptic@^6.5.6