UNPKG

@hashgraph/sdk

Version:
98 lines (97 loc) 4.28 kB
/** * @namespace proto * @typedef {import("@hiero-ledger/proto").proto.ITransaction} HieroProto.proto.ITransaction * @typedef {import("@hiero-ledger/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction * @typedef {import("@hiero-ledger/proto").proto.TransactionBody} HieroProto.proto.TransactionBody * @typedef {import("@hiero-ledger/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody * @typedef {import("@hiero-ledger/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse * @typedef {import("@hiero-ledger/proto").proto.ICryptoDeleteTransactionBody} HieroProto.proto.ICryptoDeleteTransactionBody * @typedef {import("@hiero-ledger/proto").proto.IAccountID} HieroProto.proto.IAccountID */ /** * @typedef {import("../channel/Channel.js").default} Channel * @typedef {import("../client/Client.js").default<*, *>} Client * @typedef {import("../transaction/TransactionId.js").default} TransactionId */ /** * Marks an account as deleted, moving all its current hbars to another account. * * It will remain in the ledger, marked as deleted, until it expires. * Transfers into it a deleted account fail. But a deleted account can still have its * expiration extended in the normal way. */ export default class AccountDeleteTransaction extends Transaction { /** * @internal * @param {HieroProto.proto.ITransaction[]} transactions * @param {HieroProto.proto.ISignedTransaction[]} signedTransactions * @param {TransactionId[]} transactionIds * @param {AccountId[]} nodeIds * @param {HieroProto.proto.ITransactionBody[]} bodies * @returns {AccountDeleteTransaction} */ static _fromProtobuf(transactions: HieroProto.proto.ITransaction[], signedTransactions: HieroProto.proto.ISignedTransaction[], transactionIds: TransactionId[], nodeIds: AccountId[], bodies: HieroProto.proto.ITransactionBody[]): AccountDeleteTransaction; /** * @param {object} props * @param {AccountId} [props.accountId] * @param {AccountId} [props.transferAccountId] */ constructor(props?: { accountId?: AccountId | undefined; transferAccountId?: AccountId | undefined; }); /** * @private * @type {?AccountId} */ private _accountId; /** * @private * @type {?AccountId} */ private _transferAccountId; /** * @returns {?AccountId} */ get accountId(): AccountId | null; /** * Set the account ID which is being deleted in this transaction. * * @param {AccountId | string} accountId * @returns {AccountDeleteTransaction} */ setAccountId(accountId: AccountId | string): AccountDeleteTransaction; /** * @returns {?AccountId} */ get transferAccountId(): AccountId | null; /** * Set the account ID which will receive all remaining hbars. * * @param {AccountId | string} transferAccountId * @returns {AccountDeleteTransaction} */ setTransferAccountId(transferAccountId: AccountId | string): AccountDeleteTransaction; /** * @override * @protected * @returns {HieroProto.proto.ICryptoDeleteTransactionBody} */ protected override _makeTransactionData(): HieroProto.proto.ICryptoDeleteTransactionBody; } export namespace HieroProto { namespace proto { type ITransaction = import("@hiero-ledger/proto").proto.ITransaction; type ISignedTransaction = import("@hiero-ledger/proto").proto.ISignedTransaction; type TransactionBody = import("@hiero-ledger/proto").proto.TransactionBody; type ITransactionBody = import("@hiero-ledger/proto").proto.ITransactionBody; type ITransactionResponse = import("@hiero-ledger/proto").proto.ITransactionResponse; type ICryptoDeleteTransactionBody = import("@hiero-ledger/proto").proto.ICryptoDeleteTransactionBody; type IAccountID = import("@hiero-ledger/proto").proto.IAccountID; } } export type Channel = import("../channel/Channel.js").default; export type Client = import("../client/Client.js").default<any, any>; export type TransactionId = import("../transaction/TransactionId.js").default; import Transaction from "../transaction/Transaction.js"; import AccountId from "./AccountId.js";