import { MessageType } from "@protobuf-ts/runtime";

//#region src/grpc/proto/sui/rpc/v2/move_package.d.ts
/**
 * A Move Package
 *
 * @generated from protobuf message sui.rpc.v2.Package
 */
interface Package {
  /**
   * The PackageId of this package
   *
   * A package's `storage_id` is the Sui ObjectId of the package on-chain.
   * Outside of system packages the `storage_id` for every package version is
   * different.
   *
   * @generated from protobuf field: optional string storage_id = 1;
   */
  storageId?: string;
  /**
   * The PackageId of the first published version of this package.
   *
   * A package's `original_id` (sometimes also called its `runtime_id`) is the
   * `storage_id` of the first version of this package that has been published.
   * The `original_id`/`runtime_id` is stable across all versions of the
   * package and does not ever change.
   *
   * @generated from protobuf field: optional string original_id = 2;
   */
  originalId?: string;
  /**
   * The version of this package
   *
   * @generated from protobuf field: optional uint64 version = 3;
   */
  version?: bigint;
  /**
   * The modules defined by this package
   *
   * @generated from protobuf field: repeated sui.rpc.v2.Module modules = 4;
   */
  modules: Module[];
  /**
   * List of datatype origins for mapping datatypes to a package version where
   * it was first defined
   *
   * @generated from protobuf field: repeated sui.rpc.v2.TypeOrigin type_origins = 5;
   */
  typeOrigins: TypeOrigin[];
  /**
   * The package's transitive dependencies as a mapping from the package's
   * runtime Id (the Id it is referred to by in other packages) to its
   * storage Id (the Id it is loaded from on chain).
   *
   * @generated from protobuf field: repeated sui.rpc.v2.Linkage linkage = 6;
   */
  linkage: Linkage[];
}
/**
 * A Move Module.
 *
 * @generated from protobuf message sui.rpc.v2.Module
 */
interface Module {
  /**
   * Name of this module.
   *
   * @generated from protobuf field: optional string name = 1;
   */
  name?: string;
  /**
   * Serialized bytecode of the module.
   *
   * @generated from protobuf field: optional bytes contents = 2;
   */
  contents?: Uint8Array;
  /**
   * List of DataTypes defined by this module.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.DatatypeDescriptor datatypes = 3;
   */
  datatypes: DatatypeDescriptor[];
  /**
   * List of Functions defined by this module.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.FunctionDescriptor functions = 4;
   */
  functions: FunctionDescriptor[];
}
/**
 * Describes a Move Datatype.
 *
 * @generated from protobuf message sui.rpc.v2.DatatypeDescriptor
 */
interface DatatypeDescriptor {
  /**
   * Fully qualified name of this Datatype.
   *
   * This is `<defining_id>::<module>::<name>`
   *
   * @generated from protobuf field: optional string type_name = 1;
   */
  typeName?: string;
  /**
   * PackageId of the package where this Datatype is defined.
   *
   * A type's `defining_id` is the `storage_id` of the package version that first introduced or added that type.
   *
   * @generated from protobuf field: optional string defining_id = 2;
   */
  definingId?: string;
  /**
   * Name of the module where this Datatype is defined
   *
   * @generated from protobuf field: optional string module = 3;
   */
  module?: string;
  /**
   * Name of this Datatype
   *
   * @generated from protobuf field: optional string name = 4;
   */
  name?: string;
  /**
   * This type's abilities
   *
   * @generated from protobuf field: repeated sui.rpc.v2.Ability abilities = 5;
   */
  abilities: Ability[];
  /**
   * Ability constraints and phantom status for this type's generic type parameters
   *
   * @generated from protobuf field: repeated sui.rpc.v2.TypeParameter type_parameters = 6;
   */
  typeParameters: TypeParameter[];
  /**
   * Indicates whether this datatype is a 'STRUCT' or an 'ENUM'
   *
   * @generated from protobuf field: optional sui.rpc.v2.DatatypeDescriptor.DatatypeKind kind = 7;
   */
  kind?: DatatypeDescriptor_DatatypeKind;
  /**
   * Set of fields if this Datatype is a struct.
   *
   * The order of the entries is the order of how the fields are defined.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.FieldDescriptor fields = 8;
   */
  fields: FieldDescriptor[];
  /**
   * Set of variants if this Datatype is an enum.
   *
   * The order of the entries is the order of how the variants are defined.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.VariantDescriptor variants = 9;
   */
  variants: VariantDescriptor[];
}
/**
 * @generated from protobuf enum sui.rpc.v2.DatatypeDescriptor.DatatypeKind
 */
declare enum DatatypeDescriptor_DatatypeKind {
  /**
   * @generated from protobuf enum value: DATATYPE_KIND_UNKNOWN = 0;
   */
  DATATYPE_KIND_UNKNOWN = 0,
  /**
   * @generated from protobuf enum value: STRUCT = 1;
   */
  STRUCT = 1,
  /**
   * @generated from protobuf enum value: ENUM = 2;
   */
  ENUM = 2
}
/**
 * A generic type parameter used in the declaration of a struct or enum.
 *
 * @generated from protobuf message sui.rpc.v2.TypeParameter
 */
interface TypeParameter {
  /**
   * The type parameter constraints
   *
   * @generated from protobuf field: repeated sui.rpc.v2.Ability constraints = 1;
   */
  constraints: Ability[];
  /**
   * Whether the parameter is declared as phantom
   *
   * @generated from protobuf field: optional bool is_phantom = 2;
   */
  isPhantom?: boolean;
}
/**
 * Descriptor of a field that belongs to a struct or enum variant
 *
 * @generated from protobuf message sui.rpc.v2.FieldDescriptor
 */
interface FieldDescriptor {
  /**
   * Name of the field
   *
   * @generated from protobuf field: optional string name = 1;
   */
  name?: string;
  /**
   * Order or position of the field in the struct or enum variant definition.
   *
   * @generated from protobuf field: optional uint32 position = 2;
   */
  position?: number;
  /**
   * The type of the field
   *
   * @generated from protobuf field: optional sui.rpc.v2.OpenSignatureBody type = 3;
   */
  type?: OpenSignatureBody;
}
/**
 * Descriptor of an enum variant
 *
 * @generated from protobuf message sui.rpc.v2.VariantDescriptor
 */
interface VariantDescriptor {
  /**
   * Name of the variant
   *
   * @generated from protobuf field: optional string name = 1;
   */
  name?: string;
  /**
   * Order or position of the variant in the enum definition.
   *
   * @generated from protobuf field: optional uint32 position = 2;
   */
  position?: number;
  /**
   * Set of fields defined by this variant.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.FieldDescriptor fields = 3;
   */
  fields: FieldDescriptor[];
}
/**
 * Representation of a type signature that could appear as a field type for a struct or enum
 *
 * @generated from protobuf message sui.rpc.v2.OpenSignatureBody
 */
interface OpenSignatureBody {
  /**
   * Type of this signature
   *
   * @generated from protobuf field: optional sui.rpc.v2.OpenSignatureBody.Type type = 1;
   */
  type?: OpenSignatureBody_Type;
  /**
   * Fully qualified name of the datatype when `type` is `DATATYPE`
   *
   * @generated from protobuf field: optional string type_name = 2;
   */
  typeName?: string;
  /**
   * Set when `type` is `VECTOR` or `DATATYPE`
   *
   * @generated from protobuf field: repeated sui.rpc.v2.OpenSignatureBody type_parameter_instantiation = 3;
   */
  typeParameterInstantiation: OpenSignatureBody[];
  /**
   * Position of the type parameter as defined in the containing data type descriptor when `type` is `TYPE_PARAMETER`
   *
   * @generated from protobuf field: optional uint32 type_parameter = 4;
   */
  typeParameter?: number;
}
/**
 * @generated from protobuf enum sui.rpc.v2.OpenSignatureBody.Type
 */
