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

@mysten/bcs

Package Overview
Dependencies
Maintainers
7
Versions
522
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/bcs - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

CHANGELOG.md
# Change Log
## 1.1.1
### Patch Changes
- 1dd7713: Accept arrays of numbers when serializing bcs.bytes()
## 1.1.0

@@ -4,0 +10,0 @@

2

dist/cjs/bcs.d.ts

@@ -59,3 +59,3 @@ import type { BcsTypeOptions } from './bcs-type.js';

*/
bytes<T extends number>(size: T, options?: BcsTypeOptions<Uint8Array, Iterable<number>>): BcsType<Uint8Array, Uint8Array>;
bytes<T extends number>(size: T, options?: BcsTypeOptions<Uint8Array, Iterable<number>>): BcsType<Uint8Array, Iterable<number>>;
/**

@@ -62,0 +62,0 @@ * Creates a BcsType that can ser/de string values. Strings will be UTF-8 encoded

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

write: (value, writer) => {
const array = new Uint8Array(value);
for (let i = 0; i < size; i++) {
writer.write8(value[i] ?? 0);
writer.write8(array[i] ?? 0);
}

@@ -168,0 +169,0 @@ },

@@ -59,3 +59,3 @@ import type { BcsTypeOptions } from './bcs-type.js';

*/
bytes<T extends number>(size: T, options?: BcsTypeOptions<Uint8Array, Iterable<number>>): BcsType<Uint8Array, Uint8Array>;
bytes<T extends number>(size: T, options?: BcsTypeOptions<Uint8Array, Iterable<number>>): BcsType<Uint8Array, Iterable<number>>;
/**

@@ -62,0 +62,0 @@ * Creates a BcsType that can ser/de string values. Strings will be UTF-8 encoded

@@ -149,4 +149,5 @@ import {

write: (value, writer) => {
const array = new Uint8Array(value);
for (let i = 0; i < size; i++) {
writer.write8(value[i] ?? 0);
writer.write8(array[i] ?? 0);
}

@@ -153,0 +154,0 @@ },

{
"name": "@mysten/bcs",
"version": "1.1.0",
"version": "1.1.1",
"description": "BCS - Canonical Binary Serialization implementation for JavaScript",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

@@ -158,3 +158,3 @@ // Copyright (c) Mysten Labs, Inc.

bytes<T extends number>(size: T, options?: BcsTypeOptions<Uint8Array, Iterable<number>>) {
return fixedSizeBcsType<Uint8Array>({
return fixedSizeBcsType<Uint8Array, Iterable<number>>({
name: `bytes[${size}]`,

@@ -164,4 +164,5 @@ size,

write: (value, writer) => {
const array = new Uint8Array(value);
for (let i = 0; i < size; i++) {
writer.write8(value[i] ?? 0);
writer.write8(array[i] ?? 0);
}

@@ -168,0 +169,0 @@ },

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