UNPKG

stellar-plus

Version:

beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain

44 lines (43 loc) 2.33 kB
import { DefaultAccountHandlerClient as DefaultAccountHandler } from '../../stellar-plus/account/account-handler/default'; import { AccountHandler } from '../../stellar-plus/account/account-handler/types'; import { ClassicTransactionPipelineOptions } from '../../stellar-plus/core/pipelines/classic-transaction/types'; import { TransactionInvocation } from '../../stellar-plus/core/types'; import { NetworkConfig } from '../../stellar-plus/types'; export declare class ChannelAccounts { /** * @args {} The arguments for opening channels. * @param {number} numberOfChannels The number of channels to open. * @param {AccountHandler} sponsor The account that will sponsor the channels. * @param {NetworkConfig} networkConfig The network to use. * @param {TransactionInvocation} txInvocation: The transaction invocation settings to use when building the transaction envelope. * * @description - Opens the given number of channels and returns the list of channel accounts. The accounts will be funded with 0 balance and sponsored by the sponsor account. * * @returns {DefaultAccountHandler[]} Array of channel accounts. */ static openChannels(args: { numberOfChannels: number; sponsor: AccountHandler; txInvocation: TransactionInvocation; networkConfig: NetworkConfig; transactionPipelineOptions?: ClassicTransactionPipelineOptions; }): Promise<DefaultAccountHandler[]>; /** * @args {} The arguments for closing channels. * @param {DefaultAccountHandler[]} channels The list of channels to close. * @param {DefaultAccountHandler} sponsor The account that was the sponsor for the channels. * @param {NetworkConfig} networkConfig The network to use. * @param {TransactionInvocation }xInvocation The transaction invocation settings to use when building the transaction envelope. * * @description - Closes the given channels and merges the balances into the sponsor account. * * @returns {void} */ static closeChannels(args: { channels: DefaultAccountHandler[]; sponsor: AccountHandler; txInvocation: TransactionInvocation; networkConfig: NetworkConfig; transactionPipelineOptions?: ClassicTransactionPipelineOptions; }): Promise<void>; }