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.47.0 to 0.48.0

11

CHANGELOG.md
# @mysten/sui.js
## 0.48.0
### Minor Changes
- cdcfa76c43: Add a new client method for retrieving epoch metrics (suix_getEpochMetrics)
### Patch Changes
- Updated dependencies [fce0a08d0f]
- @mysten/bcs@0.9.0
## 0.47.0

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

5

dist/cjs/client/client.d.ts
import type { TransactionBlock } from '../builder/index.js';
import type { Keypair } from '../cryptography/index.js';
import type { SuiTransport } from './http-transport.js';
import type { AddressMetrics, AllEpochsAddressMetrics, Checkpoint, CheckpointPage, CoinBalance, CoinMetadata, CoinSupply, CommitteeInfo, DelegatedStake, DevInspectResults, DevInspectTransactionBlockParams, DryRunTransactionBlockParams, DryRunTransactionBlockResponse, DynamicFieldPage, EpochInfo, EpochPage, ExecuteTransactionBlockParams, GetAllBalancesParams, GetAllCoinsParams, GetBalanceParams, GetCheckpointParams, GetCheckpointsParams, GetCoinMetadataParams, GetCoinsParams, GetCommitteeInfoParams, GetDynamicFieldObjectParams, GetDynamicFieldsParams, GetMoveFunctionArgTypesParams, GetNormalizedMoveFunctionParams, GetNormalizedMoveModuleParams, GetNormalizedMoveModulesByPackageParams, GetNormalizedMoveStructParams, GetObjectParams, GetOwnedObjectsParams, GetProtocolConfigParams, GetStakesByIdsParams, GetStakesParams, GetTotalSupplyParams, GetTransactionBlockParams, MoveCallMetrics, MultiGetObjectsParams, MultiGetTransactionBlocksParams, NetworkMetrics, ObjectRead, Order, PaginatedCoins, PaginatedEvents, PaginatedObjectsResponse, PaginatedTransactionResponse, ProtocolConfig, QueryEventsParams, QueryTransactionBlocksParams, ResolvedNameServiceNames, ResolveNameServiceAddressParams, ResolveNameServiceNamesParams, SubscribeEventParams, SubscribeTransactionParams, SuiEvent, SuiMoveFunctionArgType, SuiMoveNormalizedFunction, SuiMoveNormalizedModule, SuiMoveNormalizedModules, SuiMoveNormalizedStruct, SuiObjectResponse, SuiSystemStateSummary, SuiTransactionBlockResponse, TransactionEffects, TryGetPastObjectParams, Unsubscribe, ValidatorsApy } from './types/index.js';
import type { AddressMetrics, AllEpochsAddressMetrics, Checkpoint, CheckpointPage, CoinBalance, CoinMetadata, CoinSupply, CommitteeInfo, DelegatedStake, DevInspectResults, DevInspectTransactionBlockParams, DryRunTransactionBlockParams, DryRunTransactionBlockResponse, DynamicFieldPage, EpochInfo, EpochMetricsPage, EpochPage, ExecuteTransactionBlockParams, GetAllBalancesParams, GetAllCoinsParams, GetBalanceParams, GetCheckpointParams, GetCheckpointsParams, GetCoinMetadataParams, GetCoinsParams, GetCommitteeInfoParams, GetDynamicFieldObjectParams, GetDynamicFieldsParams, GetMoveFunctionArgTypesParams, GetNormalizedMoveFunctionParams, GetNormalizedMoveModuleParams, GetNormalizedMoveModulesByPackageParams, GetNormalizedMoveStructParams, GetObjectParams, GetOwnedObjectsParams, GetProtocolConfigParams, GetStakesByIdsParams, GetStakesParams, GetTotalSupplyParams, GetTransactionBlockParams, MoveCallMetrics, MultiGetObjectsParams, MultiGetTransactionBlocksParams, NetworkMetrics, ObjectRead, Order, PaginatedCoins, PaginatedEvents, PaginatedObjectsResponse, PaginatedTransactionResponse, ProtocolConfig, QueryEventsParams, QueryTransactionBlocksParams, ResolvedNameServiceNames, ResolveNameServiceAddressParams, ResolveNameServiceNamesParams, SubscribeEventParams, SubscribeTransactionParams, SuiEvent, SuiMoveFunctionArgType, SuiMoveNormalizedFunction, SuiMoveNormalizedModule, SuiMoveNormalizedModules, SuiMoveNormalizedStruct, SuiObjectResponse, SuiSystemStateSummary, SuiTransactionBlockResponse, TransactionEffects, TryGetPastObjectParams, Unsubscribe, ValidatorsApy } from './types/index.js';
export interface PaginationArguments<Cursor> {

@@ -184,2 +184,5 @@ /** Optional paging cursor */

getAddressMetrics(): Promise<AddressMetrics>;
getEpochMetrics(input?: {
descendingOrder?: boolean;
} & PaginationArguments<EpochMetricsPage['nextCursor']>): Promise<EpochMetricsPage>;
getAllEpochAddressMetrics(input?: {

@@ -186,0 +189,0 @@ descendingOrder?: boolean;

@@ -478,2 +478,8 @@ "use strict";

}
async getEpochMetrics(input) {
return await this.transport.request({
method: "suix_getEpochMetrics",
params: [input?.cursor, input?.limit, input?.descendingOrder]
});
}
async getAllEpochAddressMetrics(input) {

@@ -480,0 +486,0 @@ return await this.transport.request({

@@ -16,2 +16,9 @@ import type { Checkpoint, DynamicFieldInfo, SuiCallArg, SuiMoveNormalizedModule, SuiParsedData, SuiTransaction, SuiValidatorSummary } from './generated.js';

};
export type EpochMetrics = {
epoch: string;
epochTotalTransactions: string;
firstCheckpointId: string;
epochStartTimestamp: string;
endOfEpochInfo: EndOfEpochInfo | null;
};
export type EpochPage = {

@@ -22,2 +29,7 @@ data: EpochInfo[];

};
export type EpochMetricsPage = {
data: EpochMetrics[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type EndOfEpochInfo = {

@@ -24,0 +36,0 @@ lastCheckpointId: string;

4

dist/cjs/version.d.ts

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

export declare const PACKAGE_VERSION = "0.47.0";
export declare const TARGETED_RPC_VERSION = "1.15.0";
export declare const PACKAGE_VERSION = "0.48.0";
export declare const TARGETED_RPC_VERSION = "1.16.0";

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

module.exports = __toCommonJS(version_exports);
const PACKAGE_VERSION = "0.47.0";
const TARGETED_RPC_VERSION = "1.15.0";
const PACKAGE_VERSION = "0.48.0";
const TARGETED_RPC_VERSION = "1.16.0";
//# sourceMappingURL=version.js.map
import type { TransactionBlock } from '../builder/index.js';
import type { Keypair } from '../cryptography/index.js';
import type { SuiTransport } from './http-transport.js';
import type { AddressMetrics, AllEpochsAddressMetrics, Checkpoint, CheckpointPage, CoinBalance, CoinMetadata, CoinSupply, CommitteeInfo, DelegatedStake, DevInspectResults, DevInspectTransactionBlockParams, DryRunTransactionBlockParams, DryRunTransactionBlockResponse, DynamicFieldPage, EpochInfo, EpochPage, ExecuteTransactionBlockParams, GetAllBalancesParams, GetAllCoinsParams, GetBalanceParams, GetCheckpointParams, GetCheckpointsParams, GetCoinMetadataParams, GetCoinsParams, GetCommitteeInfoParams, GetDynamicFieldObjectParams, GetDynamicFieldsParams, GetMoveFunctionArgTypesParams, GetNormalizedMoveFunctionParams, GetNormalizedMoveModuleParams, GetNormalizedMoveModulesByPackageParams, GetNormalizedMoveStructParams, GetObjectParams, GetOwnedObjectsParams, GetProtocolConfigParams, GetStakesByIdsParams, GetStakesParams, GetTotalSupplyParams, GetTransactionBlockParams, MoveCallMetrics, MultiGetObjectsParams, MultiGetTransactionBlocksParams, NetworkMetrics, ObjectRead, Order, PaginatedCoins, PaginatedEvents, PaginatedObjectsResponse, PaginatedTransactionResponse, ProtocolConfig, QueryEventsParams, QueryTransactionBlocksParams, ResolvedNameServiceNames, ResolveNameServiceAddressParams, ResolveNameServiceNamesParams, SubscribeEventParams, SubscribeTransactionParams, SuiEvent, SuiMoveFunctionArgType, SuiMoveNormalizedFunction, SuiMoveNormalizedModule, SuiMoveNormalizedModules, SuiMoveNormalizedStruct, SuiObjectResponse, SuiSystemStateSummary, SuiTransactionBlockResponse, TransactionEffects, TryGetPastObjectParams, Unsubscribe, ValidatorsApy } from './types/index.js';
import type { AddressMetrics, AllEpochsAddressMetrics, Checkpoint, CheckpointPage, CoinBalance, CoinMetadata, CoinSupply, CommitteeInfo, DelegatedStake, DevInspectResults, DevInspectTransactionBlockParams, DryRunTransactionBlockParams, DryRunTransactionBlockResponse, DynamicFieldPage, EpochInfo, EpochMetricsPage, EpochPage, ExecuteTransactionBlockParams, GetAllBalancesParams, GetAllCoinsParams, GetBalanceParams, GetCheckpointParams, GetCheckpointsParams, GetCoinMetadataParams, GetCoinsParams, GetCommitteeInfoParams, GetDynamicFieldObjectParams, GetDynamicFieldsParams, GetMoveFunctionArgTypesParams, GetNormalizedMoveFunctionParams, GetNormalizedMoveModuleParams, GetNormalizedMoveModulesByPackageParams, GetNormalizedMoveStructParams, GetObjectParams, GetOwnedObjectsParams, GetProtocolConfigParams, GetStakesByIdsParams, GetStakesParams, GetTotalSupplyParams, GetTransactionBlockParams, MoveCallMetrics, MultiGetObjectsParams, MultiGetTransactionBlocksParams, NetworkMetrics, ObjectRead, Order, PaginatedCoins, PaginatedEvents, PaginatedObjectsResponse, PaginatedTransactionResponse, ProtocolConfig, QueryEventsParams, QueryTransactionBlocksParams, ResolvedNameServiceNames, ResolveNameServiceAddressParams, ResolveNameServiceNamesParams, SubscribeEventParams, SubscribeTransactionParams, SuiEvent, SuiMoveFunctionArgType, SuiMoveNormalizedFunction, SuiMoveNormalizedModule, SuiMoveNormalizedModules, SuiMoveNormalizedStruct, SuiObjectResponse, SuiSystemStateSummary, SuiTransactionBlockResponse, TransactionEffects, TryGetPastObjectParams, Unsubscribe, ValidatorsApy } from './types/index.js';
export interface PaginationArguments<Cursor> {

@@ -184,2 +184,5 @@ /** Optional paging cursor */

getAddressMetrics(): Promise<AddressMetrics>;
getEpochMetrics(input?: {
descendingOrder?: boolean;
} & PaginationArguments<EpochMetricsPage['nextCursor']>): Promise<EpochMetricsPage>;
getAllEpochAddressMetrics(input?: {

@@ -186,0 +189,0 @@ descendingOrder?: boolean;

@@ -459,2 +459,8 @@ import { fromB58, toB64, toHEX } from "@mysten/bcs";

}
async getEpochMetrics(input) {
return await this.transport.request({
method: "suix_getEpochMetrics",
params: [input?.cursor, input?.limit, input?.descendingOrder]
});
}
async getAllEpochAddressMetrics(input) {

@@ -461,0 +467,0 @@ return await this.transport.request({

@@ -16,2 +16,9 @@ import type { Checkpoint, DynamicFieldInfo, SuiCallArg, SuiMoveNormalizedModule, SuiParsedData, SuiTransaction, SuiValidatorSummary } from './generated.js';

};
export type EpochMetrics = {
epoch: string;
epochTotalTransactions: string;
firstCheckpointId: string;
epochStartTimestamp: string;
endOfEpochInfo: EndOfEpochInfo | null;
};
export type EpochPage = {

@@ -22,2 +29,7 @@ data: EpochInfo[];

};
export type EpochMetricsPage = {
data: EpochMetrics[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type EndOfEpochInfo = {

@@ -24,0 +36,0 @@ lastCheckpointId: string;

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

export declare const PACKAGE_VERSION = "0.47.0";
export declare const TARGETED_RPC_VERSION = "1.15.0";
export declare const PACKAGE_VERSION = "0.48.0";
export declare const TARGETED_RPC_VERSION = "1.16.0";

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

const PACKAGE_VERSION = "0.47.0";
const TARGETED_RPC_VERSION = "1.15.0";
const PACKAGE_VERSION = "0.48.0";
const TARGETED_RPC_VERSION = "1.16.0";
export {

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

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

"homepage": "https://sui-typescript-docs.vercel.app",
"version": "0.47.0",
"version": "0.48.0",
"license": "Apache-2.0",

@@ -114,3 +114,3 @@ "sideEffects": false,

"tweetnacl": "^1.0.3",
"@mysten/bcs": "0.8.1"
"@mysten/bcs": "0.9.0"
},

@@ -117,0 +117,0 @@ "scripts": {

@@ -54,5 +54,3 @@ # Docs site

> All `pnpm` commands are intended to be run in the root of the Sui repo. You can also run them
> within the `sdk/typescript` directory, and remove change `pnpm sdk` to just `pnpm` when running
> commands.
> All `pnpm` commands below are intended to be run in the root of the Sui repo.

@@ -73,3 +71,3 @@ ## Type Doc

```
pnpm sdk test:unit
pnpm --filter @mysten/sui.js test:unit
```

@@ -80,6 +78,6 @@

```
pnpm sdk prepare:e2e
pnpm --filter @mysten/sui.js prepare:e2e
// This will run all e2e tests
pnpm sdk test:e2e
pnpm --filter @mysten/sui.js test:e2e

@@ -103,3 +101,3 @@ // Alternatively you can choose to run only one test file

```
VITE_FAUCET_URL='https://faucet.devnet.sui.io:443/gas' VITE_FULLNODE_URL='https://fullnode.devnet.sui.io' pnpm sdk exec vitest e2e
VITE_FAUCET_URL='https://faucet.devnet.sui.io:443/gas' VITE_FULLNODE_URL='https://fullnode.devnet.sui.io' pnpm --filter @mysten/sui.js exec vitest e2e
```

@@ -106,0 +104,0 @@

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

EpochInfo,
EpochMetricsPage,
EpochPage,

@@ -674,2 +675,11 @@ ExecuteTransactionBlockParams,

async getEpochMetrics(
input?: { descendingOrder?: boolean } & PaginationArguments<EpochMetricsPage['nextCursor']>,
): Promise<EpochMetricsPage> {
return await this.transport.request({
method: 'suix_getEpochMetrics',
params: [input?.cursor, input?.limit, input?.descendingOrder],
});
}
async getAllEpochAddressMetrics(input?: {

@@ -676,0 +686,0 @@ descendingOrder?: boolean;

@@ -30,2 +30,10 @@ // Copyright (c) Mysten Labs, Inc.

export type EpochMetrics = {
epoch: string;
epochTotalTransactions: string;
firstCheckpointId: string;
epochStartTimestamp: string;
endOfEpochInfo: EndOfEpochInfo | null;
};
export type EpochPage = {

@@ -37,2 +45,8 @@ data: EpochInfo[];

export type EpochMetricsPage = {
data: EpochMetrics[];
nextCursor: string | null;
hasNextPage: boolean;
};
export type EndOfEpochInfo = {

@@ -39,0 +53,0 @@ lastCheckpointId: string;

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

export const PACKAGE_VERSION = '0.47.0';
export const TARGETED_RPC_VERSION = '1.15.0';
export const PACKAGE_VERSION = '0.48.0';
export const TARGETED_RPC_VERSION = '1.16.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

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