NeoRust GUI Documentation - v0.4.2
    Preparing search index...

    Interface WalletState

    interface WalletState {
        balances: Record<string, Balance[]>;
        clearError: () => void;
        closeWallet: (walletId: string) => Promise<void>;
        createAccount: (walletId: string, label?: string) => Promise<Account>;
        createWallet: (name: string, password: string) => Promise<WalletInfo>;
        currentAccount: null | Account;
        currentWallet: null | WalletInfo;
        deleteWallet: (walletId: string) => Promise<void>;
        error: null | string;
        exportAccount: (address: string, password: string) => Promise<string>;
        getBalance: (address: string, asset: string) => null | Balance;
        importAccount: (
            walletId: string,
            privateKey: string,
            label?: string,
        ) => Promise<Account>;
        isLoading: boolean;
        loadWallets: () => Promise<void>;
        openWallet: (path: string, password: string) => Promise<WalletInfo>;
        pendingTransactions: Transaction[];
        refreshBalances: (address: string) => Promise<void>;
        refreshTransactions: (address: string) => Promise<void>;
        sendTransaction: (
            params: {
                amount: string;
                asset: string;
                from: string;
                password: string;
                to: string;
            },
        ) => Promise<Transaction>;
        setCurrentAccount: (account: null | Account) => void;
        setCurrentWallet: (wallet: null | WalletInfo) => void;
        setError: (error: null | string) => void;
        setLoading: (loading: boolean) => void;
        transactions: Record<string, Transaction[]>;
        wallets: WalletInfo[];
    }
    Index

    Properties

    balances: Record<string, Balance[]>
    clearError: () => void
    closeWallet: (walletId: string) => Promise<void>
    createAccount: (walletId: string, label?: string) => Promise<Account>
    createWallet: (name: string, password: string) => Promise<WalletInfo>
    currentAccount: null | Account
    currentWallet: null | WalletInfo
    deleteWallet: (walletId: string) => Promise<void>
    error: null | string
    exportAccount: (address: string, password: string) => Promise<string>
    getBalance: (address: string, asset: string) => null | Balance
    importAccount: (
        walletId: string,
        privateKey: string,
        label?: string,
    ) => Promise<Account>
    isLoading: boolean
    loadWallets: () => Promise<void>
    openWallet: (path: string, password: string) => Promise<WalletInfo>
    pendingTransactions: Transaction[]
    refreshBalances: (address: string) => Promise<void>
    refreshTransactions: (address: string) => Promise<void>
    sendTransaction: (
        params: {
            amount: string;
            asset: string;
            from: string;
            password: string;
            to: string;
        },
    ) => Promise<Transaction>
    setCurrentAccount: (account: null | Account) => void
    setCurrentWallet: (wallet: null | WalletInfo) => void
    setError: (error: null | string) => void
    setLoading: (loading: boolean) => void
    transactions: Record<string, Transaction[]>
    wallets: WalletInfo[]