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-20220831152344 to 0.0.0-experimental-20220901012906

dist/types/index.guard.d.ts

2

dist/index.d.ts

@@ -16,2 +16,2 @@ export * from './cryptography/ed25519-keypair';

export * from './types';
export * from './index.guard';
export * from './types/index.guard';

@@ -69,3 +69,3 @@ import { Base64DataBuffer } from '../../serialization/base64';

*/
compiledModules: Iterable<string> | Iterable<Iterable<number>>;
compiledModules: ArrayLike<string> | ArrayLike<ArrayLike<number>>;
gasPayment?: ObjectId;

@@ -72,0 +72,0 @@ gasBudget: number;

@@ -70,3 +70,3 @@ import { ObjectOwner } from './common';

};
export declare type SuiMoveVisibility = "Private" | "Public" | "Friend";
export declare type SuiMoveVisibility = 'Private' | 'Public' | 'Friend';
export declare type SuiMoveTypeParameterIndex = number;

@@ -76,3 +76,3 @@ export declare type SuiMoveAbilitySet = {

};
export declare type SuiMoveNormalizedType = (string | {
export declare type SuiMoveNormalizedType = string | {
TypeParameter: SuiMoveTypeParameterIndex;

@@ -92,3 +92,3 @@ } | {

};
});
};
export declare type SuiObject = {

@@ -95,0 +95,0 @@ /** The meat of the object */

@@ -47,3 +47,3 @@ import { bcs } from '@mysten/bcs';

Publish: {
modules: Iterable<Iterable<number>>;
modules: ArrayLike<ArrayLike<number>>;
};

@@ -79,3 +79,3 @@ };

export declare type CallArg = {
Pure: Iterable<number>;
Pure: ArrayLike<number>;
} | {

@@ -82,0 +82,0 @@ Object: ObjectArg;

@@ -5,3 +5,3 @@ {

"description": "Sui TypeScript API(Work in Progress)",
"version": "0.0.0-experimental-20220831152344",
"version": "0.0.0-experimental-20220901012906",
"license": "Apache-2.0",

@@ -53,2 +53,3 @@ "files": [

"devDependencies": {
"@mysten/sui-open-rpc": "file:../../crates/sui-open-rpc",
"@size-limit/preset-small-lib": "^7.0.8",

@@ -74,3 +75,3 @@ "@types/bn.js": "^5.1.0",

"dependencies": {
"@mysten/bcs": "0.0.0-experimental-20220831152344",
"@mysten/bcs": "0.0.0-experimental-20220901012906",
"bn.js": "^5.2.0",

@@ -77,0 +78,0 @@ "buffer": "^6.0.3",

@@ -24,2 +24,2 @@ // Copyright (c) 2022, Mysten Labs, Inc.

export * from './types';
export * from './index.guard';
export * from './types/index.guard';

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

import { SignatureScheme } from '../cryptography/publickey';
import { isSuiObjectRef } from '../index.guard';
import { isSuiObjectRef } from '../types/index.guard';
import {

@@ -8,0 +8,0 @@ GetObjectDataResponse,

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

isSuiMoveNormalizedStruct,
} from '../index.guard';
} from '../types/index.guard';
import {

@@ -19,0 +19,0 @@ GatewayTxSeqNumber,

// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable */
/*

@@ -9,3 +11,2 @@ * Generated type guards for "client.ts".

import { HttpHeaders, RpcParams, ValidResponse, ErrorResponse } from "./client";
import { isTransactionDigest } from "../index.guard";

@@ -25,3 +26,3 @@ export function isHttpHeaders(obj: any, _argumentName?: string): obj is HttpHeaders {

typeof obj === "function") &&
isTransactionDigest(obj.method) as boolean &&
typeof obj.method === "string" &&
Array.isArray(obj.args)

@@ -37,3 +38,3 @@ )

obj.jsonrpc === "2.0" &&
isTransactionDigest(obj.id) as boolean
typeof obj.id === "string"
)

@@ -48,8 +49,8 @@ }

obj.jsonrpc === "2.0" &&
isTransactionDigest(obj.id) as boolean &&
typeof obj.id === "string" &&
(obj.error !== null &&
typeof obj.error === "object" ||
typeof obj.error === "function") &&
isTransactionDigest(obj.error.message) as boolean
typeof obj.error.message === "string"
)
}

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

Publish: {
modules: t.compiledModules as Iterable<Iterable<number>>,
modules: t.compiledModules as ArrayLike<ArrayLike<number>>,
},

@@ -215,0 +215,0 @@ };

// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
import { isTransactionBytes } from '../../index.guard';
import { isTransactionBytes } from '../../types/index.guard';
import { JsonRpcClient } from '../../rpc/client';

@@ -6,0 +6,0 @@ import { Base64DataBuffer } from '../../serialization/base64';

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

*/
compiledModules: Iterable<string> | Iterable<Iterable<number>>;
compiledModules: ArrayLike<string> | ArrayLike<ArrayLike<number>>;
gasPayment?: ObjectId;

@@ -89,0 +89,0 @@ gasBudget: number;

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

exposed_functions: Record<string, SuiMoveNormalizedFunction>;
}
};

@@ -71,3 +71,3 @@ export type SuiMoveModuleId = {

fields: SuiMoveNormalizedField[];
}
};

@@ -77,3 +77,3 @@ export type SuiMoveStructTypeParameter = {

is_phantom: boolean;
}
};

@@ -83,3 +83,3 @@ export type SuiMoveNormalizedField = {

type_: SuiMoveNormalizedType;
}
};

