Socket
Socket
Sign inDemoInstall

@iov/encoding

Package Overview
Dependencies
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iov/encoding - npm Package Compare versions

Comparing version 2.3.2 to 2.5.0

26

build/encoding.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ascii_1 = require("./ascii");
const base64_1 = require("./base64");
const hex_1 = require("./hex");
const rfc3339_1 = require("./rfc3339");
const utf8_1 = require("./utf8");
const encoding_1 = require("@cosmjs/encoding");
/**

@@ -15,39 +11,39 @@ * @deprecated All members of this namespacing class have been

static toHex(data) {
return hex_1.toHex(data);
return encoding_1.toHex(data);
}
/** @deprecated use free function fromHex from `@iov/encoding` */
static fromHex(hexstring) {
return hex_1.fromHex(hexstring);
return encoding_1.fromHex(hexstring);
}
/** @deprecated use free function toBase64 from `@iov/encoding` */
static toBase64(data) {
return base64_1.toBase64(data);
return encoding_1.toBase64(data);
}
/** @deprecated use free function fromBase64 from `@iov/encoding` */
static fromBase64(base64String) {
return base64_1.fromBase64(base64String);
return encoding_1.fromBase64(base64String);
}
/** @deprecated use free function toAscii from `@iov/encoding` */
static toAscii(input) {
return ascii_1.toAscii(input);
return encoding_1.toAscii(input);
}
/** @deprecated use free function fromAscii from `@iov/encoding` */
static fromAscii(data) {
return ascii_1.fromAscii(data);
return encoding_1.fromAscii(data);
}
/** @deprecated use free function toUtf8 from `@iov/encoding` */
static toUtf8(str) {
return utf8_1.toUtf8(str);
return encoding_1.toUtf8(str);
}
/** @deprecated use free function fromUtf8 from `@iov/encoding` */
static fromUtf8(data) {
return utf8_1.fromUtf8(data);
return encoding_1.fromUtf8(data);
}
/** @deprecated use free function fromRfc3339 from `@iov/encoding` */
static fromRfc3339(str) {
return rfc3339_1.fromRfc3339(str);
return encoding_1.fromRfc3339(str);
}
/** @deprecated use free function toRfc3339 from `@iov/encoding` */
static toRfc3339(date) {
return rfc3339_1.toRfc3339(date);
return encoding_1.toRfc3339(date);
}

@@ -54,0 +50,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ascii_1 = require("./ascii");
exports.fromAscii = ascii_1.fromAscii;
exports.toAscii = ascii_1.toAscii;
var base64_1 = require("./base64");
exports.fromBase64 = base64_1.fromBase64;
exports.toBase64 = base64_1.toBase64;
var bech32_1 = require("./bech32");
exports.Bech32 = bech32_1.Bech32;
var decimal_1 = require("./decimal");
exports.Decimal = decimal_1.Decimal;
var encoding_1 = require("./encoding");
exports.Encoding = encoding_1.Encoding;
var hex_1 = require("./hex");
exports.fromHex = hex_1.fromHex;
exports.toHex = hex_1.toHex;
var integers_1 = require("./integers");
exports.Int53 = integers_1.Int53;
exports.Uint32 = integers_1.Uint32;
exports.Uint53 = integers_1.Uint53;
exports.Uint64 = integers_1.Uint64;
// Re-exports for IOV Core 2.x compatibility
var math_1 = require("@cosmjs/math");
exports.Int53 = math_1.Int53;
exports.Uint32 = math_1.Uint32;
exports.Uint53 = math_1.Uint53;
exports.Uint64 = math_1.Uint64;
exports.Decimal = math_1.Decimal;
var encoding_1 = require("@cosmjs/encoding");
exports.fromHex = encoding_1.fromHex;
exports.toHex = encoding_1.toHex;
exports.fromAscii = encoding_1.fromAscii;
exports.toAscii = encoding_1.toAscii;
exports.fromBase64 = encoding_1.fromBase64;
exports.toBase64 = encoding_1.toBase64;
exports.fromRfc3339 = encoding_1.fromRfc3339;
exports.toRfc3339 = encoding_1.toRfc3339;
exports.fromUtf8 = encoding_1.fromUtf8;
exports.toUtf8 = encoding_1.toUtf8;
exports.Bech32 = encoding_1.Bech32;
var utils_1 = require("@cosmjs/utils");
exports.isNonNullObject = utils_1.isNonNullObject;
exports.isUint8Array = utils_1.isUint8Array;
// Symbols not (yet) existent in CosmJS
var json_1 = require("./json");

@@ -27,13 +30,7 @@ exports.isJsonCompatibleValue = json_1.isJsonCompatibleValue;

exports.isJsonCompatibleArray = json_1.isJsonCompatibleArray;
var rfc3339_1 = require("./rfc3339");
exports.fromRfc3339 = rfc3339_1.fromRfc3339;
exports.toRfc3339 = rfc3339_1.toRfc3339;
var transactionencoder_1 = require("./transactionencoder");
exports.TransactionEncoder = transactionencoder_1.TransactionEncoder;
var typechecks_1 = require("./typechecks");
exports.isNonNullObject = typechecks_1.isNonNullObject;
exports.isUint8Array = typechecks_1.isUint8Array;
var utf8_1 = require("./utf8");
exports.fromUtf8 = utf8_1.fromUtf8;
exports.toUtf8 = utf8_1.toUtf8;
// Deprecated symbols to be removed in the next mayor release
var encoding_2 = require("./encoding");
exports.Encoding = encoding_2.Encoding;
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const hex_1 = require("./hex");
const typechecks_1 = require("./typechecks");
const encoding_1 = require("@cosmjs/encoding");
const utils_1 = require("@cosmjs/utils");
const prefixes = {

@@ -33,4 +33,4 @@ string: "string:",

}
if (typechecks_1.isUint8Array(data)) {
return `${prefixes.bytes}${hex_1.toHex(data)}`;
if (utils_1.isUint8Array(data)) {
return `${prefixes.bytes}${encoding_1.toHex(data)}`;
}

@@ -73,3 +73,3 @@ if (Array.isArray(data)) {

if (data.startsWith(prefixes.bytes)) {
return hex_1.fromHex(data.slice(prefixes.bytes.length));
return encoding_1.fromHex(data.slice(prefixes.bytes.length));
}

@@ -76,0 +76,0 @@ throw new Error("Found string with unknown prefix");

{
"name": "@iov/encoding",
"version": "2.3.2",
"version": "2.5.0",
"description": "Encoding helpers for IOV projects",

@@ -40,12 +40,8 @@ "author": "IOV SAS <admin@iov.one>",

"dependencies": {
"base64-js": "^1.3.0",
"bech32": "^1.1.4",
"bn.js": "^4.11.8",
"@cosmjs/encoding": "^0.20.0",
"@cosmjs/math": "^0.20.0",
"@cosmjs/utils": "^0.20.0",
"readonly-date": "^1.0.0"
},
"devDependencies": {
"@types/base64-js": "^1.2.5",
"@types/bn.js": "^4.11.6"
},
"gitHead": "6b701c34cb97929893adfdfb63889b741de9757f"
"gitHead": "eb452f8ff56b712c4bbb1b48ffa0e6d8140706c6"
}

@@ -1,9 +0,17 @@

export { fromAscii, toAscii } from "./ascii";
export { fromBase64, toBase64 } from "./base64";
export { Bech32 } from "./bech32";
export { Decimal } from "./decimal";
export { Encoding } from "./encoding";
export { fromHex, toHex } from "./hex";
export { Int53, Uint32, Uint53, Uint64 } from "./integers";
export { Int53, Uint32, Uint53, Uint64, Decimal } from "@cosmjs/math";
export {
fromHex,
toHex,
fromAscii,
toAscii,
fromBase64,
toBase64,
fromRfc3339,
toRfc3339,
fromUtf8,
toUtf8,
Bech32,
} from "@cosmjs/encoding";
export { isNonNullObject, isUint8Array } from "@cosmjs/utils";
export {
JsonCompatibleValue,

@@ -16,5 +24,3 @@ isJsonCompatibleValue,

} from "./json";
export { fromRfc3339, toRfc3339 } from "./rfc3339";
export { TransactionEncoder } from "./transactionencoder";
export { isNonNullObject, isUint8Array } from "./typechecks";
export { fromUtf8, toUtf8 } from "./utf8";
export { Encoding } from "./encoding";

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc