New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ckb-lumos/toolkit

Package Overview
Dependencies
Maintainers
0
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckb-lumos/toolkit - npm Package Compare versions

Comparing version 0.0.0-canary-a49c050-20230723075710 to 0.0.0-canary-ad0f66d-20240701081046

7

lib/index.js

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

exports.validators = _validators;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
const VERSION = "__development_build__";
exports.VERSION = VERSION;
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const VERSION = exports.VERSION = "__development_build__";
//# sourceMappingURL=index.js.map

@@ -19,5 +19,4 @@ "use strict";

exports.NormalizeWitnessArgs = NormalizeWitnessArgs;
var _jsbi = _interopRequireDefault(require("jsbi"));
var _bi = require("@ckb-lumos/bi");
var _reader = require("./reader");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// This package provides normalizer functions. Even though CKB uses molecule

@@ -42,3 +41,3 @@ // as the serialization layer. There is still CKB specific knowledge that does

if (!(value instanceof ArrayBuffer)) {
let intValue = _jsbi.default.BigInt(value).toString(16);
let intValue = _bi.BI.from(value).toString(16);
if (intValue.length % 2 !== 0) {

@@ -84,3 +83,3 @@ intValue = "0" + intValue;

const value = object[key];
if (!value) {
if (value == null) {
throw new Error(`${debugPath} is missing ${key}!`);

@@ -108,2 +107,4 @@ }

return 2;
case "data2":
return 4;
case 0:

@@ -115,2 +116,4 @@ return value;

return value;
case 4:
return value;
default:

@@ -117,0 +120,0 @@ throw new Error(`${debugPath}.hashType has invalid value: ${value}`);

@@ -19,4 +19,4 @@ "use strict";

var validators = _interopRequireWildcard(require("./validators"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// This package provides transformer functions that transform JavaScript objects

@@ -23,0 +23,0 @@ // into JSON ready objects that can be passed to RPC. It following the following

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

assertHexString(`${debugPath}.args`, script.args);
if (script.hashType !== "data" && script.hashType !== "type" && script.hashType !== "data1") {
if (script.hashType !== "data" && script.hashType !== "type" && script.hashType !== "data1" && script.hashType !== "data2") {
throw new Error(`${debugPath}.hashType must be either data or type!`);

@@ -75,0 +75,0 @@ }

{
"name": "@ckb-lumos/toolkit",
"version": "0.0.0-canary-a49c050-20230723075710",
"version": "0.0.0-canary-ad0f66d-20240701081046",
"description": "JavaScript toolkits used to build dapps for Nervos CKB",

@@ -20,13 +20,11 @@ "main": "lib/index.js",

"license": "MIT",
"peerDependencies": {
"cross-fetch": "^3.1.4",
"jsbi": "^4.1.0"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@ckb-lumos/bi": "0.0.0-canary-ad0f66d-20240701081046"
},
"devDependencies": {
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-transform-modules-commonjs": "^7.21.5",
"jsbi": "^4.1.0"
"@babel/plugin-transform-modules-commonjs": "^7.21.5"
},

@@ -33,0 +31,0 @@ "scripts": {

@@ -7,7 +7,7 @@ export type HexString = string;

export type PackedDao = string;
export type Address = string;
export type HexadecimalRange = [Hexadecimal, Hexadecimal];
export interface Header {

@@ -28,3 +28,3 @@ timestamp: HexNumber;

export type HashType = "type" | "data" | "data1";
export type HashType = "type" | "data" | "data1" | "data2";
export interface Script {

@@ -31,0 +31,0 @@ codeHash: Hash;

@@ -1,3 +0,1 @@

import JSBI from "jsbi";
export * as validators from "./validators";

@@ -23,11 +21,2 @@

*/
export function HexStringToBigInt(hexString: string): JSBI;
/**
* @deprecated please follow the {@link https://lumos-website.vercel.app/migrations/migrate-to-v0.19 migration-guide}
*/
export function BigIntToHexString(i: JSBI): string;
/**
* @deprecated please follow the {@link https://lumos-website.vercel.app/migrations/migrate-to-v0.19 migration-guide}
*/
export interface TransformerOptions {

@@ -34,0 +23,0 @@ validation?: boolean;

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc