import * as nearAPI from 'near-api-js'; import { type Config, type KeyPair, type KeyStore, type AccountBalance, type NamedAccount, type PublicKey, type AccountView } from '../types'; import { Transaction } from '../transaction'; import { JsonRpcProvider } from '../jsonrpc'; import { TransactionResult } from '../transaction-result'; import { type NearAccount } from './near-account'; import { type NearAccountManager } from './near-account-manager'; export declare abstract class AccountManager implements NearAccountManager { protected config: Config; static create(config: Config): AccountManager; accountsCreated: Set; private _root?; constructor(config: Config); accountView(accountId: string): Promise; getAccount(accountId: string): NearAccount; getParentAccount(accountId: string): NearAccount; deleteKey(accountId: string): Promise; init(): Promise; get root(): NearAccount; get initialBalance(): bigint; get doubleInitialBalance(): bigint; get provider(): JsonRpcProvider; batch(sender: NearAccount | string, receiver: NearAccount | string): Transaction; getKey(accountId: string): Promise; getPublicKey(accountId: string): Promise; /** Sets the provided key to store, otherwise creates a new one */ setKey(accountId: string, keyPair?: KeyPair): Promise; removeKey(accountId: string): Promise; deleteAccount(accountId: string, beneficiaryId: string, keyPair?: KeyPair): Promise; getRootKey(): Promise; balance(account: string | NearAccount): Promise; availableBalance(account: string | NearAccount): Promise; exists(accountId: string | NearAccount): Promise; canCoverBalance(account: string | NearAccount, amount: bigint): Promise; executeTransaction(tx: Transaction, keyPair?: KeyPair): Promise; addAccountCreated(account: string, _sender: string): void; cleanup(): Promise; get rootAccountId(): string; protected set rootAccountId(value: string); abstract get DEFAULT_INITIAL_BALANCE(): bigint; abstract createFrom(config: Config): Promise; abstract get defaultKeyStore(): KeyStore; protected get keyStore(): KeyStore; protected get signer(): nearAPI.InMemorySigner; protected get networkId(): string; protected get connection(): nearAPI.Connection; } export declare class CustomnetManager extends AccountManager { get DEFAULT_INITIAL_BALANCE(): bigint; get defaultKeyStore(): KeyStore; get connection(): nearAPI.Connection; get networkId(): string; init(): Promise; createFrom(config: Config): Promise; } export declare class TestnetManager extends AccountManager { static readonly KEYSTORE_PATH: string; private static numTestAccounts; private _testnetRoot?; static get defaultKeyStore(): KeyStore; get masterAccountId(): string; get fullRootAccountId(): string; get root(): NearAccount; get DEFAULT_INITIAL_BALANCE(): bigint; get defaultKeyStore(): KeyStore; get urlAccountCreator(): nearAPI.accountCreator.UrlAccountCreator; init(): Promise; createTopLevelAccountWithHelper(accountId: string, keyPair: KeyPair): Promise; createAccount(accountId: string, keyPair?: KeyPair): Promise; addFundsFromNetwork(accountId?: string): Promise; addFunds(accountId: string, amount: bigint): Promise; deleteAccounts(accounts: string[], beneficiaryId: string): Promise; createFrom(config: Config): Promise; cleanup(): Promise; needsFunds(accountId: string, amount: bigint): Promise; isRootOrTLAccount(accountId: string): boolean; } export declare class SandboxManager extends AccountManager { init(): Promise; createFrom(config: Config): Promise; get DEFAULT_INITIAL_BALANCE(): bigint; get defaultKeyStore(): KeyStore; get keyFilePath(): string; } export declare class ManagedTransaction extends Transaction { private readonly manager; private delete; constructor(manager: AccountManager, sender: NamedAccount | string, receiver: NamedAccount | string); createAccount(): this; deleteAccount(beneficiaryId: string): this; /** * * @param keyPair Temporary key to sign transaction * @returns */ transact(keyPair?: KeyPair): Promise; } //# sourceMappingURL=account-manager.d.ts.map