@radixdlt/application
Version:
A JavaScript client library for interacting with the Radix Distributed Ledger.
94 lines • 4.67 kB
TypeScript
import { AddressOrUnsafeInput, ValidatorAddressOrUnsafeInput, ResourceIdentifierOrUnsafeInput, ResourceIdentifierT } from '@radixdlt/account';
import { AmountOrUnsafeInput, AmountT } from '@radixdlt/primitives';
export declare enum ActionType {
TOKEN_TRANSFER = "TokenTransfer",
STAKE_TOKENS = "StakeTokens",
UNSTAKE_TOKENS = "UnstakeTokens",
MINT_TOKENS = "MintTokens",
BURN_TOKENS = "BurnTokens",
CREATE_TOKEN_DEFINITION = "CreateTokenDefinition",
OTHER = "Other"
}
export declare type Action<T extends ActionType = ActionType.OTHER> = Readonly<{
type: T;
}>;
export declare type TransferTokensInput = Readonly<{
to_account: AddressOrUnsafeInput;
amount: AmountOrUnsafeInput;
tokenIdentifier: ResourceIdentifierOrUnsafeInput;
}>;
export declare type StakeTokensInput = Readonly<{
to_validator: ValidatorAddressOrUnsafeInput;
amount: AmountOrUnsafeInput;
tokenIdentifier: ResourceIdentifierOrUnsafeInput;
}>;
export declare type UnstakeTokensInput = Readonly<{
from_validator: ValidatorAddressOrUnsafeInput;
amount?: AmountOrUnsafeInput;
unstake_percentage?: AmountOrUnsafeInput;
tokenIdentifier: ResourceIdentifierOrUnsafeInput;
}>;
export declare type ActionInput = TransferTokensInput | StakeTokensInput | UnstakeTokensInput;
export declare type TransferTokensProps = Readonly<{
to_account: string;
from_account: string;
amount: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type TransferTokensAction = TransferTokensProps & Action<ActionType.TOKEN_TRANSFER>;
export declare type StakeTokensProps = Readonly<{
from_account: string;
to_validator: string;
amount: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type UnstakeTokensProps = Readonly<{
to_account: string;
from_validator: string;
amount: AmountT;
unstake_percentage: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type MintTokensProps = Readonly<{
to_account: string;
amount: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type BurnTokensProps = Readonly<{
from_account: string;
amount: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type CreateTokenDefinitionProps = Readonly<{
name: string;
description: string;
icon_url: string;
url: string;
symbol: string;
is_supply_mutable: boolean;
granularity: string;
owner?: string;
to_account?: string;
amount: AmountT;
rri: ResourceIdentifierT;
}>;
export declare type StakeTokensAction = StakeTokensProps & Action<ActionType.STAKE_TOKENS>;
export declare type UnstakeTokensAction = UnstakeTokensProps & Action<ActionType.UNSTAKE_TOKENS>;
export declare type MintTokensAction = MintTokensProps & Action<ActionType.MINT_TOKENS>;
export declare type BurnTokensAction = BurnTokensProps & Action<ActionType.BURN_TOKENS>;
export declare type CreateTokenDefinitionAction = CreateTokenDefinitionProps & Action<ActionType.CREATE_TOKEN_DEFINITION>;
export declare type IntendedActionBase<T extends ActionType> = Action<T>;
export declare type IntendedTransferTokensAction = IntendedActionBase<ActionType.TOKEN_TRANSFER> & TransferTokensAction;
export declare type IntendedStakeTokensAction = IntendedActionBase<ActionType.STAKE_TOKENS> & StakeTokensProps;
export declare type IntendedUnstakeTokensAction = IntendedActionBase<ActionType.UNSTAKE_TOKENS> & UnstakeTokensProps;
export declare type IntendedAction = IntendedTransferTokensAction | IntendedStakeTokensAction | IntendedUnstakeTokensAction;
export declare type ExecutedActionBase<T extends ActionType> = Action<T>;
export declare type ExecutedTransferTokensAction = ExecutedActionBase<ActionType.TOKEN_TRANSFER> & TransferTokensAction;
export declare type ExecutedStakeTokensAction = ExecutedActionBase<ActionType.STAKE_TOKENS> & StakeTokensAction;
export declare type ExecutedUnstakeTokensAction = ExecutedActionBase<ActionType.UNSTAKE_TOKENS> & UnstakeTokensAction;
export declare type ExecutedMintTokensAction = ExecutedActionBase<ActionType.MINT_TOKENS> & MintTokensAction;
export declare type ExecutedBurnTokensAction = ExecutedActionBase<ActionType.BURN_TOKENS> & BurnTokensAction;
export declare type ExecutedCreateTokenDefinitionAction = ExecutedActionBase<ActionType.CREATE_TOKEN_DEFINITION> & CreateTokenDefinitionAction;
export declare type ExecutedOtherAction = ExecutedActionBase<ActionType.OTHER>;
export declare type ExecutedAction = ExecutedTransferTokensAction | ExecutedStakeTokensAction | ExecutedUnstakeTokensAction | ExecutedMintTokensAction | ExecutedBurnTokensAction | ExecutedCreateTokenDefinitionAction | ExecutedOtherAction;
//# sourceMappingURL=_types.d.ts.map