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

@ckb-lumos/base

Package Overview
Dependencies
Maintainers
3
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckb-lumos/base - npm Package Compare versions

Comparing version 0.0.0-ckb2023-4d2367a-20230803074047 to 0.0.0-ckb2023-72bca3f-20230926123805

9

lib/api.d.ts

@@ -64,5 +64,7 @@ import { Hash, Hexadecimal, HexNumber, HexString, PackedSince } from "./primitive";

}
type Status = "pending" | "proposed" | "committed" | "unknown" | "rejected";
export interface TxStatus {
status: Status;
blockHash?: Hash;
status: string;
reason?: string;
}

@@ -171,6 +173,3 @@ export interface TransactionWithStatus<Tx = Transaction> {

}
export type HardForks = {
ckb2021: HardforkFeature[];
ckb2023: HardforkFeature[];
};
export type HardForks = HardforkFeature[];
export interface HardforkFeature {

@@ -177,0 +176,0 @@ rfc: string;

@@ -56,2 +56,12 @@ import { AnyCodec, BytesLike, PackParam, UnpackResult } from "@ckb-lumos/codec";

/**
* <pre>
* 0b0000000 0
* ───┬─── │
* │ ▼
* │ type - use the default vm version
* │
* ▼
* data* - use a particular vm version
* </pre>
*
* Implementation of blockchain.mol

@@ -58,0 +68,0 @@ * https://github.com/nervosnetwork/ckb/blob/5a7efe7a0b720de79ff3761dc6e8424b8d5b22ea/util/types/schemas/blockchain.mol

@@ -90,2 +90,12 @@ "use strict";

/**
* <pre>
* 0b0000000 0
* ───┬─── │
* │ ▼
* │ type - use the default vm version
* │
* ▼
* data* - use a particular vm version
* </pre>
*
* Implementation of blockchain.mol

@@ -98,6 +108,8 @@ * https://github.com/nervosnetwork/ckb/blob/5a7efe7a0b720de79ff3761dc6e8424b8d5b22ea/util/types/schemas/blockchain.mol

pack: type => {
if (type === "data") return Uint8.pack(0);
if (type === "type") return Uint8.pack(1);
if (type === "data1") return Uint8.pack(2);
if (type === "data2") return Uint8.pack(3);
// prettier-ignore
if (type === "type") return Uint8.pack(0b0000000_1);
// prettier-ignore
if (type === "data") return Uint8.pack(0b0000000_0);
if (type === "data1") return Uint8.pack(0b0000001_0);
if (type === "data2") return Uint8.pack(0b0000010_0);
throw new Error(`Invalid hash type: ${type}`);

@@ -107,6 +119,6 @@ },

const hashTypeBuf = Uint8.unpack(buf);
if (hashTypeBuf === 0) return "data";
if (hashTypeBuf === 1) return "type";
if (hashTypeBuf === 2) return "data1";
if (hashTypeBuf === 3) return "data2";
if (hashTypeBuf === 0b0000000_1) return "type";
if (hashTypeBuf === 0b0000000_0) return "data";
if (hashTypeBuf === 0b0000001_0) return "data1";
if (hashTypeBuf === 0b0000010_0) return "data2";
throw new Error(`Invalid hash type: ${hashTypeBuf}`);

@@ -113,0 +125,0 @@ }

{
"name": "@ckb-lumos/base",
"version": "0.0.0-ckb2023-4d2367a-20230803074047",
"version": "0.0.0-ckb2023-72bca3f-20230926123805",
"description": "Base data structures and utilities used in lumos",

@@ -38,5 +38,5 @@ "author": "Xuejie Xiao <xxuejie@gmail.com>",

"dependencies": {
"@ckb-lumos/bi": "0.0.0-ckb2023-4d2367a-20230803074047",
"@ckb-lumos/codec": "0.0.0-ckb2023-4d2367a-20230803074047",
"@ckb-lumos/toolkit": "0.0.0-ckb2023-4d2367a-20230803074047",
"@ckb-lumos/bi": "0.0.0-ckb2023-72bca3f-20230926123805",
"@ckb-lumos/codec": "0.0.0-ckb2023-72bca3f-20230926123805",
"@ckb-lumos/toolkit": "0.0.0-ckb2023-72bca3f-20230926123805",
"@types/blake2b": "^2.1.0",

@@ -43,0 +43,0 @@ "@types/lodash.isequal": "^4.5.5",

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