Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/rlp

Package Overview
Dependencies
Maintainers
14
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/rlp - npm Package Compare versions

Comparing version 1.0.0-alpha.0 to 1.0.0-alpha.1

8

CHANGELOG.md

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

# @onflow/rlp
## 1.0.0-alpha.1
### Patch Changes
- [#1164](https://github.com/onflow/fcl-js/pull/1164) [`11229868`](https://github.com/onflow/fcl-js/commit/11229868cf916d204901f8bb3f76ee234e9152a8) Thanks [@justinbarry](https://github.com/justinbarry)! - No longer minify released source code.
## 1.0.0-alpha.0

@@ -2,0 +10,0 @@

166

dist/rlp.js

@@ -1,2 +0,166 @@

var r=require("buffer");function e(e,f){if(e<56)return r.Buffer.from([e+f]);var t=n(e),u=n(f+55+t.length/2);return r.Buffer.from(u+t,"hex")}function f(r){return"0x"===r.slice(0,2)}function n(r){if(r<0)throw new Error("Invalid integer as argument, must be unsigned!");var e=r.toString(16);return e.length%2?"0"+e:e}function t(e){if(!r.Buffer.isBuffer(e)){if("string"==typeof e)return f(e)?r.Buffer.from((u="string"!=typeof(i=e)?i:f(i)?i.slice(2):i).length%2?"0"+u:u,"hex"):r.Buffer.from(e);if("number"==typeof e)return e?(t=n(e),r.Buffer.from(t,"hex")):r.Buffer.from([]);if(null==e)return r.Buffer.from([]);if(e instanceof Uint8Array)return r.Buffer.from(e);throw new Error("invalid type")}var t,u,i;return e}Object.defineProperty(exports,"Buffer",{enumerable:!0,get:function(){return r.Buffer}}),exports.encode=function f(n){if(Array.isArray(n)){for(var u=[],i=0;i<n.length;i++)u.push(f(n[i]));var o=r.Buffer.concat(u);return r.Buffer.concat([e(o.length,192),o])}var a=t(n);return 1===a.length&&a[0]<128?a:r.Buffer.concat([e(a.length,128),a])},exports.getLength=function(e){if(!e||0===e.length)return r.Buffer.from([]);var f=t(e),n=f[0];if(n<=127)return f.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var u=n-246;return u+function(r,e){if("00"===r.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(r,16)}(f.slice(1,u).toString("hex"))},exports.toBuffer=t;
var buffer = require('buffer');
/**
* Built on top of rlp library, removing the BN dependency for the flow.
* Package : https://github.com/ethereumjs/rlp
* RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE
*
* ethereumjs/rlp is licensed under the
* Mozilla Public License 2.0
* Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
**/
/**
* @param input - will be converted to buffer
* @returns returns buffer of encoded data
**/
function encode(input) {
if (Array.isArray(input)) {
var output = [];
for (var i = 0; i < input.length; i++) {
output.push(encode(input[i]));
}
var buf = buffer.Buffer.concat(output);
return buffer.Buffer.concat([encodeLength(buf.length, 192), buf]);
} else {
var inputBuf = toBuffer(input);
return inputBuf.length === 1 && inputBuf[0] < 128 ? inputBuf : buffer.Buffer.concat([encodeLength(inputBuf.length, 128), inputBuf]);
}
}
/**
* Parse integers. Check if there is no leading zeros
* @param v The value to parse
* @param base The base to parse the integer into
*/
function safeParseInt(v, base) {
if (v.slice(0, 2) === "00") {
throw new Error("invalid RLP: extra zeros");
}
return parseInt(v, base);
}
function encodeLength(len, offset) {
if (len < 56) {
return buffer.Buffer.from([len + offset]);
} else {
var hexLength = intToHex(len);
var lLength = hexLength.length / 2;
var firstByte = intToHex(offset + 55 + lLength);
return buffer.Buffer.from(firstByte + hexLength, "hex");
}
}
/**
* Get the length of the RLP input
* @param input
* @returns The length of the input or an empty Buffer if no input
*/
function getLength(input) {
if (!input || input.length === 0) {
return buffer.Buffer.from([]);
}
var inputBuffer = toBuffer(input);
var firstByte = inputBuffer[0];
if (firstByte <= 0x7f) {
return inputBuffer.length;
} else if (firstByte <= 0xb7) {
return firstByte - 0x7f;
} else if (firstByte <= 0xbf) {
return firstByte - 0xb6;
} else if (firstByte <= 0xf7) {
// a list between 0-55 bytes long
return firstByte - 0xbf;
} else {
// a list over 55 bytes long
var llength = firstByte - 0xf6;
var length = safeParseInt(inputBuffer.slice(1, llength).toString("hex"), 16);
return llength + length;
}
}
/** Check if a string is prefixed by 0x */
function isHexPrefixed(str) {
return str.slice(0, 2) === "0x";
}
/** Removes 0x from a given String */
function stripHexPrefix(str) {
if (typeof str !== "string") {
return str;
}
return isHexPrefixed(str) ? str.slice(2) : str;
}
/** Transform an integer into its hexadecimal value */
function intToHex(integer) {
if (integer < 0) {
throw new Error("Invalid integer as argument, must be unsigned!");
}
var hex = integer.toString(16);
return hex.length % 2 ? "0" + hex : hex;
}
/** Pad a string to be even */
function padToEven(a) {
return a.length % 2 ? "0" + a : a;
}
/** Transform an integer into a Buffer */
function intToBuffer(integer) {
var hex = intToHex(integer);
return buffer.Buffer.from(hex, "hex");
}
/** Transform anything into a Buffer */
function toBuffer(v) {
if (!buffer.Buffer.isBuffer(v)) {
if (typeof v === "string") {
if (isHexPrefixed(v)) {
return buffer.Buffer.from(padToEven(stripHexPrefix(v)), "hex");
} else {
return buffer.Buffer.from(v);
}
} else if (typeof v === "number") {
if (!v) {
return buffer.Buffer.from([]);
} else {
return intToBuffer(v);
}
} else if (v === null || v === undefined) {
return buffer.Buffer.from([]);
} else if (v instanceof Uint8Array) {
return buffer.Buffer.from(v);
} else {
throw new Error("invalid type");
}
}
return v;
}
Object.defineProperty(exports, 'Buffer', {
enumerable: true,
get: function () {
return buffer.Buffer;
}
});
exports.encode = encode;
exports.getLength = getLength;
exports.toBuffer = toBuffer;
//# sourceMappingURL=rlp.js.map

@@ -1,2 +0,159 @@

import{Buffer as r}from"buffer";export{Buffer}from"buffer";function n(e){if(Array.isArray(e)){for(var f=[],i=0;i<e.length;i++)f.push(n(e[i]));var u=r.concat(f);return r.concat([t(u.length,192),u])}var a=o(e);return 1===a.length&&a[0]<128?a:r.concat([t(a.length,128),a])}function t(n,t){if(n<56)return r.from([n+t]);var e=i(n),f=i(t+55+e.length/2);return r.from(f+e,"hex")}function e(n){if(!n||0===n.length)return r.from([]);var t=o(n),e=t[0];if(e<=127)return t.length;if(e<=183)return e-127;if(e<=191)return e-182;if(e<=247)return e-191;var f=e-246;return f+function(r,n){if("00"===r.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(r,16)}(t.slice(1,f).toString("hex"))}function f(r){return"0x"===r.slice(0,2)}function i(r){if(r<0)throw new Error("Invalid integer as argument, must be unsigned!");var n=r.toString(16);return n.length%2?"0"+n:n}function o(n){if(!r.isBuffer(n)){if("string"==typeof n)return f(n)?r.from((e="string"!=typeof(o=n)?o:f(o)?o.slice(2):o).length%2?"0"+e:e,"hex"):r.from(n);if("number"==typeof n)return n?(t=i(n),r.from(t,"hex")):r.from([]);if(null==n)return r.from([]);if(n instanceof Uint8Array)return r.from(n);throw new Error("invalid type")}var t,e,o;return n}export{n as encode,e as getLength,o as toBuffer};
import { Buffer } from 'buffer';
export { Buffer } from 'buffer';
/**
* Built on top of rlp library, removing the BN dependency for the flow.
* Package : https://github.com/ethereumjs/rlp
* RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE
*
* ethereumjs/rlp is licensed under the
* Mozilla Public License 2.0
* Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
**/
/**
* @param input - will be converted to buffer
* @returns returns buffer of encoded data
**/
function encode(input) {
if (Array.isArray(input)) {
var output = [];
for (var i = 0; i < input.length; i++) {
output.push(encode(input[i]));
}
var buf = Buffer.concat(output);
return Buffer.concat([encodeLength(buf.length, 192), buf]);
} else {
var inputBuf = toBuffer(input);
return inputBuf.length === 1 && inputBuf[0] < 128 ? inputBuf : Buffer.concat([encodeLength(inputBuf.length, 128), inputBuf]);
}
}
/**
* Parse integers. Check if there is no leading zeros
* @param v The value to parse
* @param base The base to parse the integer into
*/
function safeParseInt(v, base) {
if (v.slice(0, 2) === "00") {
throw new Error("invalid RLP: extra zeros");
}
return parseInt(v, base);
}
function encodeLength(len, offset) {
if (len < 56) {
return Buffer.from([len + offset]);
} else {
var hexLength = intToHex(len);
var lLength = hexLength.length / 2;
var firstByte = intToHex(offset + 55 + lLength);
return Buffer.from(firstByte + hexLength, "hex");
}
}
/**
* Get the length of the RLP input
* @param input
* @returns The length of the input or an empty Buffer if no input
*/
function getLength(input) {
if (!input || input.length === 0) {
return Buffer.from([]);
}
var inputBuffer = toBuffer(input);
var firstByte = inputBuffer[0];
if (firstByte <= 0x7f) {
return inputBuffer.length;
} else if (firstByte <= 0xb7) {
return firstByte - 0x7f;
} else if (firstByte <= 0xbf) {
return firstByte - 0xb6;
} else if (firstByte <= 0xf7) {
// a list between 0-55 bytes long
return firstByte - 0xbf;
} else {
// a list over 55 bytes long
var llength = firstByte - 0xf6;
var length = safeParseInt(inputBuffer.slice(1, llength).toString("hex"), 16);
return llength + length;
}
}
/** Check if a string is prefixed by 0x */
function isHexPrefixed(str) {
return str.slice(0, 2) === "0x";
}
/** Removes 0x from a given String */
function stripHexPrefix(str) {
if (typeof str !== "string") {
return str;
}
return isHexPrefixed(str) ? str.slice(2) : str;
}
/** Transform an integer into its hexadecimal value */
function intToHex(integer) {
if (integer < 0) {
throw new Error("Invalid integer as argument, must be unsigned!");
}
var hex = integer.toString(16);
return hex.length % 2 ? "0" + hex : hex;
}
/** Pad a string to be even */
function padToEven(a) {
return a.length % 2 ? "0" + a : a;
}
/** Transform an integer into a Buffer */
function intToBuffer(integer) {
var hex = intToHex(integer);
return Buffer.from(hex, "hex");
}
/** Transform anything into a Buffer */
function toBuffer(v) {
if (!Buffer.isBuffer(v)) {
if (typeof v === "string") {
if (isHexPrefixed(v)) {
return Buffer.from(padToEven(stripHexPrefix(v)), "hex");
} else {
return Buffer.from(v);
}
} else if (typeof v === "number") {
if (!v) {
return Buffer.from([]);
} else {
return intToBuffer(v);
}
} else if (v === null || v === undefined) {
return Buffer.from([]);
} else if (v instanceof Uint8Array) {
return Buffer.from(v);
} else {
throw new Error("invalid type");
}
}
return v;
}
export { encode, getLength, toBuffer };
//# sourceMappingURL=rlp.modern.js.map

@@ -1,2 +0,159 @@

import{Buffer as r}from"buffer";export{Buffer}from"buffer";function n(e){if(Array.isArray(e)){for(var f=[],i=0;i<e.length;i++)f.push(n(e[i]));var u=r.concat(f);return r.concat([t(u.length,192),u])}var a=o(e);return 1===a.length&&a[0]<128?a:r.concat([t(a.length,128),a])}function t(n,t){if(n<56)return r.from([n+t]);var e=i(n),f=i(t+55+e.length/2);return r.from(f+e,"hex")}function e(n){if(!n||0===n.length)return r.from([]);var t=o(n),e=t[0];if(e<=127)return t.length;if(e<=183)return e-127;if(e<=191)return e-182;if(e<=247)return e-191;var f=e-246;return f+function(r,n){if("00"===r.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(r,16)}(t.slice(1,f).toString("hex"))}function f(r){return"0x"===r.slice(0,2)}function i(r){if(r<0)throw new Error("Invalid integer as argument, must be unsigned!");var n=r.toString(16);return n.length%2?"0"+n:n}function o(n){if(!r.isBuffer(n)){if("string"==typeof n)return f(n)?r.from((e="string"!=typeof(o=n)?o:f(o)?o.slice(2):o).length%2?"0"+e:e,"hex"):r.from(n);if("number"==typeof n)return n?(t=i(n),r.from(t,"hex")):r.from([]);if(null==n)return r.from([]);if(n instanceof Uint8Array)return r.from(n);throw new Error("invalid type")}var t,e,o;return n}export{n as encode,e as getLength,o as toBuffer};
import { Buffer } from 'buffer';
export { Buffer } from 'buffer';
/**
* Built on top of rlp library, removing the BN dependency for the flow.
* Package : https://github.com/ethereumjs/rlp
* RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE
*
* ethereumjs/rlp is licensed under the
* Mozilla Public License 2.0
* Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
**/
/**
* @param input - will be converted to buffer
* @returns returns buffer of encoded data
**/
function encode(input) {
if (Array.isArray(input)) {
var output = [];
for (var i = 0; i < input.length; i++) {
output.push(encode(input[i]));
}
var buf = Buffer.concat(output);
return Buffer.concat([encodeLength(buf.length, 192), buf]);
} else {
var inputBuf = toBuffer(input);
return inputBuf.length === 1 && inputBuf[0] < 128 ? inputBuf : Buffer.concat([encodeLength(inputBuf.length, 128), inputBuf]);
}
}
/**
* Parse integers. Check if there is no leading zeros
* @param v The value to parse
* @param base The base to parse the integer into
*/
function safeParseInt(v, base) {
if (v.slice(0, 2) === "00") {
throw new Error("invalid RLP: extra zeros");
}
return parseInt(v, base);
}
function encodeLength(len, offset) {
if (len < 56) {
return Buffer.from([len + offset]);
} else {
var hexLength = intToHex(len);
var lLength = hexLength.length / 2;
var firstByte = intToHex(offset + 55 + lLength);
return Buffer.from(firstByte + hexLength, "hex");
}
}
/**
* Get the length of the RLP input
* @param input
* @returns The length of the input or an empty Buffer if no input
*/
function getLength(input) {
if (!input || input.length === 0) {
return Buffer.from([]);
}
var inputBuffer = toBuffer(input);
var firstByte = inputBuffer[0];
if (firstByte <= 0x7f) {
return inputBuffer.length;
} else if (firstByte <= 0xb7) {
return firstByte - 0x7f;
} else if (firstByte <= 0xbf) {
return firstByte - 0xb6;
} else if (firstByte <= 0xf7) {
// a list between 0-55 bytes long
return firstByte - 0xbf;
} else {
// a list over 55 bytes long
var llength = firstByte - 0xf6;
var length = safeParseInt(inputBuffer.slice(1, llength).toString("hex"), 16);
return llength + length;
}
}
/** Check if a string is prefixed by 0x */
function isHexPrefixed(str) {
return str.slice(0, 2) === "0x";
}
/** Removes 0x from a given String */
function stripHexPrefix(str) {
if (typeof str !== "string") {
return str;
}
return isHexPrefixed(str) ? str.slice(2) : str;
}
/** Transform an integer into its hexadecimal value */
function intToHex(integer) {
if (integer < 0) {
throw new Error("Invalid integer as argument, must be unsigned!");
}
var hex = integer.toString(16);
return hex.length % 2 ? "0" + hex : hex;
}
/** Pad a string to be even */
function padToEven(a) {
return a.length % 2 ? "0" + a : a;
}
/** Transform an integer into a Buffer */
function intToBuffer(integer) {
var hex = intToHex(integer);
return Buffer.from(hex, "hex");
}
/** Transform anything into a Buffer */
function toBuffer(v) {
if (!Buffer.isBuffer(v)) {
if (typeof v === "string") {
if (isHexPrefixed(v)) {
return Buffer.from(padToEven(stripHexPrefix(v)), "hex");
} else {
return Buffer.from(v);
}
} else if (typeof v === "number") {
if (!v) {
return Buffer.from([]);
} else {
return intToBuffer(v);
}
} else if (v === null || v === undefined) {
return Buffer.from([]);
} else if (v instanceof Uint8Array) {
return Buffer.from(v);
} else {
throw new Error("invalid type");
}
}
return v;
}
export { encode, getLength, toBuffer };
//# sourceMappingURL=rlp.module.js.map

@@ -1,2 +0,171 @@

!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("buffer")):"function"==typeof define&&define.amd?define(["exports","buffer"],e):e((r=r||self).rlp={},r.buffer)}(this,function(r,e){function f(r,f){if(r<56)return e.Buffer.from([r+f]);var n=t(r),u=t(f+55+n.length/2);return e.Buffer.from(u+n,"hex")}function n(r){return"0x"===r.slice(0,2)}function t(r){if(r<0)throw new Error("Invalid integer as argument, must be unsigned!");var e=r.toString(16);return e.length%2?"0"+e:e}function u(r){if(!e.Buffer.isBuffer(r)){if("string"==typeof r)return n(r)?e.Buffer.from((u="string"!=typeof(i=r)?i:n(i)?i.slice(2):i).length%2?"0"+u:u,"hex"):e.Buffer.from(r);if("number"==typeof r)return r?(f=t(r),e.Buffer.from(f,"hex")):e.Buffer.from([]);if(null==r)return e.Buffer.from([]);if(r instanceof Uint8Array)return e.Buffer.from(r);throw new Error("invalid type")}var f,u,i;return r}Object.defineProperty(r,"Buffer",{enumerable:!0,get:function(){return e.Buffer}}),r.encode=function r(n){if(Array.isArray(n)){for(var t=[],i=0;i<n.length;i++)t.push(r(n[i]));var o=e.Buffer.concat(t);return e.Buffer.concat([f(o.length,192),o])}var c=u(n);return 1===c.length&&c[0]<128?c:e.Buffer.concat([f(c.length,128),c])},r.getLength=function(r){if(!r||0===r.length)return e.Buffer.from([]);var f=u(r),n=f[0];if(n<=127)return f.length;if(n<=183)return n-127;if(n<=191)return n-182;if(n<=247)return n-191;var t=n-246;return t+function(r,e){if("00"===r.slice(0,2))throw new Error("invalid RLP: extra zeros");return parseInt(r,16)}(f.slice(1,t).toString("hex"))},r.toBuffer=u});
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('buffer')) :
typeof define === 'function' && define.amd ? define(['exports', 'buffer'], factory) :
(global = global || self, factory(global.rlp = {}, global.buffer));
}(this, (function (exports, buffer) {
/**
* Built on top of rlp library, removing the BN dependency for the flow.
* Package : https://github.com/ethereumjs/rlp
* RLP License : https://github.com/ethereumjs/rlp/blob/master/LICENSE
*
* ethereumjs/rlp is licensed under the
* Mozilla Public License 2.0
* Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.
**/
/**
* @param input - will be converted to buffer
* @returns returns buffer of encoded data
**/
function encode(input) {
if (Array.isArray(input)) {
var output = [];
for (var i = 0; i < input.length; i++) {
output.push(encode(input[i]));
}
var buf = buffer.Buffer.concat(output);
return buffer.Buffer.concat([encodeLength(buf.length, 192), buf]);
} else {
var inputBuf = toBuffer(input);
return inputBuf.length === 1 && inputBuf[0] < 128 ? inputBuf : buffer.Buffer.concat([encodeLength(inputBuf.length, 128), inputBuf]);
}
}
/**
* Parse integers. Check if there is no leading zeros
* @param v The value to parse
* @param base The base to parse the integer into
*/
function safeParseInt(v, base) {
if (v.slice(0, 2) === "00") {
throw new Error("invalid RLP: extra zeros");
}
return parseInt(v, base);
}
function encodeLength(len, offset) {
if (len < 56) {
return buffer.Buffer.from([len + offset]);
} else {
var hexLength = intToHex(len);
var lLength = hexLength.length / 2;
var firstByte = intToHex(offset + 55 + lLength);
return buffer.Buffer.from(firstByte + hexLength, "hex");
}
}
/**
* Get the length of the RLP input
* @param input
* @returns The length of the input or an empty Buffer if no input
*/
function getLength(input) {
if (!input || input.length === 0) {
return buffer.Buffer.from([]);
}
var inputBuffer = toBuffer(input);
var firstByte = inputBuffer[0];
if (firstByte <= 0x7f) {
return inputBuffer.length;
} else if (firstByte <= 0xb7) {
return firstByte - 0x7f;
} else if (firstByte <= 0xbf) {
return firstByte - 0xb6;
} else if (firstByte <= 0xf7) {
// a list between 0-55 bytes long
return firstByte - 0xbf;
} else {
// a list over 55 bytes long
var llength = firstByte - 0xf6;
var length = safeParseInt(inputBuffer.slice(1, llength).toString("hex"), 16);
return llength + length;
}
}
/** Check if a string is prefixed by 0x */
function isHexPrefixed(str) {
return str.slice(0, 2) === "0x";
}
/** Removes 0x from a given String */
function stripHexPrefix(str) {
if (typeof str !== "string") {
return str;
}
return isHexPrefixed(str) ? str.slice(2) : str;
}
/** Transform an integer into its hexadecimal value */
function intToHex(integer) {
if (integer < 0) {
throw new Error("Invalid integer as argument, must be unsigned!");
}
var hex = integer.toString(16);
return hex.length % 2 ? "0" + hex : hex;
}
/** Pad a string to be even */
function padToEven(a) {
return a.length % 2 ? "0" + a : a;
}
/** Transform an integer into a Buffer */
function intToBuffer(integer) {
var hex = intToHex(integer);
return buffer.Buffer.from(hex, "hex");
}
/** Transform anything into a Buffer */
function toBuffer(v) {
if (!buffer.Buffer.isBuffer(v)) {
if (typeof v === "string") {
if (isHexPrefixed(v)) {
return buffer.Buffer.from(padToEven(stripHexPrefix(v)), "hex");
} else {
return buffer.Buffer.from(v);
}
} else if (typeof v === "number") {
if (!v) {
return buffer.Buffer.from([]);
} else {
return intToBuffer(v);
}
} else if (v === null || v === undefined) {
return buffer.Buffer.from([]);
} else if (v instanceof Uint8Array) {
return buffer.Buffer.from(v);
} else {
throw new Error("invalid type");
}
}
return v;
}
Object.defineProperty(exports, 'Buffer', {
enumerable: true,
get: function () {
return buffer.Buffer;
}
});
exports.encode = encode;
exports.getLength = getLength;
exports.toBuffer = toBuffer;
})));
//# sourceMappingURL=rlp.umd.js.map

4

package.json
{
"name": "@onflow/rlp",
"version": "1.0.0-alpha.0",
"version": "1.0.0-alpha.1",
"description": "Port of ethereumjs/rlp",

@@ -32,3 +32,3 @@ "license": "MPL-2.0",

"test": "jest",
"build": "microbundle",
"build": "microbundle --no-compress",
"test:watch": "jest --watch",

@@ -35,0 +35,0 @@ "start": "microbundle watch"

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc