@ocap/types
Version:
Typescript definitions generated from protobuf
488 lines (441 loc) • 11.2 kB
TypeScript
// package: ocap
// file: tx.proto
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
import * as type_pb from "./type_pb";
export type TAccountMigrateTx = {
pk: Uint8Array | string,
type?: type_pb.TWalletType,
address: string,
data?: google_protobuf_any_pb.Any,
}
export type TDeclareTx = {
moniker: string,
issuer: string,
data?: google_protobuf_any_pb.Any,
}
export type TDelegateOp = {
typeUrl: string,
rules: Array<string>,
limit?: type_pb.TDelegateLimit,
}
export type TDelegateTx = {
address: string,
to: string,
ops: Array<TDelegateOp>,
deny: Array<string>,
validUntil: number,
data?: google_protobuf_any_pb.Any,
}
export type TRevokeDelegateTx = {
address: string,
to: string,
typeUrls: Array<string>,
data?: google_protobuf_any_pb.Any,
}
export type TUpgradeNodeTx = {
height: number,
version: string,
override: boolean,
}
export type TExchangeInfo = {
value?: type_pb.TBigUint,
assets: Array<string>,
}
export type TExchangeInfoV2 = {
value?: type_pb.TBigUint,
assets: Array<string>,
tokens: Array<type_pb.TTokenInput>,
}
export type TExchangeTx = {
to: string,
sender?: TExchangeInfo,
receiver?: TExchangeInfo,
expiredAt?: google_protobuf_timestamp_pb.Timestamp,
data?: google_protobuf_any_pb.Any,
}
export type TExchangeV2Tx = {
to: string,
sender?: TExchangeInfoV2,
receiver?: TExchangeInfoV2,
expiredAt?: google_protobuf_timestamp_pb.Timestamp,
data?: google_protobuf_any_pb.Any,
}
export type TTransferTx = {
to: string,
value?: type_pb.TBigUint,
assets: Array<string>,
data?: google_protobuf_any_pb.Any,
}
export type TTransferV2Tx = {
to: string,
value?: type_pb.TBigUint,
assets: Array<string>,
tokens: Array<type_pb.TTokenInput>,
data?: google_protobuf_any_pb.Any,
}
export type TTransferV3Tx = {
inputs: Array<type_pb.TTransactionInput>,
outputs: Array<type_pb.TTransactionInput>,
data?: google_protobuf_any_pb.Any,
}
export type TCreateTokenTx = {
name: string,
description: string,
symbol: string,
unit: string,
decimal: number,
icon: string,
totalSupply: string,
address: string,
initialSupply: string,
maxTotalSupply: string,
foreignToken?: type_pb.TForeignToken,
spenders: Array<string>,
data?: google_protobuf_any_pb.Any,
}
export type TAssetFactoryInput = {
value: string,
tokens: Array<type_pb.TTokenInput>,
assets: Array<string>,
variables: Array<type_pb.TVariableInput>,
}
export type TAcquireAssetV2Tx = {
factory: string,
address: string,
assets: Array<string>,
variables: Array<type_pb.TVariableInput>,
issuer?: type_pb.TNFTIssuer,
data?: google_protobuf_any_pb.Any,
}
export type TAcquireAssetV3Tx = {
factory: string,
address: string,
inputs: Array<type_pb.TTransactionInput>,
owner: string,
variables: Array<type_pb.TVariableInput>,
issuer?: type_pb.TNFTIssuer,
data?: google_protobuf_any_pb.Any,
}
export type TMintAssetTx = {
factory: string,
address: string,
assets: Array<string>,
variables: Array<type_pb.TVariableInput>,
owner: string,
data?: google_protobuf_any_pb.Any,
}
export type TCreateAssetTx = {
moniker: string,
data?: google_protobuf_any_pb.Any,
readonly: boolean,
transferrable: boolean,
ttl: number,
parent: string,
address: string,
issuer: string,
endpoint?: type_pb.TNFTEndpoint,
display?: type_pb.TNFTDisplay,
tags: Array<string>,
}
export type TUpdateAssetTx = {
address: string,
moniker: string,
consumed: boolean,
data?: google_protobuf_any_pb.Any,
}
export type TConsumeAssetTx = {
address: string,
data?: google_protobuf_any_pb.Any,
}
export type TCreateFactoryTx = {
name: string,
description: string,
settlement: string,
limit: number,
trustedIssuers: Array<string>,
input?: TAssetFactoryInput,
output?: TCreateAssetTx,
hooks: Array<type_pb.TAssetFactoryHook>,
address: string,
display?: type_pb.TNFTDisplay,
data?: google_protobuf_any_pb.Any,
}
export type TStakeTx = {
address: string,
receiver: string,
inputs: Array<type_pb.TTransactionInput>,
locked: boolean,
message: string,
revokeWaitingPeriod: number,
slashers: Array<string>,
nonce: string,
data?: google_protobuf_any_pb.Any,
}
export type TRevokeStakeTx = {
address: string,
outputs: Array<type_pb.TTransactionInput>,
data?: google_protobuf_any_pb.Any,
}
export type TClaimStakeTx = {
address: string,
evidence?: type_pb.TEvidence,
data?: google_protobuf_any_pb.Any,
}
export type TSlashStakeTx = {
address: string,
outputs: Array<type_pb.TTransactionInput>,
message: string,
data?: google_protobuf_any_pb.Any,
}
export type TReturnStakeTx = {
address: string,
outputs: Array<type_pb.TTransactionInput>,
message: string,
data?: google_protobuf_any_pb.Any,
}
export type TCreateRollupTx = {
address: string,
tokenAddress: string,
vaultAddress: string,
contractAddress: string,
seedValidators: Array<type_pb.TRollupValidator>,
minStakeAmount: string,
maxStakeAmount: string,
minSignerCount: number,
maxSignerCount: number,
minBlockSize: number,
maxBlockSize: number,
minBlockInterval: number,
minBlockConfirmation: number,
foreignChainType: string,
foreignChainId: string,
depositFeeRate: number,
withdrawFeeRate: number,
proposerFeeShare: number,
minDepositAmount: string,
minWithdrawAmount: string,
maxDepositAmount: string,
maxWithdrawAmount: string,
minDepositFee: string,
maxDepositFee: string,
minWithdrawFee: string,
maxWithdrawFee: string,
paused: boolean,
leaveWaitingPeriod: number,
publisherFeeShare: number,
publishWaitingPeriod: number,
publishSlashRate: number,
data?: google_protobuf_any_pb.Any,
}
export type TUpdateRollupTx = {
minStakeAmount: string,
maxStakeAmount: string,
minSignerCount: number,
maxSignerCount: number,
minBlockSize: number,
maxBlockSize: number,
minBlockInterval: number,
minBlockConfirmation: number,
depositFeeRate: number,
withdrawFeeRate: number,
proposerFeeShare: number,
minDepositAmount: string,
minWithdrawAmount: string,
maxDepositAmount: string,
maxWithdrawAmount: string,
minDepositFee: string,
maxDepositFee: string,
minWithdrawFee: string,
maxWithdrawFee: string,
publisherFeeShare: number,
leaveWaitingPeriod: number,
publishWaitingPeriod: number,
publishSlashRate: number,
rollup: string,
data?: google_protobuf_any_pb.Any,
}
export type TJoinRollupTx = {
rollup: string,
endpoint: string,
evidence?: type_pb.TEvidence,
signatures: Array<type_pb.TMultisig>,
data?: google_protobuf_any_pb.Any,
}
export type TLeaveRollupTx = {
rollup: string,
evidence?: type_pb.TEvidence,
signatures: Array<type_pb.TMultisig>,
data?: google_protobuf_any_pb.Any,
}
export type TCreateRollupBlockTx = {
hash: string,
height: number,
merkleRoot: string,
previousHash: string,
txsHash: string,
txs: Array<string>,
proposer: string,
signatures: Array<type_pb.TMultisig>,
rollup: string,
minReward: string,
governance: boolean,
data?: google_protobuf_any_pb.Any,
}
export type TClaimBlockRewardTx = {
rollup: string,
blockHeight: number,
blockHash: string,
evidence?: type_pb.TEvidence,
publisher: string,
data?: google_protobuf_any_pb.Any,
}
export type TPauseRollupTx = {
rollup: string,
data?: google_protobuf_any_pb.Any,
}
export type TResumeRollupTx = {
rollup: string,
data?: google_protobuf_any_pb.Any,
}
export type TCloseRollupTx = {
rollup: string,
message: string,
data?: google_protobuf_any_pb.Any,
}
export type TMigrateRollupTx = {
rollup: string,
to: string,
type: string,
message: string,
data?: google_protobuf_any_pb.Any,
}
export type TDepositTokenV2Tx = {
token?: type_pb.TTokenInput,
to: string,
proposer: string,
evidence?: type_pb.TEvidence,
rollup: string,
actualFee: string,
data?: google_protobuf_any_pb.Any,
}
export type TWithdrawTokenV2Tx = {
token?: type_pb.TTokenInput,
to: string,
rollup: string,
proposer: string,
maxFee: string,
actualFee: string,
data?: google_protobuf_any_pb.Any,
}
export type TCreateTokenFactoryTx = {
address: string,
feeRate: number,
token?: type_pb.TTokenInfo,
reserveAddress: string,
curve?: type_pb.TCurveConfig,
data?: google_protobuf_any_pb.Any,
}
export type TUpdateTokenFactoryTx = {
address: string,
feeRate: number,
token?: type_pb.TTokenInfo,
data?: google_protobuf_any_pb.Any,
}
export type TMintTokenTx = {
tokenFactory: string,
amount: string,
inputs: Array<type_pb.TTransactionInput>,
receiver: string,
data?: google_protobuf_any_pb.Any,
}
export type TBurnTokenTx = {
tokenFactory: string,
inputs: Array<type_pb.TTransactionInput>,
minReserve: string,
receiver: string,
data?: google_protobuf_any_pb.Any,
}
export type TItxStub = {
declare?: TDeclareTx,
delegate?: TDelegateTx,
revokeDelegate?: TRevokeDelegateTx,
accountMigrate?: TAccountMigrateTx,
createAsset?: TCreateAssetTx,
updateAsset?: TUpdateAssetTx,
consumeAsset?: TConsumeAssetTx,
exchange?: TExchangeTx,
exchangeV2?: TExchangeV2Tx,
transfer?: TTransferTx,
transferV2?: TTransferV2Tx,
transferV3?: TTransferV3Tx,
createToken?: TCreateTokenTx,
depositToken?: TDepositTokenV2Tx,
withdrawToken?: TWithdrawTokenV2Tx,
createTokenFactory?: TCreateTokenFactoryTx,
updateTokenFactory?: TUpdateTokenFactoryTx,
mintToken?: TMintTokenTx,
burnToken?: TBurnTokenTx,
createFactory?: TCreateFactoryTx,
acquireAssetV2?: TAcquireAssetV2Tx,
acquireAssetV3?: TAcquireAssetV3Tx,
mintAsset?: TMintAssetTx,
stake?: TStakeTx,
revokeStake?: TRevokeStakeTx,
claimStake?: TClaimStakeTx,
slashStake?: TSlashStakeTx,
returnStake?: TReturnStakeTx,
upgradeNode?: TUpgradeNodeTx,
createRollup?: TCreateRollupTx,
updateRollup?: TUpdateRollupTx,
joinRollup?: TJoinRollupTx,
leaveRollup?: TLeaveRollupTx,
createRollupBlock?: TCreateRollupBlockTx,
claimBlockReward?: TClaimBlockRewardTx,
pauseRollup?: TPauseRollupTx,
resumeRollup?: TResumeRollupTx,
migrateRollup?: TMigrateRollupTx,
closeRollup?: TCloseRollupTx,
}
export enum ValueCase {
VALUE_NOT_SET = 0,
DECLARE = 1,
DELEGATE = 2,
REVOKE_DELEGATE = 3,
ACCOUNT_MIGRATE = 4,
CREATE_ASSET = 5,
UPDATE_ASSET = 6,
CONSUME_ASSET = 7,
EXCHANGE = 10,
EXCHANGE_V2 = 12,
TRANSFER = 13,
TRANSFER_V2 = 14,
TRANSFER_V3 = 15,
CREATE_TOKEN = 20,
DEPOSIT_TOKEN = 21,
WITHDRAW_TOKEN = 22,
CREATE_TOKEN_FACTORY = 23,
UPDATE_TOKEN_FACTORY = 24,
MINT_TOKEN = 25,
BURN_TOKEN = 26,
CREATE_FACTORY = 30,
ACQUIRE_ASSET_V2 = 31,
ACQUIRE_ASSET_V3 = 32,
MINT_ASSET = 33,
STAKE = 40,
REVOKE_STAKE = 41,
CLAIM_STAKE = 42,
SLASH_STAKE = 43,
RETURN_STAKE = 44,
UPGRADE_NODE = 49,
CREATE_ROLLUP = 50,
UPDATE_ROLLUP = 51,
JOIN_ROLLUP = 52,
LEAVE_ROLLUP = 53,
CREATE_ROLLUP_BLOCK = 54,
CLAIM_BLOCK_REWARD = 55,
PAUSE_ROLLUP = 56,
RESUME_ROLLUP = 57,
MIGRATE_ROLLUP = 58,
CLOSE_ROLLUP = 60,
}