@mysten/sui
Version:
Sui TypeScript API
920 lines (918 loc) • 29.9 kB
text/typescript
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck
// @generated from protobuf file "sui/rpc/v2/state_service.proto" (package "sui.rpc.v2", syntax proto3)
// tslint:disable
// @ts-nocheck
//
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//
import { ServiceType } from '@protobuf-ts/runtime-rpc';
import { MessageType } from '@protobuf-ts/runtime';
import { Bcs } from './bcs.js';
import { Object } from './object.js';
import { FieldMask } from '../../../google/protobuf/field_mask.js';
/**
* Request message for `NodeService.GetCoinInfo`.
*
* @generated from protobuf message sui.rpc.v2.GetCoinInfoRequest
*/
export interface GetCoinInfoRequest {
/**
* The coin type to request information about
*
* @generated from protobuf field: optional string coin_type = 1;
*/
coinType?: string;
}
/**
* Response message for `NodeService.GetCoinInfo`.
*
* @generated from protobuf message sui.rpc.v2.GetCoinInfoResponse
*/
export interface GetCoinInfoResponse {
/**
* Required. The coin type.
*
* @generated from protobuf field: optional string coin_type = 1;
*/
coinType?: string;
/**
* This field will be populated with information about this coin
* type's `0x2::coin::CoinMetadata` if it exists and has not been wrapped.
*
* @generated from protobuf field: optional sui.rpc.v2.CoinMetadata metadata = 2;
*/
metadata?: CoinMetadata;
/**
* This field will be populated with information about this coin
* type's `0x2::coin::TreasuryCap` if it exists and has not been wrapped.
*
* @generated from protobuf field: optional sui.rpc.v2.CoinTreasury treasury = 3;
*/
treasury?: CoinTreasury;
/**
* If this coin type is a regulated coin, this field will be
* populated with information either from its Currency object
* in the CoinRegistry, or from its `0x2::coin::RegulatedCoinMetadata`
* object for coins that have not been migrated to the CoinRegistry
*
* If this coin is not known to be regulated, only the
* coin_regulated_state field will be populated.
*
* @generated from protobuf field: optional sui.rpc.v2.RegulatedCoinMetadata regulated_metadata = 4;
*/
regulatedMetadata?: RegulatedCoinMetadata;
}
/**
* Metadata for a coin type
*
* @generated from protobuf message sui.rpc.v2.CoinMetadata
*/
export interface CoinMetadata {
/**
* ObjectId of the `0x2::coin::CoinMetadata` object or
* 0x2::sui::coin_registry::Currency object (when registered with CoinRegistry).
*
* @generated from protobuf field: optional string id = 1;
*/
id?: string;
/**
* Number of decimal places to coin uses.
*
* @generated from protobuf field: optional uint32 decimals = 2;
*/
decimals?: number;
/**
* Name for the token
*
* @generated from protobuf field: optional string name = 3;
*/
name?: string;
/**
* Symbol for the token
*
* @generated from protobuf field: optional string symbol = 4;
*/
symbol?: string;
/**
* Description of the token
*
* @generated from protobuf field: optional string description = 5;
*/
description?: string;
/**
* URL for the token logo
*
* @generated from protobuf field: optional string icon_url = 6;
*/
iconUrl?: string;
/**
* The MetadataCap ID if it has been claimed for this coin type.
* This capability allows updating the coin's metadata fields.
* Only populated when metadata is from CoinRegistry.
*
* @generated from protobuf field: optional string metadata_cap_id = 7;
*/
metadataCapId?: string;
/**
* State of the MetadataCap for this coin type.
*
* @generated from protobuf field: optional sui.rpc.v2.CoinMetadata.MetadataCapState metadata_cap_state = 8;
*/
metadataCapState?: CoinMetadata_MetadataCapState;
}
/**
* Information about the state of the coin's MetadataCap
*
* @generated from protobuf enum sui.rpc.v2.CoinMetadata.MetadataCapState
*/
export enum CoinMetadata_MetadataCapState {
/**
* Indicates the state of the MetadataCap is unknown.
* Set when the coin has not been migrated to the CoinRegistry.
*
* @generated from protobuf enum value: METADATA_CAP_STATE_UNKNOWN = 0;
*/
METADATA_CAP_STATE_UNKNOWN = 0,
/**
* Indicates the MetadataCap has been claimed.
*
* @generated from protobuf enum value: CLAIMED = 1;
*/
CLAIMED = 1,
/**
* Indicates the MetadataCap has not been claimed.
*
* @generated from protobuf enum value: UNCLAIMED = 2;
*/
UNCLAIMED = 2,
/**
* Indicates the MetadataCap has been deleted.
*
* @generated from protobuf enum value: DELETED = 3;
*/
DELETED = 3,
}
/**
* Information about a coin type's `0x2::coin::TreasuryCap` and its total available supply
*
* @generated from protobuf message sui.rpc.v2.CoinTreasury
*/
export interface CoinTreasury {
/**
* ObjectId of the `0x2::coin::TreasuryCap` object.
*
* @generated from protobuf field: optional string id = 1;
*/
id?: string;
/**
* Total available supply for this coin type.
*
* @generated from protobuf field: optional uint64 total_supply = 2;
*/
totalSupply?: bigint;
/**
* Supply state indicating if the supply is fixed or can still be minted
*
* @generated from protobuf field: optional sui.rpc.v2.CoinTreasury.SupplyState supply_state = 3;
*/
supplyState?: CoinTreasury_SupplyState;
}
/**
* Supply state of a coin, matching the Move SupplyState enum
*
* @generated from protobuf enum sui.rpc.v2.CoinTreasury.SupplyState
*/
export enum CoinTreasury_SupplyState {
/**
* Supply is unknown or TreasuryCap still exists (minting still possible)
*
* @generated from protobuf enum value: SUPPLY_STATE_UNKNOWN = 0;
*/
SUPPLY_STATE_UNKNOWN = 0,
/**
* Supply is fixed (TreasuryCap consumed, no more minting possible)
*
* @generated from protobuf enum value: FIXED = 1;
*/
FIXED = 1,
/**
* Supply can only decrease (burning allowed, minting not allowed)
*
* @generated from protobuf enum value: BURN_ONLY = 2;
*/
BURN_ONLY = 2,
}
/**
* Information about a regulated coin, which indicates that it makes use of the transfer deny list.
*
* @generated from protobuf message sui.rpc.v2.RegulatedCoinMetadata
*/
export interface RegulatedCoinMetadata {
/**
* ObjectId of the `0x2::coin::RegulatedCoinMetadata` object.
* Only present for coins that have not been migrated to CoinRegistry.
*
* @generated from protobuf field: optional string id = 1;
*/
id?: string;
/**
* The ID of the coin's `CoinMetadata` or `CoinData` object.
*
* @generated from protobuf field: optional string coin_metadata_object = 2;
*/
coinMetadataObject?: string;
/**
* The ID of the coin's `DenyCap` object.
*
* @generated from protobuf field: optional string deny_cap_object = 3;
*/
denyCapObject?: string;
/**
* Whether the coin can be globally paused
*
* @generated from protobuf field: optional bool allow_global_pause = 4;
*/
allowGlobalPause?: boolean;
/**
* Variant of the regulated coin metadata
*
* @generated from protobuf field: optional uint32 variant = 5;
*/
variant?: number;
/**
* Indicates the coin's regulated state.
*
* @generated from protobuf field: optional sui.rpc.v2.RegulatedCoinMetadata.CoinRegulatedState coin_regulated_state = 6;
*/
coinRegulatedState?: RegulatedCoinMetadata_CoinRegulatedState;
}
/**
* Indicates the state of the regulation of the coin.
*
* @generated from protobuf enum sui.rpc.v2.RegulatedCoinMetadata.CoinRegulatedState
*/
export enum RegulatedCoinMetadata_CoinRegulatedState {
/**
* Indicates the regulation state of the coin is unknown.
* This is set when a coin has not been migrated to the
* coin registry and has no `0x2::coin::RegulatedCoinMetadata`
* object.
*
* @generated from protobuf enum value: COIN_REGULATED_STATE_UNKNOWN = 0;
*/
COIN_REGULATED_STATE_UNKNOWN = 0,
/**
* Indicates a coin is regulated. RegulatedCoinMetadata will be populated.
*
* @generated from protobuf enum value: REGULATED = 1;
*/
REGULATED = 1,
/**
* Indicates a coin is unregulated.
*
* @generated from protobuf enum value: UNREGULATED = 2;
*/
UNREGULATED = 2,
}
/**
* Request message for `LiveDataService.GetBalance`.
*
* @generated from protobuf message sui.rpc.v2.GetBalanceRequest
*/
export interface GetBalanceRequest {
/**
* Required. The owner's Sui address.
*
* @generated from protobuf field: optional string owner = 1;
*/
owner?: string;
/**
* Required. The type names for the coin (e.g., 0x2::sui::SUI).
*
* @generated from protobuf field: optional string coin_type = 2;
*/
coinType?: string;
}
/**
* Response message for `LiveDataService.GetBalance`.
* Return the total coin balance for one coin type, owned by the address owner.
*
* @generated from protobuf message sui.rpc.v2.GetBalanceResponse
*/
export interface GetBalanceResponse {
/**
* The balance information for the requested coin type.
*
* @generated from protobuf field: optional sui.rpc.v2.Balance balance = 1;
*/
balance?: Balance;
}
/**
* Request message for `LiveDataService.ListBalances`.
*
* @generated from protobuf message sui.rpc.v2.ListBalancesRequest
*/
export interface ListBalancesRequest {
/**
* Required. The owner's Sui address.
*
* @generated from protobuf field: optional string owner = 1;
*/
owner?: string;
/**
* The maximum number of balance entries to return. The service may return fewer than this value.
* If unspecified, at most `50` entries will be returned.
* The maximum value is `1000`; values above `1000` will be coerced to `1000`.
*
* @generated from protobuf field: optional uint32 page_size = 2;
*/
pageSize?: number;
/**
* A page token, received from a previous `ListBalances` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListBalances` must
* match the call that provided the page token.
*
* @generated from protobuf field: optional bytes page_token = 3;
*/
pageToken?: Uint8Array;
}
/**
* Response message for `LiveDataService.ListBalances`.
* Return the total coin balance for all coin types, owned by the address owner.
*
* @generated from protobuf message sui.rpc.v2.ListBalancesResponse
*/
export interface ListBalancesResponse {
/**
* The list of coin types and their respective balances.
*
* @generated from protobuf field: repeated sui.rpc.v2.Balance balances = 1;
*/
balances: Balance[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
*
* @generated from protobuf field: optional bytes next_page_token = 2;
*/
nextPageToken?: Uint8Array;
}
/**
* Balance information for a specific coin type.
*
* @generated from protobuf message sui.rpc.v2.Balance
*/
export interface Balance {
/**
* The type of the coin (e.g., 0x2::sui::SUI).
*
* @generated from protobuf field: optional string coin_type = 1;
*/
coinType?: string;
/**
* The total balance of `coin_type` in its smallest unit.
* This is the sum of all spendable amounts of `coin_type` (`address_balance`
* and `coin_balance`).
*
* @generated from protobuf field: optional uint64 balance = 3;
*/
balance?: bigint;
/**
* The balance of `Balance<T>` in this address's Address Balance.
*
* @generated from protobuf field: optional uint64 address_balance = 4;
*/
addressBalance?: bigint;
/**
* The balance of all `Coin<T>` objects owned by this address.
*
* @generated from protobuf field: optional uint64 coin_balance = 5;
*/
coinBalance?: bigint;
}
/**
* Request message for `NodeService.ListDynamicFields`
*
* @generated from protobuf message sui.rpc.v2.ListDynamicFieldsRequest
*/
export interface ListDynamicFieldsRequest {
/**
* Required. The `UID` of the parent, which owns the collections of dynamic fields.
*
* @generated from protobuf field: optional string parent = 1;
*/
parent?: string;
/**
* The maximum number of dynamic fields to return. The service may return fewer than this value.
* If unspecified, at most `50` entries will be returned.
* The maximum value is `1000`; values above `1000` will be coerced to `1000`.
*
* @generated from protobuf field: optional uint32 page_size = 2;
*/
pageSize?: number;
/**
* A page token, received from a previous `ListDynamicFields` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListDynamicFields` must
* match the call that provided the page token.
*
* @generated from protobuf field: optional bytes page_token = 3;
*/
pageToken?: Uint8Array;
/**
* Mask specifying which fields to read.
* If no mask is specified, defaults to `parent,field_id`.
*
* @generated from protobuf field: optional google.protobuf.FieldMask read_mask = 4;
*/
readMask?: FieldMask;
}
/**
* Response message for `NodeService.ListDynamicFields`
*
* @generated from protobuf message sui.rpc.v2.ListDynamicFieldsResponse
*/
export interface ListDynamicFieldsResponse {
/**
* Page of dynamic fields owned by the specified parent.
*
* @generated from protobuf field: repeated sui.rpc.v2.DynamicField dynamic_fields = 1;
*/
dynamicFields: DynamicField[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
*
* @generated from protobuf field: optional bytes next_page_token = 2;
*/
nextPageToken?: Uint8Array;
}
/**
* @generated from protobuf message sui.rpc.v2.DynamicField
*/
export interface DynamicField {
/**
* @generated from protobuf field: optional sui.rpc.v2.DynamicField.DynamicFieldKind kind = 1;
*/
kind?: DynamicField_DynamicFieldKind;
/**
* ObjectId of this dynamic field's parent.
*
* @generated from protobuf field: optional string parent = 2;
*/
parent?: string;
/**
* ObjectId of this dynamic field.
*
* @generated from protobuf field: optional string field_id = 3;
*/
fieldId?: string;
/**
* The field object itself
*
* @generated from protobuf field: optional sui.rpc.v2.Object field_object = 4;
*/
fieldObject?: Object;
/**
* The dynamic field's "name"
*
* @generated from protobuf field: optional sui.rpc.v2.Bcs name = 5;
*/
name?: Bcs;
/**
* The dynamic field's "value"
*
* @generated from protobuf field: optional sui.rpc.v2.Bcs value = 6;
*/
value?: Bcs;
/**
* The type of the dynamic field "value".
*
* If this is a dynamic object field then this is the type of the object
* itself (which is a child of this field), otherwise this is the type of the
* value of this field.
*
* @generated from protobuf field: optional string value_type = 7;
*/
valueType?: string;
/**
* The ObjectId of the child object when a child is a dynamic
* object field.
*
* The presence or absence of this field can be used to determine if a child
* is a dynamic field or a dynamic child object
*
* @generated from protobuf field: optional string child_id = 8;
*/
childId?: string;
/**
* The object itself when a child is a dynamic object field.
*
* @generated from protobuf field: optional sui.rpc.v2.Object child_object = 9;
*/
childObject?: Object;
}
/**
* @generated from protobuf enum sui.rpc.v2.DynamicField.DynamicFieldKind
*/
export enum DynamicField_DynamicFieldKind {
/**
* @generated from protobuf enum value: DYNAMIC_FIELD_KIND_UNKNOWN = 0;
*/
DYNAMIC_FIELD_KIND_UNKNOWN = 0,
/**
* @generated from protobuf enum value: FIELD = 1;
*/
FIELD = 1,
/**
* @generated from protobuf enum value: OBJECT = 2;
*/
OBJECT = 2,
}
/**
* @generated from protobuf message sui.rpc.v2.ListOwnedObjectsRequest
*/
export interface ListOwnedObjectsRequest {
/**
* Required. The address of the account that owns the objects.
*
* @generated from protobuf field: optional string owner = 1;
*/
owner?: string;
/**
* The maximum number of entries return. The service may return fewer than this value.
* If unspecified, at most `50` entries will be returned.
* The maximum value is `1000`; values above `1000` will be coerced to `1000`.
*
* @generated from protobuf field: optional uint32 page_size = 2;
*/
pageSize?: number;
/**
* A page token, received from a previous `ListOwnedObjects` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListOwnedObjects` must
* match the call that provided the page token.
*
* @generated from protobuf field: optional bytes page_token = 3;
*/
pageToken?: Uint8Array;
/**
* Mask specifying which fields to read.
* If no mask is specified, defaults to `object_id,version,object_type`.
*
* @generated from protobuf field: optional google.protobuf.FieldMask read_mask = 4;
*/
readMask?: FieldMask;
/**
* Optional type filter to limit the types of objects listed.
*
* Providing an object type with no type params will return objects of that
* type with any type parameter, e.g. `0x2::coin::Coin` will return all
* `Coin<T>` objects regardless of the type parameter `T`. Providing a type
* with a type param will restrict the returned objects to only those objects
* that match the provided type parameters, e.g.
* `0x2::coin::Coin<0x2::sui::SUI>` will only return `Coin<SUI>` objects.
*
* @generated from protobuf field: optional string object_type = 5;
*/
objectType?: string;
}
/**
* @generated from protobuf message sui.rpc.v2.ListOwnedObjectsResponse
*/
export interface ListOwnedObjectsResponse {
/**
* Page of dynamic fields owned by the specified parent.
*
* @generated from protobuf field: repeated sui.rpc.v2.Object objects = 1;
*/
objects: Object[];
/**
* A token, which can be sent as `page_token` to retrieve the next page.
* If this field is omitted, there are no subsequent pages.
*
* @generated from protobuf field: optional bytes next_page_token = 2;
*/
nextPageToken?: Uint8Array;
}
// @generated message type with reflection information, may provide speed optimized methods
class GetCoinInfoRequest$Type extends MessageType<GetCoinInfoRequest> {
constructor() {
super('sui.rpc.v2.GetCoinInfoRequest', [
{ no: 1, name: 'coin_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.GetCoinInfoRequest
*/
export const GetCoinInfoRequest = new GetCoinInfoRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetCoinInfoResponse$Type extends MessageType<GetCoinInfoResponse> {
constructor() {
super('sui.rpc.v2.GetCoinInfoResponse', [
{ no: 1, name: 'coin_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'metadata', kind: 'message', T: () => CoinMetadata },
{ no: 3, name: 'treasury', kind: 'message', T: () => CoinTreasury },
{ no: 4, name: 'regulated_metadata', kind: 'message', T: () => RegulatedCoinMetadata },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.GetCoinInfoResponse
*/
export const GetCoinInfoResponse = new GetCoinInfoResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CoinMetadata$Type extends MessageType<CoinMetadata> {
constructor() {
super('sui.rpc.v2.CoinMetadata', [
{ no: 1, name: 'id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'decimals', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
{ no: 3, name: 'name', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: 'symbol', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 5, name: 'description', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: 'icon_url', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 7, name: 'metadata_cap_id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 8,
name: 'metadata_cap_state',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.CoinMetadata.MetadataCapState', CoinMetadata_MetadataCapState],
},
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.CoinMetadata
*/
export const CoinMetadata = new CoinMetadata$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CoinTreasury$Type extends MessageType<CoinTreasury> {
constructor() {
super('sui.rpc.v2.CoinTreasury', [
{ no: 1, name: 'id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 2,
name: 'total_supply',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
{
no: 3,
name: 'supply_state',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.CoinTreasury.SupplyState', CoinTreasury_SupplyState],
},
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.CoinTreasury
*/
export const CoinTreasury = new CoinTreasury$Type();
// @generated message type with reflection information, may provide speed optimized methods
class RegulatedCoinMetadata$Type extends MessageType<RegulatedCoinMetadata> {
constructor() {
super('sui.rpc.v2.RegulatedCoinMetadata', [
{ no: 1, name: 'id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 2,
name: 'coin_metadata_object',
kind: 'scalar',
opt: true,
T: 9 /*ScalarType.STRING*/,
},
{ no: 3, name: 'deny_cap_object', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: 'allow_global_pause', kind: 'scalar', opt: true, T: 8 /*ScalarType.BOOL*/ },
{ no: 5, name: 'variant', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
{
no: 6,
name: 'coin_regulated_state',
kind: 'enum',
opt: true,
T: () => [
'sui.rpc.v2.RegulatedCoinMetadata.CoinRegulatedState',
RegulatedCoinMetadata_CoinRegulatedState,
],
},
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.RegulatedCoinMetadata
*/
export const RegulatedCoinMetadata = new RegulatedCoinMetadata$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetBalanceRequest$Type extends MessageType<GetBalanceRequest> {
constructor() {
super('sui.rpc.v2.GetBalanceRequest', [
{ no: 1, name: 'owner', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'coin_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.GetBalanceRequest
*/
export const GetBalanceRequest = new GetBalanceRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetBalanceResponse$Type extends MessageType<GetBalanceResponse> {
constructor() {
super('sui.rpc.v2.GetBalanceResponse', [
{ no: 1, name: 'balance', kind: 'message', T: () => Balance },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.GetBalanceResponse
*/
export const GetBalanceResponse = new GetBalanceResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListBalancesRequest$Type extends MessageType<ListBalancesRequest> {
constructor() {
super('sui.rpc.v2.ListBalancesRequest', [
{ no: 1, name: 'owner', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'page_size', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
{ no: 3, name: 'page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListBalancesRequest
*/
export const ListBalancesRequest = new ListBalancesRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListBalancesResponse$Type extends MessageType<ListBalancesResponse> {
constructor() {
super('sui.rpc.v2.ListBalancesResponse', [
{
no: 1,
name: 'balances',
kind: 'message',
repeat: 1 /*RepeatType.PACKED*/,
T: () => Balance,
},
{ no: 2, name: 'next_page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListBalancesResponse
*/
export const ListBalancesResponse = new ListBalancesResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Balance$Type extends MessageType<Balance> {
constructor() {
super('sui.rpc.v2.Balance', [
{ no: 1, name: 'coin_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 3,
name: 'balance',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
{
no: 4,
name: 'address_balance',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
{
no: 5,
name: 'coin_balance',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.Balance
*/
export const Balance = new Balance$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListDynamicFieldsRequest$Type extends MessageType<ListDynamicFieldsRequest> {
constructor() {
super('sui.rpc.v2.ListDynamicFieldsRequest', [
{ no: 1, name: 'parent', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'page_size', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
{ no: 3, name: 'page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
{ no: 4, name: 'read_mask', kind: 'message', T: () => FieldMask },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListDynamicFieldsRequest
*/
export const ListDynamicFieldsRequest = new ListDynamicFieldsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListDynamicFieldsResponse$Type extends MessageType<ListDynamicFieldsResponse> {
constructor() {
super('sui.rpc.v2.ListDynamicFieldsResponse', [
{
no: 1,
name: 'dynamic_fields',
kind: 'message',
repeat: 1 /*RepeatType.PACKED*/,
T: () => DynamicField,
},
{ no: 2, name: 'next_page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListDynamicFieldsResponse
*/
export const ListDynamicFieldsResponse = new ListDynamicFieldsResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class DynamicField$Type extends MessageType<DynamicField> {
constructor() {
super('sui.rpc.v2.DynamicField', [
{
no: 1,
name: 'kind',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.DynamicField.DynamicFieldKind', DynamicField_DynamicFieldKind],
},
{ no: 2, name: 'parent', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: 'field_id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 4, name: 'field_object', kind: 'message', T: () => Object },
{ no: 5, name: 'name', kind: 'message', T: () => Bcs },
{ no: 6, name: 'value', kind: 'message', T: () => Bcs },
{ no: 7, name: 'value_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 8, name: 'child_id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 9, name: 'child_object', kind: 'message', T: () => Object },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.DynamicField
*/
export const DynamicField = new DynamicField$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListOwnedObjectsRequest$Type extends MessageType<ListOwnedObjectsRequest> {
constructor() {
super('sui.rpc.v2.ListOwnedObjectsRequest', [
{ no: 1, name: 'owner', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: 'page_size', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },
{ no: 3, name: 'page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
{ no: 4, name: 'read_mask', kind: 'message', T: () => FieldMask },
{ no: 5, name: 'object_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListOwnedObjectsRequest
*/
export const ListOwnedObjectsRequest = new ListOwnedObjectsRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class ListOwnedObjectsResponse$Type extends MessageType<ListOwnedObjectsResponse> {
constructor() {
super('sui.rpc.v2.ListOwnedObjectsResponse', [
{ no: 1, name: 'objects', kind: 'message', repeat: 1 /*RepeatType.PACKED*/, T: () => Object },
{ no: 2, name: 'next_page_token', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.ListOwnedObjectsResponse
*/
export const ListOwnedObjectsResponse = new ListOwnedObjectsResponse$Type();
/**
* @generated ServiceType for protobuf service sui.rpc.v2.StateService
*/
export const StateService = new ServiceType('sui.rpc.v2.StateService', [
{
name: 'ListDynamicFields',
options: {},
I: ListDynamicFieldsRequest,
O: ListDynamicFieldsResponse,
},
{
name: 'ListOwnedObjects',
options: {},
I: ListOwnedObjectsRequest,
O: ListOwnedObjectsResponse,
},
{ name: 'GetCoinInfo', options: {}, I: GetCoinInfoRequest, O: GetCoinInfoResponse },
{ name: 'GetBalance', options: {}, I: GetBalanceRequest, O: GetBalanceResponse },
{ name: 'ListBalances', options: {}, I: ListBalancesRequest, O: ListBalancesResponse },
]);