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

@mysten/sui

Package Overview
Dependencies
Maintainers
0
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/sui - npm Package Compare versions

Comparing version

to
1.22.0

11

CHANGELOG.md
# @mysten/sui.js
## 1.22.0
### Minor Changes
- 03975f4: replace bs58 and bech32 packages with @scure/base
### Patch Changes
- Updated dependencies [03975f4]
- @mysten/bcs@1.5.0
## 1.21.2

@@ -4,0 +15,0 @@

8

dist/cjs/cryptography/keypair.js

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

var import_blake2b = require("@noble/hashes/blake2b");
var import_bech32 = require("bech32");
var import_base = require("@scure/base");
var import_intent = require("./intent.js");

@@ -84,7 +84,7 @@ var import_signature_scheme = require("./signature-scheme.js");

function decodeSuiPrivateKey(value) {
const { prefix, words } = import_bech32.bech32.decode(value);
const { prefix, words } = import_base.bech32.decode(value);
if (prefix !== SUI_PRIVATE_KEY_PREFIX) {
throw new Error("invalid private key prefix");
}
const extendedSecretKey = new Uint8Array(import_bech32.bech32.fromWords(words));
const extendedSecretKey = new Uint8Array(import_base.bech32.fromWords(words));
const secretKey = extendedSecretKey.slice(1);

@@ -105,4 +105,4 @@ const signatureScheme = import_signature_scheme.SIGNATURE_FLAG_TO_SCHEME[extendedSecretKey[0]];

privKeyBytes.set(bytes, 1);
return import_bech32.bech32.encode(SUI_PRIVATE_KEY_PREFIX, import_bech32.bech32.toWords(privKeyBytes));
return import_base.bech32.encode(SUI_PRIVATE_KEY_PREFIX, import_base.bech32.toWords(privKeyBytes));
}
//# sourceMappingURL=keypair.js.map

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

export declare const PACKAGE_VERSION = "1.21.2";
export declare const TARGETED_RPC_VERSION = "1.43.0";
export declare const PACKAGE_VERSION = "1.22.0";
export declare const TARGETED_RPC_VERSION = "1.45.0";

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

module.exports = __toCommonJS(version_exports);
const PACKAGE_VERSION = "1.21.2";
const TARGETED_RPC_VERSION = "1.43.0";
const PACKAGE_VERSION = "1.22.0";
const TARGETED_RPC_VERSION = "1.45.0";
//# sourceMappingURL=version.js.map
import { bcs, toBase64 } from "@mysten/bcs";
import { blake2b } from "@noble/hashes/blake2b";
import { bech32 } from "bech32";
import { bech32 } from "@scure/base";
import { messageWithIntent } from "./intent.js";

@@ -5,0 +5,0 @@ import { SIGNATURE_FLAG_TO_SCHEME, SIGNATURE_SCHEME_TO_FLAG } from "./signature-scheme.js";

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

export declare const PACKAGE_VERSION = "1.21.2";
export declare const TARGETED_RPC_VERSION = "1.43.0";
export declare const PACKAGE_VERSION = "1.22.0";
export declare const TARGETED_RPC_VERSION = "1.45.0";

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

const PACKAGE_VERSION = "1.21.2";
const TARGETED_RPC_VERSION = "1.43.0";
const PACKAGE_VERSION = "1.22.0";
const TARGETED_RPC_VERSION = "1.45.0";
export {

@@ -4,0 +4,0 @@ PACKAGE_VERSION,

@@ -6,3 +6,3 @@ {

"homepage": "https://sdk.mystenlabs.com",
"version": "1.21.2",
"version": "1.22.0",
"license": "Apache-2.0",

@@ -137,6 +137,5 @@ "sideEffects": false,

"@noble/hashes": "^1.4.0",
"@scure/base": "^1.2.4",
"@scure/bip32": "^1.4.0",
"@scure/bip39": "^1.3.0",
"@suchipi/femver": "^1.0.0",
"bech32": "^2.0.0",
"gql.tada": "^1.8.2",

@@ -147,3 +146,3 @@ "graphql": "^16.9.0",

"valibot": "^0.36.0",
"@mysten/bcs": "1.4.0"
"@mysten/bcs": "1.5.0"
},

@@ -150,0 +149,0 @@ "scripts": {

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

import { blake2b } from '@noble/hashes/blake2b';
import { bech32 } from 'bech32';
import { bech32 } from '@scure/base';

@@ -103,3 +103,3 @@ import type { IntentScope } from './intent.js';

export function decodeSuiPrivateKey(value: string): ParsedKeypair {
const { prefix, words } = bech32.decode(value);
const { prefix, words } = bech32.decode(value as `${string}1${string}`);
if (prefix !== SUI_PRIVATE_KEY_PREFIX) {

@@ -106,0 +106,0 @@ throw new Error('invalid private key prefix');

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

export const PACKAGE_VERSION = '1.21.2';
export const TARGETED_RPC_VERSION = '1.43.0';
export const PACKAGE_VERSION = '1.22.0';
export const TARGETED_RPC_VERSION = '1.45.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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet