@rubysdk/secret-client
Version:
RubySDK Secret Network client utilities for data, token and escrow operations
170 lines • 4.34 kB
TypeScript
/**
* This file was automatically generated by @cosmwasm/ts-codegen@1.12.0.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
*/
export type ExecuteMsg = {
create_escrow: {
expiration?: number | null;
memo?: string | null;
payouts: Payout[];
required_deposits: RequiredDeposit[];
};
} | {
receive: {
amount: Uint256;
from: Addr;
msg?: Binary | null;
token_id: string;
};
} | {
cancel_escrow: {
escrow_id: number;
};
} | {
execute_escrow: {
escrow_id: number;
};
};
export type Addr = string;
export type Uint256 = string;
export type QueryResponse = {
token_id_public_info: {
owner?: Addr | null;
token_id_info: StoredTokenInfo;
total_supply?: Uint256 | null;
};
};
export type TknConfig = {
fungible: {
can_add_minters: boolean;
decimals: number;
enable_burn: boolean;
enable_mint: boolean;
link: string;
minter_may_update_metadata: boolean;
minters: Addr[];
public_total_supply: boolean;
};
} | {
nft: {
can_add_minters: boolean;
enable_burn: boolean;
link: string;
minter_may_update_metadata: boolean;
minters: Addr[];
owner_is_public: boolean;
owner_may_update_metadata: boolean;
public_total_supply: boolean;
};
};
export type DepositType = "Buyer" | "Seller";
export type Binary = string;
export interface Payout {
to_address?: Addr | null;
token: TokenAmount;
token_info?: QueryResponse | null;
}
export interface TokenAmount {
amount: Uint256;
contract_addr: Addr;
contract_hash: string;
token_id: string;
}
export interface StoredTokenInfo {
curator: Addr;
name: string;
private_metadata?: Metadata | null;
public_metadata?: Metadata | null;
symbol: string;
token_config: TknConfig;
token_id: string;
}
export interface Metadata {
extension?: Extension | null;
token_uri?: string | null;
}
export interface Extension {
animation_url?: string | null;
attributes?: Trait[] | null;
background_color?: string | null;
description?: string | null;
external_url?: string | null;
image?: string | null;
image_data?: string | null;
media?: MediaFile[] | null;
name?: string | null;
protected_attributes?: string[] | null;
token_subtype?: string | null;
youtube_url?: string | null;
}
export interface Trait {
display_type?: string | null;
max_value?: string | null;
trait_type?: string | null;
value: string;
}
export interface MediaFile {
authentication?: Authentication | null;
extension?: string | null;
file_type?: string | null;
url: string;
}
export interface Authentication {
key?: string | null;
user?: string | null;
}
export interface RequiredDeposit {
deposit_type: DepositType;
from_address?: Addr | null;
token: TokenAmount;
token_info?: QueryResponse | null;
}
export type ReceiverType = "NFT" | "Standard";
export type EscrowStatus = "Created" | "Completed" | "Cancelled" | "Expired";
export interface GetEscrowResponse {
escrow: Escrow;
}
export interface Escrow {
creator: Addr;
deposits: Deposit[];
expiration?: number | null;
id: number;
memo?: string | null;
payouts: Payout[];
required_deposits: RequiredDeposit[];
status: EscrowStatus;
}
export interface Deposit {
depositor: DepositorInfo;
timestamp: number;
token: TokenAmount;
}
export interface DepositorInfo {
from: Addr;
receiver_addr?: Addr | null;
receiver_code_hash?: string | null;
receiver_type: ReceiverType;
}
export interface InstantiateMsg {
}
export interface ListEscrowsResponse {
escrows: Escrow[];
total: number;
}
export type QueryMsg = {
list_escrows: {
creator?: Addr | null;
limit?: number | null;
payout_to?: Addr | null;
required_deposit_from?: Addr | null;
start_after?: number | null;
status?: EscrowStatus | null;
token_id?: string | null;
};
} | {
get_escrow: {
escrow_id: number;
};
};
//# sourceMappingURL=SecretEscrow.types.d.ts.map