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

@mysten/sui.js

Package Overview
Dependencies
Maintainers
4
Versions
895
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/sui.js - npm Package Compare versions

Comparing version 0.0.0-experimental-20240208033317 to 0.0.0-experimental-20240208220153

dist/cjs/graphql/client.d.ts

12

CHANGELOG.md
# @mysten/sui.js
## 0.0.0-experimental-20240208033317
## 0.0.0-experimental-20240208220153
### Patch Changes
- 4830361fa4: Updated typescript version
- Updated dependencies [4830361fa4]
- @mysten/bcs@0.0.0-experimental-20240208220153
## 0.50.0
### Minor Changes

@@ -17,3 +25,3 @@

- Updated dependencies [bae8802fe3]
- @mysten/bcs@0.0.0-experimental-20240208033317
- @mysten/bcs@0.11.0

@@ -20,0 +28,0 @@ ## 0.49.1

@@ -234,6 +234,26 @@ "use strict";

});
const SenderSignedData = import_bcs.bcs.struct("SenderSignedData", {
data: TransactionData,
txSignatures: import_bcs.bcs.vector(import_bcs.bcs.vector(import_bcs.bcs.u8()))
const IntentScope = import_bcs.bcs.enum("IntentScope", {
TransactionData: null,
TransactionEffects: null,
CheckpointSummary: null,
PersonalMessage: null
});
const IntentVersion = import_bcs.bcs.enum("IntentVersion", {
V0: null
});
const AppId = import_bcs.bcs.enum("AppId", {
Sui: null
});
const Intent = import_bcs.bcs.struct("Intent", {
scope: IntentScope,
version: IntentVersion,
appId: AppId
});
const IntentMessage = import_bcs.bcs.generic(
["T"],
(T) => import_bcs.bcs.struct("IntentMessage<T>", {
intent: Intent,
value: T
})
);
const CompressedSignature = import_bcs.bcs.enum("CompressedSignature", {

@@ -264,2 +284,13 @@ ED25519: import_bcs.bcs.fixedArray(64, import_bcs.bcs.u8()),

});
const base64String = import_bcs.bcs.vector(import_bcs.bcs.u8()).transform({
input: (val) => typeof val === "string" ? (0, import_bcs.fromB64)(val) : val,
output: (val) => (0, import_bcs.toB64)(new Uint8Array(val))
});
const SenderSignedTransaction = import_bcs.bcs.struct("SenderSignedTransaction", {
intentMessage: IntentMessage(TransactionData),
txSignatures: import_bcs.bcs.vector(base64String)
});
const SenderSignedData = import_bcs.bcs.vector(SenderSignedTransaction, {
name: "SenderSignedData"
});
const suiBcs = {

@@ -290,2 +321,3 @@ ...import_bcs.bcs,

SenderSignedData,
SenderSignedTransaction,
SharedObjectRef,

@@ -292,0 +324,0 @@ StructTag,

2

dist/cjs/utils/index.d.ts

@@ -13,3 +13,3 @@ import { formatAddress, formatDigest } from './format.js';

export declare const SUI_SYSTEM_MODULE_NAME = "sui_system";
export declare const SUI_TYPE_ARG: string;
export declare const SUI_TYPE_ARG = "0x2::sui::SUI";
export declare const SUI_SYSTEM_STATE_OBJECT_ID: string;

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

const { address, module: module2, name, typeParams } = typeof type === "string" ? parseStructTag(type) : type;
const formattedTypeParams = typeParams.length > 0 ? `<${typeParams.map(
const formattedTypeParams = typeParams?.length > 0 ? `<${typeParams.map(
(typeParam) => typeof typeParam === "string" ? typeParam : normalizeStructTag(typeParam)

@@ -72,0 +72,0 @@ ).join(",")}>` : "";

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

export declare const PACKAGE_VERSION = "0.0.0-experimental-20240208033317";
export declare const PACKAGE_VERSION = "0.0.0-experimental-20240208220153";
export declare const TARGETED_RPC_VERSION = "1.19.0";

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

module.exports = __toCommonJS(version_exports);
const PACKAGE_VERSION = "0.0.0-experimental-20240208033317";
const PACKAGE_VERSION = "0.0.0-experimental-20240208220153";
const TARGETED_RPC_VERSION = "1.19.0";
//# sourceMappingURL=version.js.map

@@ -5,5 +5,7 @@ import {

fromB58,
fromB64,
fromHEX,
getSuiMoveConfig,
toB58,
toB64,
toHEX

@@ -217,6 +219,26 @@ } from "@mysten/bcs";

});
const SenderSignedData = bcs.struct("SenderSignedData", {
data: TransactionData,
txSignatures: bcs.vector(bcs.vector(bcs.u8()))
const IntentScope = bcs.enum("IntentScope", {
TransactionData: null,
TransactionEffects: null,
CheckpointSummary: null,
PersonalMessage: null
});
const IntentVersion = bcs.enum("IntentVersion", {
V0: null
});
const AppId = bcs.enum("AppId", {
Sui: null
});
const Intent = bcs.struct("Intent", {
scope: IntentScope,
version: IntentVersion,
appId: AppId
});
const IntentMessage = bcs.generic(
["T"],
(T) => bcs.struct("IntentMessage<T>", {
intent: Intent,
value: T
})
);
const CompressedSignature = bcs.enum("CompressedSignature", {

@@ -247,2 +269,13 @@ ED25519: bcs.fixedArray(64, bcs.u8()),

});
const base64String = bcs.vector(bcs.u8()).transform({
input: (val) => typeof val === "string" ? fromB64(val) : val,
output: (val) => toB64(new Uint8Array(val))
});
const SenderSignedTransaction = bcs.struct("SenderSignedTransaction", {
intentMessage: IntentMessage(TransactionData),
txSignatures: bcs.vector(base64String)
});
const SenderSignedData = bcs.vector(SenderSignedTransaction, {
name: "SenderSignedData"
});
const suiBcs = {

@@ -273,2 +306,3 @@ ...bcs,

SenderSignedData,
SenderSignedTransaction,
SharedObjectRef,

@@ -275,0 +309,0 @@ StructTag,

@@ -13,3 +13,3 @@ import { formatAddress, formatDigest } from './format.js';

export declare const SUI_SYSTEM_MODULE_NAME = "sui_system";
export declare const SUI_TYPE_ARG: string;
export declare const SUI_TYPE_ARG = "0x2::sui::SUI";
export declare const SUI_SYSTEM_STATE_OBJECT_ID: string;

@@ -39,3 +39,3 @@ import { fromB58, splitGenericParameters } from "@mysten/bcs";

const { address, module, name, typeParams } = typeof type === "string" ? parseStructTag(type) : type;
const formattedTypeParams = typeParams.length > 0 ? `<${typeParams.map(
const formattedTypeParams = typeParams?.length > 0 ? `<${typeParams.map(
(typeParam) => typeof typeParam === "string" ? typeParam : normalizeStructTag(typeParam)

@@ -42,0 +42,0 @@ ).join(",")}>` : "";

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

export declare const PACKAGE_VERSION = "0.0.0-experimental-20240208033317";
export declare const PACKAGE_VERSION = "0.0.0-experimental-20240208220153";
export declare const TARGETED_RPC_VERSION = "1.19.0";

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

const PACKAGE_VERSION = "0.0.0-experimental-20240208033317";
const PACKAGE_VERSION = "0.0.0-experimental-20240208220153";
const TARGETED_RPC_VERSION = "1.19.0";

@@ -3,0 +3,0 @@ export {

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

"homepage": "https://sdk.mystenlabs.com",
"version": "0.0.0-experimental-20240208033317",
"version": "0.0.0-experimental-20240208220153",
"license": "Apache-2.0",

@@ -20,2 +20,3 @@ "sideEffects": false,

"faucet",
"graphql",
"keypairs",

@@ -50,2 +51,10 @@ "multisig",

},
"./graphql": {
"import": "./dist/esm/graphql/index.js",
"require": "./dist/cjs/graphql/index.js"
},
"./graphql/schemas/2024-01": {
"import": "./dist/esm/graphql/schemas/2024-01/index.js",
"require": "./dist/cjs/graphql/schemas/2024-01/index.js"
},
"./keypairs/ed25519": {

@@ -91,2 +100,8 @@ "import": "./dist/esm/keypairs/ed25519/index.js",

"devDependencies": {
"@0no-co/graphqlsp": "^1.3.2",
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typed-document-node": "^5.0.4",
"@graphql-codegen/typescript": "4.0.4",
"@graphql-codegen/typescript-operations": "^4.1.2",
"@iarna/toml": "^2.2.5",

@@ -97,2 +112,3 @@ "@types/node": "^20.4.2",

"cross-env": "^7.0.3",
"graphql-config": "^5.0.3",
"msw": "^1.2.2",

@@ -102,3 +118,3 @@ "tmp": "^0.2.1",

"typedoc": "^0.24.8",
"typescript": "^5.1.6",
"typescript": "^5.3.3",
"vite": "^4.4.4",

@@ -108,5 +124,6 @@ "vitest": "^0.33.0",

"ws": "^8.14.2",
"@mysten/build-scripts": "0.0.0"
"@mysten/build-scripts": "^0.0.0"
},
"dependencies": {
"@graphql-typed-document-node/core": "^3.2.0",
"@noble/curves": "^1.1.0",

@@ -118,5 +135,7 @@ "@noble/hashes": "^1.3.1",

"bech32": "^2.0.0",
"gql.tada": "^1.2.0",
"graphql": "^16.8.1",
"superstruct": "^1.0.3",
"tweetnacl": "^1.0.3",
"@mysten/bcs": "0.0.0-experimental-20240208033317"
"@mysten/bcs": "0.0.0-experimental-20240208220153"
},

@@ -123,0 +142,0 @@ "scripts": {

// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
import type { BcsType, BcsTypeOptions } from '@mysten/bcs';
import {

@@ -8,8 +9,9 @@ bcs,

fromB58,
fromB64,
fromHEX,
getSuiMoveConfig,
toB58,
toB64,
toHEX,
} from '@mysten/bcs';
import type { BcsType, BcsTypeOptions } from '@mysten/bcs';

@@ -368,8 +370,30 @@ import type { MoveCallTransaction } from '../builder/Transactions.js';

// Signed transaction data needed to generate transaction digest.
const SenderSignedData = bcs.struct('SenderSignedData', {
data: TransactionData,
txSignatures: bcs.vector(bcs.vector(bcs.u8())),
const IntentScope = bcs.enum('IntentScope', {
TransactionData: null,
TransactionEffects: null,
CheckpointSummary: null,
PersonalMessage: null,
});
const IntentVersion = bcs.enum('IntentVersion', {
V0: null,
});
const AppId = bcs.enum('AppId', {
Sui: null,
});
const Intent = bcs.struct('Intent', {
scope: IntentScope,
version: IntentVersion,
appId: AppId,
});
const IntentMessage = bcs.generic(['T'], (T) =>
bcs.struct('IntentMessage<T>', {
intent: Intent,
value: T,
}),
);
const CompressedSignature = bcs.enum('CompressedSignature', {

@@ -405,2 +429,16 @@ ED25519: bcs.fixedArray(64, bcs.u8()),

const base64String = bcs.vector(bcs.u8()).transform({
input: (val: string | Uint8Array) => (typeof val === 'string' ? fromB64(val) : val),
output: (val) => toB64(new Uint8Array(val)),
});
const SenderSignedTransaction = bcs.struct('SenderSignedTransaction', {
intentMessage: IntentMessage(TransactionData),
txSignatures: bcs.vector(base64String),
});
const SenderSignedData = bcs.vector(SenderSignedTransaction, {
name: 'SenderSignedData',
});
const suiBcs = {

@@ -431,2 +469,3 @@ ...bcs,

SenderSignedData,
SenderSignedTransaction,
SharedObjectRef,

@@ -433,0 +472,0 @@ StructTag,

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

const formattedTypeParams =
typeParams.length > 0
typeParams?.length > 0
? `<${typeParams

@@ -73,0 +73,0 @@ .map((typeParam) =>

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

export const PACKAGE_VERSION = '0.0.0-experimental-20240208033317';
export const PACKAGE_VERSION = '0.0.0-experimental-20240208220153';
export const TARGETED_RPC_VERSION = '1.19.0';

Sorry, the diff of this file is too big to display

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 too big to display

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