// 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/input.proto" (package "sui.rpc.v2", syntax proto3)
// tslint:disable
// @ts-nocheck
//
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//
import { MessageType } from '@protobuf-ts/runtime';
import { Value } from '../../../google/protobuf/struct.js';
/**
* An input to a user transaction.
*
* @generated from protobuf message sui.rpc.v2.Input
*/
export interface Input {
/**
* @generated from protobuf field: optional sui.rpc.v2.Input.InputKind kind = 1;
*/
kind?: Input_InputKind;
/**
* A move value serialized as BCS.
*
* For normal operations this is required to be a move primitive type and not contain structs
* or objects.
*
* @generated from protobuf field: optional bytes pure = 2;
*/
pure?: Uint8Array;
/**
* `ObjectId` of the object input.
*
* @generated from protobuf field: optional string object_id = 3;
*/
objectId?: string;
/**
* Requested version of the input object when `kind` is `IMMUTABLE_OR_OWNED`
* or `RECEIVING` or if `kind` is `SHARED` this is the initial version of the
* object when it was shared
*
* @generated from protobuf field: optional uint64 version = 4;
*/
version?: bigint;
/**
* The digest of this object.
*
* @generated from protobuf field: optional string digest = 5;
*/
digest?: string;
/**
* Controls whether the caller asks for a mutable reference to the shared
* object.
*
* @generated from protobuf field: optional bool mutable = 6;
*/
mutable?: boolean;
/**
* NOTE: For backwards compatibility purposes the addition of the new
* `NON_EXCLUSIVE_WRITE` mutability variant requires providing a new field.
* The old `mutable` field will continue to be populated and respected as an
* input for the time being.
*
* @generated from protobuf field: optional sui.rpc.v2.Input.Mutability mutability = 7;
*/
mutability?: Input_Mutability;
/**
* Fund Reservation information if `kind` is `FUNDS_WITHDRAWAL`.
*
* @generated from protobuf field: optional sui.rpc.v2.FundsWithdrawal funds_withdrawal = 8;
*/
fundsWithdrawal?: FundsWithdrawal;
/**
* A literal value
*
* INPUT ONLY
*
* @generated from protobuf field: optional google.protobuf.Value literal = 1000;
*/
literal?: Value;
}
/**
* @generated from protobuf enum sui.rpc.v2.Input.InputKind
*/
export enum Input_InputKind {
/**
* @generated from protobuf enum value: INPUT_KIND_UNKNOWN = 0;
*/
INPUT_KIND_UNKNOWN = 0,
/**
* A move value serialized as BCS.
*
* @generated from protobuf enum value: PURE = 1;
*/
PURE = 1,
/**
* A Move object that is either immutable or address owned.
*
* @generated from protobuf enum value: IMMUTABLE_OR_OWNED = 2;
*/
IMMUTABLE_OR_OWNED = 2,
/**
* A Move object whose owner is "Shared".
*
* @generated from protobuf enum value: SHARED = 3;
*/
SHARED = 3,
/**
* A Move object that is attempted to be received in this transaction.
*
* @generated from protobuf enum value: RECEIVING = 4;
*/
RECEIVING = 4,
/**
* Reservation to withdraw balance from a funds accumulator
*
* @generated from protobuf enum value: FUNDS_WITHDRAWAL = 5;
*/
FUNDS_WITHDRAWAL = 5,
}
/**
* @generated from protobuf enum sui.rpc.v2.Input.Mutability
*/
export enum Input_Mutability {
/**
* @generated from protobuf enum value: MUTABILITY_UNKNOWN = 0;
*/
MUTABILITY_UNKNOWN = 0,
/**
* @generated from protobuf enum value: IMMUTABLE = 1;
*/
IMMUTABLE = 1,
/**
* @generated from protobuf enum value: MUTABLE = 2;
*/
MUTABLE = 2,
/**
* Non-exclusive write is used to allow multiple transactions to
* simultaneously add disjoint dynamic fields to an object.
* (Currently only used by settlement transactions).
*
* @generated from protobuf enum value: NON_EXCLUSIVE_WRITE = 3;
*/
NON_EXCLUSIVE_WRITE = 3,
}
/**
* @generated from protobuf message sui.rpc.v2.FundsWithdrawal
*/
export interface FundsWithdrawal {
/**
* @generated from protobuf field: optional uint64 amount = 1;
*/
amount?: bigint;
/**
* @generated from protobuf field: optional string coin_type = 2;
*/
coinType?: string;
/**
* @generated from protobuf field: optional sui.rpc.v2.FundsWithdrawal.Source source = 3;
*/
source?: FundsWithdrawal_Source;
}
/**
* @generated from protobuf enum sui.rpc.v2.FundsWithdrawal.Source
*/
export enum FundsWithdrawal_Source {
/**
* @generated from protobuf enum value: SOURCE_UNKNOWN = 0;
*/
SOURCE_UNKNOWN = 0,
/**
* @generated from protobuf enum value: SENDER = 1;
*/
SENDER = 1,
/**
* @generated from protobuf enum value: SPONSOR = 2;
*/
SPONSOR = 2,
}
// @generated message type with reflection information, may provide speed optimized methods
class Input$Type extends MessageType {
constructor() {
super('sui.rpc.v2.Input', [
{
no: 1,
name: 'kind',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.Input.InputKind', Input_InputKind],
},
{ no: 2, name: 'pure', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },
{ no: 3, name: 'object_id', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 4,
name: 'version',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
{ no: 5, name: 'digest', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 6, name: 'mutable', kind: 'scalar', opt: true, T: 8 /*ScalarType.BOOL*/ },
{
no: 7,
name: 'mutability',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.Input.Mutability', Input_Mutability],
},
{ no: 8, name: 'funds_withdrawal', kind: 'message', T: () => FundsWithdrawal },
{ no: 1000, name: 'literal', kind: 'message', T: () => Value },
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.Input
*/
export const Input = new Input$Type();
// @generated message type with reflection information, may provide speed optimized methods
class FundsWithdrawal$Type extends MessageType {
constructor() {
super('sui.rpc.v2.FundsWithdrawal', [
{
no: 1,
name: 'amount',
kind: 'scalar',
opt: true,
T: 4 /*ScalarType.UINT64*/,
L: 0 /*LongType.BIGINT*/,
},
{ no: 2, name: 'coin_type', kind: 'scalar', opt: true, T: 9 /*ScalarType.STRING*/ },
{
no: 3,
name: 'source',
kind: 'enum',
opt: true,
T: () => ['sui.rpc.v2.FundsWithdrawal.Source', FundsWithdrawal_Source],
},
]);
}
}
/**
* @generated MessageType for protobuf message sui.rpc.v2.FundsWithdrawal
*/
export const FundsWithdrawal = new FundsWithdrawal$Type();