@test-org122/hypernet-core
Version:
Hypernet Core. Represents the SDK for running the Hypernet Protocol.
34 lines (31 loc) • 1.31 kB
text/typescript
import { EthereumAddress, BigNumber, Balances, AssetBalance, PublicIdentifier, ResultAsync } from "@interfaces/objects";
import {
BalancesUnavailableError,
BlockchainUnavailableError,
CoreUninitializedError,
LogicalError,
RouterChannelUnknownError,
VectorError,
} from "@interfaces/objects/errors";
/**
* @todo What is the main role/purpose of this class? Description here.
*/
export interface IAccountsRepository {
getPublicIdentifier(): ResultAsync<PublicIdentifier, VectorError | LogicalError>;
getAccounts(): ResultAsync<string[], BlockchainUnavailableError>;
getBalances(): ResultAsync<Balances, BalancesUnavailableError | CoreUninitializedError>;
getBalanceByAsset(assetAddress: EthereumAddress): ResultAsync<AssetBalance, BalancesUnavailableError>;
depositFunds(
assetAddress: EthereumAddress,
amount: BigNumber,
): ResultAsync<
null,
RouterChannelUnknownError | CoreUninitializedError | VectorError | Error | BlockchainUnavailableError
>;
withdrawFunds(
assetAddress: EthereumAddress,
amount: BigNumber,
destinationAddress: EthereumAddress,
): ResultAsync<void, RouterChannelUnknownError | CoreUninitializedError | VectorError | Error>;
mintTestToken(amount: BigNumber, to: EthereumAddress): ResultAsync<void, BlockchainUnavailableError>;
}