import { MessageType } from "@protobuf-ts/runtime"; import { Memo } from "./kernel.js"; import { AccountAddress } from "./kernel.js"; /** * A CBOR encoded bytestring * * @generated from protobuf message concordium.v2.plt.Cbor */ export interface Cbor { /** * A CBOR encoded byte string. * * @generated from protobuf field: bytes value = 1; */ value: Uint8Array; } /** * Token ID: a unique symbol and identifier of a protocol level token. * * @generated from protobuf message concordium.v2.plt.TokenId */ export interface TokenId { /** * Unique identifier for the token, guaranteed to be distinct across the * entire concordium blockchain. The token id must be between 1 and 128 bytes long and consist of * only a-z, A-Z, 0-9, `.`, `%` and `-`. * * @generated from protobuf field: string value = 1; */ value: string; } /** * A token module reference. This is always 32 bytes long. * * @generated from protobuf message concordium.v2.plt.TokenModuleRef */ export interface TokenModuleRef { /** * @generated from protobuf field: bytes value = 1; */ value: Uint8Array; } /** * PLT amount representation. The actual amount is computed as * `value * 10^(-decimals)`. * * @generated from protobuf message concordium.v2.plt.TokenAmount */ export interface TokenAmount { /** * The digits of the amount. * * @generated from protobuf field: uint64 value = 1; */ value: bigint; /** * Number of decimals in the representation * * @generated from protobuf field: uint32 decimals = 2; */ decimals: number; } /** * Token state at the block level * * @generated from protobuf message concordium.v2.plt.TokenState */ export interface TokenState { /** * The reference of the module implementing this token. * * @generated from protobuf field: concordium.v2.plt.TokenModuleRef token_module_ref = 1; */ tokenModuleRef?: TokenModuleRef; /** * Number of decimals in the decimal number representation of amounts. * * @generated from protobuf field: uint32 decimals = 3; */ decimals: number; /** * The total available token supply. * * @generated from protobuf field: concordium.v2.plt.TokenAmount total_supply = 4; */ totalSupply?: TokenAmount; /** * Token module specific state, such as token name, feature flags, meta data. * * @generated from protobuf field: concordium.v2.plt.Cbor module_state = 5; */ moduleState?: Cbor; } /** * Token state at the account level * * @generated from protobuf message concordium.v2.plt.TokenAccountState */ export interface TokenAccountState { /** * The available balance. * * @generated from protobuf field: concordium.v2.plt.TokenAmount balance = 1; */ balance?: TokenAmount; /** * Token module specific account state, such as whether the account is on * the allow or deny list. * * @generated from protobuf field: optional concordium.v2.plt.Cbor module_state = 4; */ moduleState?: Cbor; } /** * Single token event originating from a token module as part of a token * transaction. * * @generated from protobuf message concordium.v2.plt.TokenModuleEvent */ export interface TokenModuleEvent { /** * The type of the event. * * @generated from protobuf field: string type = 1; */ type: string; /** * The CBOR encoded event details. * * @generated from protobuf field: concordium.v2.plt.Cbor details = 2; */ details?: Cbor; } /** * A token holder is an entity that can hold tokens. Currently, this is limited * to accounts, but in the future it may be extended to other entities. * * @generated from protobuf message concordium.v2.plt.TokenHolder */ export interface TokenHolder { /** * @generated from protobuf oneof: address */ address: { oneofKind: "account"; /** * The account address of the holder. * * @generated from protobuf field: concordium.v2.AccountAddress account = 1; */ account: AccountAddress; } | { oneofKind: undefined; }; } /** * An event emitted when a transfer of tokens from `from` to `to` is performed. * * @generated from protobuf message concordium.v2.plt.TokenTransferEvent */ export interface TokenTransferEvent { /** * The token holder from which the tokens are transferred. * * @generated from protobuf field: concordium.v2.plt.TokenHolder from = 1; */ from?: TokenHolder; /** * The token holder to which the tokens are transferred. * * @generated from protobuf field: concordium.v2.plt.TokenHolder to = 2; */ to?: TokenHolder; /** * The amount of tokens transferred. * * @generated from protobuf field: concordium.v2.plt.TokenAmount amount = 3; */ amount?: TokenAmount; /** * An optional memo field that can be used to attach a message to the token * transfer. * * @generated from protobuf field: optional concordium.v2.Memo memo = 4; */ memo?: Memo; } /** * An event emitted when the token supply is updated, i.e. by minting/burning * tokens to/from the balance of the `target`. * * @generated from protobuf message concordium.v2.plt.TokenSupplyUpdateEvent */ export interface TokenSupplyUpdateEvent { /** * The token holder the balance update is performed on. * * @generated from protobuf field: concordium.v2.plt.TokenHolder target = 1; */ target?: TokenHolder; /** * The balance difference to be applied to the target. * * @generated from protobuf field: concordium.v2.plt.TokenAmount amount = 2; */ amount?: TokenAmount; } /** * Token event originating from token transactions. * * @generated from protobuf message concordium.v2.plt.TokenEvent */ export interface TokenEvent { /** * The Token ID. * * @generated from protobuf field: concordium.v2.plt.TokenId token_id = 1; */ tokenId?: TokenId; /** * @generated from protobuf oneof: event */ event: { oneofKind: "moduleEvent"; /** * An event emitted by the token module. * * @generated from protobuf field: concordium.v2.plt.TokenModuleEvent module_event = 2; */ moduleEvent: TokenModuleEvent; } | { oneofKind: "transferEvent"; /** * An event emitted when a transfer of tokens is performed. * * @generated from protobuf field: concordium.v2.plt.TokenTransferEvent transfer_event = 3; */ transferEvent: TokenTransferEvent; } | { oneofKind: "mintEvent"; /** * An event emitted when the token supply is updated by minting tokens to a * token holder. * * @generated from protobuf field: concordium.v2.plt.TokenSupplyUpdateEvent mint_event = 4; */ mintEvent: TokenSupplyUpdateEvent; } | { oneofKind: "burnEvent"; /** * An event emitted when the token supply is updated by burning tokens from * the balance of a token holder. * * @generated from protobuf field: concordium.v2.plt.TokenSupplyUpdateEvent burn_event = 5; */ burnEvent: TokenSupplyUpdateEvent; } | { oneofKind: undefined; }; } /** * Token events originating from token transactions. * * @generated from protobuf message concordium.v2.plt.TokenEffect */ export interface TokenEffect { /** * Events emitted by the token. * * @generated from protobuf field: repeated concordium.v2.plt.TokenEvent events = 1; */ events: TokenEvent[]; } /** * Details provided by the token module in the event of rejecting a transaction. * * @generated from protobuf message concordium.v2.plt.TokenModuleRejectReason */ export interface TokenModuleRejectReason { /** * The Token ID of the protocol-level token. * * @generated from protobuf field: concordium.v2.plt.TokenId token_id = 1; */ tokenId?: TokenId; /** * The type of the reject reason. * * @generated from protobuf field: string type = 2; */ type: string; /** * (Optional) CBOR-encoded details. * * @generated from protobuf field: optional concordium.v2.plt.Cbor details = 3; */ details?: Cbor; } /** * Update payload for creating a new protocol-level token * * @generated from protobuf message concordium.v2.plt.CreatePLT */ export interface CreatePLT { /** * The Token ID of the protocol-level token. * * @generated from protobuf field: concordium.v2.plt.TokenId token_id = 1; */ tokenId?: TokenId; /** * The hash that identifies the token module implementation. * * @generated from protobuf field: concordium.v2.plt.TokenModuleRef token_module = 2; */ tokenModule?: TokenModuleRef; /** * The number of decimal places used in the representation of amounts of this * token. This determines the smallest representable fraction of the token. * This can be at most 255. * * @generated from protobuf field: uint32 decimals = 4; */ decimals: number; /** * The initialization parameters of the token, encoded in CBOR. * * @generated from protobuf field: concordium.v2.plt.Cbor initialization_parameters = 5; */ initializationParameters?: Cbor; } /** * Details about the creation of a protocol-level token. * * @generated from protobuf message concordium.v2.plt.TokenCreationDetails */ export interface TokenCreationDetails { /** * The update payload used to create the token. * * @generated from protobuf field: concordium.v2.plt.CreatePLT create_plt = 1; */ createPlt?: CreatePLT; /** * The events generated by the token module during the creation of the token. * * @generated from protobuf field: repeated concordium.v2.plt.TokenEvent events = 2; */ events: TokenEvent[]; } declare class Cbor$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.Cbor */ export declare const Cbor: Cbor$Type; declare class TokenId$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenId */ export declare const TokenId: TokenId$Type; declare class TokenModuleRef$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenModuleRef */ export declare const TokenModuleRef: TokenModuleRef$Type; declare class TokenAmount$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenAmount */ export declare const TokenAmount: TokenAmount$Type; declare class TokenState$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenState */ export declare const TokenState: TokenState$Type; declare class TokenAccountState$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenAccountState */ export declare const TokenAccountState: TokenAccountState$Type; declare class TokenModuleEvent$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenModuleEvent */ export declare const TokenModuleEvent: TokenModuleEvent$Type; declare class TokenHolder$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenHolder */ export declare const TokenHolder: TokenHolder$Type; declare class TokenTransferEvent$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenTransferEvent */ export declare const TokenTransferEvent: TokenTransferEvent$Type; declare class TokenSupplyUpdateEvent$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenSupplyUpdateEvent */ export declare const TokenSupplyUpdateEvent: TokenSupplyUpdateEvent$Type; declare class TokenEvent$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenEvent */ export declare const TokenEvent: TokenEvent$Type; declare class TokenEffect$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenEffect */ export declare const TokenEffect: TokenEffect$Type; declare class TokenModuleRejectReason$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenModuleRejectReason */ export declare const TokenModuleRejectReason: TokenModuleRejectReason$Type; declare class CreatePLT$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.CreatePLT */ export declare const CreatePLT: CreatePLT$Type; declare class TokenCreationDetails$Type extends MessageType { constructor(); } /** * @generated MessageType for protobuf message concordium.v2.plt.TokenCreationDetails */ export declare const TokenCreationDetails: TokenCreationDetails$Type; export {};