declare enum OpenSignatureBody_Type {
  /**
   * @generated from protobuf enum value: TYPE_UNKNOWN = 0;
   */
  TYPE_UNKNOWN = 0,
  /**
   * @generated from protobuf enum value: ADDRESS = 1;
   */
  ADDRESS = 1,
  /**
   * @generated from protobuf enum value: BOOL = 2;
   */
  BOOL = 2,
  /**
   * @generated from protobuf enum value: U8 = 3;
   */
  U8 = 3,
  /**
   * @generated from protobuf enum value: U16 = 4;
   */
  U16 = 4,
  /**
   * @generated from protobuf enum value: U32 = 5;
   */
  U32 = 5,
  /**
   * @generated from protobuf enum value: U64 = 6;
   */
  U64 = 6,
  /**
   * @generated from protobuf enum value: U128 = 7;
   */
  U128 = 7,
  /**
   * @generated from protobuf enum value: U256 = 8;
   */
  U256 = 8,
  /**
   * @generated from protobuf enum value: VECTOR = 9;
   */
  VECTOR = 9,
  /**
   * @generated from protobuf enum value: DATATYPE = 10;
   */
  DATATYPE = 10,
  /**
   * @generated from protobuf enum value: TYPE_PARAMETER = 11;
   */
  TYPE_PARAMETER = 11
}
/**
 * Descriptor of a Move function
 *
 * @generated from protobuf message sui.rpc.v2.FunctionDescriptor
 */
interface FunctionDescriptor {
  /**
   * Name of the function
   *
   * @generated from protobuf field: optional string name = 1;
   */
  name?: string;
  /**
   * Whether the function is `public`, `private` or `public(friend)`
   *
   * @generated from protobuf field: optional sui.rpc.v2.FunctionDescriptor.Visibility visibility = 5;
   */
  visibility?: FunctionDescriptor_Visibility;
  /**
   * Whether the function is marked `entry` or not.
   *
   * @generated from protobuf field: optional bool is_entry = 6;
   */
  isEntry?: boolean;
  /**
   * Ability constraints for type parameters
   *
   * @generated from protobuf field: repeated sui.rpc.v2.TypeParameter type_parameters = 7;
   */
  typeParameters: TypeParameter[];
  /**
   * Formal parameter types.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.OpenSignature parameters = 8;
   */
  parameters: OpenSignature[];
  /**
   * Return types.
   *
   * @generated from protobuf field: repeated sui.rpc.v2.OpenSignature returns = 9;
   */
  returns: OpenSignature[];
}
/**
 * @generated from protobuf enum sui.rpc.v2.FunctionDescriptor.Visibility
 */
declare enum FunctionDescriptor_Visibility {
  /**
   * @generated from protobuf enum value: VISIBILITY_UNKNOWN = 0;
   */
  VISIBILITY_UNKNOWN = 0,
  /**
   * @generated from protobuf enum value: PRIVATE = 1;
   */
  PRIVATE = 1,
  /**
   * @generated from protobuf enum value: PUBLIC = 2;
   */
  PUBLIC = 2,
  /**
   * @generated from protobuf enum value: FRIEND = 3;
   */
  FRIEND = 3
}
/**
 * Representation of a type signature that could appear as a function parameter or return value.
 *
 * @generated from protobuf message sui.rpc.v2.OpenSignature
 */
interface OpenSignature {
  /**
   * @generated from protobuf field: optional sui.rpc.v2.OpenSignature.Reference reference = 1;
   */
  reference?: OpenSignature_Reference;
  /**
   * @generated from protobuf field: optional sui.rpc.v2.OpenSignatureBody body = 2;
   */
  body?: OpenSignatureBody;
}
/**
 * @generated from protobuf enum sui.rpc.v2.OpenSignature.Reference
 */
declare enum OpenSignature_Reference {
  /**
   * @generated from protobuf enum value: REFERENCE_UNKNOWN = 0;
   */
  REFERENCE_UNKNOWN = 0,
  /**
   * @generated from protobuf enum value: IMMUTABLE = 1;
   */
  IMMUTABLE = 1,
  /**
   * @generated from protobuf enum value: MUTABLE = 2;
   */
  MUTABLE = 2
}
/**
 * Identifies a struct and the module it was defined in.
 *
 * @generated from protobuf message sui.rpc.v2.TypeOrigin
 */