@@ -94,6 +94,3 @@ export type SuiMoveNormalizedFunction = {

export type SuiMoveVisibility =
| "Private"
| "Public"
| "Friend";
export type SuiMoveVisibility = 'Private' | 'Public' | 'Friend';

@@ -103,18 +100,19 @@ export type SuiMoveTypeParameterIndex = number;

export type SuiMoveAbilitySet = {
abilities: string[],
abilities: string[];
};
export type SuiMoveNormalizedType = (
export type SuiMoveNormalizedType =
| string
| {TypeParameter: SuiMoveTypeParameterIndex}
| {Reference: SuiMoveNormalizedType}
| {MutableReference: SuiMoveNormalizedType}
| {Vector: SuiMoveNormalizedType}
| {Struct: {
address: string,
module: string,
name: string,
type_arguments: SuiMoveNormalizedType[],
}}
);
| { TypeParameter: SuiMoveTypeParameterIndex }
| { Reference: SuiMoveNormalizedType }
| { MutableReference: SuiMoveNormalizedType }
| { Vector: SuiMoveNormalizedType }
| {
Struct: {
address: string;
module: string;
name: string;
type_arguments: SuiMoveNormalizedType[];
};
};

@@ -121,0 +119,0 @@ export type SuiObject = {

// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
export type Option<T> = T | {
fields: {
export type Option<T> =
| T
| {
fields: {
vec: '';
};
type: string;
};
type: string;
}
export function getOption<T>(option: Option<T>): T | undefined {
if (typeof option === 'object' && option !== null && 'type' in option && option.type.startsWith('0x1::option::Option<')) {
return undefined;
}
return option as T;
if (
typeof option === 'object' &&
option !== null &&
'type' in option &&
option.type.startsWith('0x1::option::Option<')
) {
return undefined;
}
return option as T;
}

@@ -21,4 +21,4 @@ // Copyright (c) 2022, Mysten Labs, Inc.

},
reader => {
let bytes = reader.readVec(reader => reader.read8());
(reader) => {
let bytes = reader.readVec((reader) => reader.read8());
return Buffer.from(bytes).toString('utf-8');

@@ -33,4 +33,4 @@ }

},
reader => {
let bytes = reader.readVec(reader => reader.read8());
(reader) => {
let bytes = reader.readVec((reader) => reader.read8());
return encodeStr(new Uint8Array(bytes), 'base64');

@@ -103,3 +103,3 @@ }

Publish: {
modules: Iterable<Iterable<number>>;
modules: ArrayLike<ArrayLike<number>>;
};

@@ -138,3 +138,3 @@ };

*/
export type CallArg = { Pure: Iterable<number> } | { Object: ObjectArg };
export type CallArg = { Pure: ArrayLike<number> } | { Object: ObjectArg };

@@ -141,0 +141,0 @@ bcs

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

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