interface TypeOrigin {
  /**
   * @generated from protobuf field: optional string module_name = 1;
   */
  moduleName?: string;
  /**
   * @generated from protobuf field: optional string datatype_name = 2;
   */
  datatypeName?: string;
  /**
   * @generated from protobuf field: optional string package_id = 3;
   */
  packageId?: string;
}
/**
 * Upgraded package info for the linkage table.
 *
 * @generated from protobuf message sui.rpc.v2.Linkage
 */
interface Linkage {
  /**
   * Id of the original package.
   *
   * @generated from protobuf field: optional string original_id = 1;
   */
  originalId?: string;
  /**
   * Id of the upgraded package.
   *
   * @generated from protobuf field: optional string upgraded_id = 2;
   */
  upgradedId?: string;
  /**
   * Version of the upgraded package.
   *
   * @generated from protobuf field: optional uint64 upgraded_version = 3;
   */
  upgradedVersion?: bigint;
}
/**
 * An `Ability` classifies what operations are permitted for a given type
 *
 * @generated from protobuf enum sui.rpc.v2.Ability
 */
declare enum Ability {
  /**
   * @generated from protobuf enum value: ABILITY_UNKNOWN = 0;
   */
  ABILITY_UNKNOWN = 0,
  /**
   * Allows values of types with this ability to be copied
   *
   * @generated from protobuf enum value: COPY = 1;
   */
  COPY = 1,
  /**
   * Allows values of types with this ability to be dropped.
   *
   * @generated from protobuf enum value: DROP = 2;
   */
  DROP = 2,
  /**
   * Allows values of types with this ability to exist inside a struct in global storage
   *
   * @generated from protobuf enum value: STORE = 3;
   */
  STORE = 3,
  /**
   * Allows the type to serve as a key for global storage operations
   *
   * @generated from protobuf enum value: KEY = 4;
   */
  KEY = 4
}
declare class Package$Type extends MessageType<Package> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.Package
 */
declare const Package: Package$Type;
declare class Module$Type extends MessageType<Module> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.Module
 */
declare const Module: Module$Type;
declare class DatatypeDescriptor$Type extends MessageType<DatatypeDescriptor> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.DatatypeDescriptor
 */
declare const DatatypeDescriptor: DatatypeDescriptor$Type;
declare class TypeParameter$Type extends MessageType<TypeParameter> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.TypeParameter
 */
declare const TypeParameter: TypeParameter$Type;
declare class FieldDescriptor$Type extends MessageType<FieldDescriptor> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.FieldDescriptor
 */
declare const FieldDescriptor: FieldDescriptor$Type;
declare class VariantDescriptor$Type extends MessageType<VariantDescriptor> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.VariantDescriptor
 */
declare const VariantDescriptor: VariantDescriptor$Type;
declare class OpenSignatureBody$Type extends MessageType<OpenSignatureBody> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.OpenSignatureBody
 */
declare const OpenSignatureBody: OpenSignatureBody$Type;
declare class FunctionDescriptor$Type extends MessageType<FunctionDescriptor> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.FunctionDescriptor
 */
declare const FunctionDescriptor: FunctionDescriptor$Type;
declare class OpenSignature$Type extends MessageType<OpenSignature> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.OpenSignature
 */
declare const OpenSignature: OpenSignature$Type;
declare class TypeOrigin$Type extends MessageType<TypeOrigin> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.TypeOrigin
 */
declare const TypeOrigin: TypeOrigin$Type;
declare class Linkage$Type extends MessageType<Linkage> {
  constructor();
}
/**
 * @generated MessageType for protobuf message sui.rpc.v2.Linkage
 */
declare const Linkage: Linkage$Type;
//#endregion
export { Ability, DatatypeDescriptor, DatatypeDescriptor_DatatypeKind, FieldDescriptor, FunctionDescriptor, FunctionDescriptor_Visibility, Linkage, Module, OpenSignature, OpenSignatureBody, OpenSignatureBody_Type, OpenSignature_Reference, Package, TypeOrigin, TypeParameter, VariantDescriptor };
//# sourceMappingURL=move_package.d.mts.map