@hashgraph/sdk
Version:
154 lines (153 loc) • 4.63 kB
TypeScript
/**
* @typedef {import("bignumber.js").default} BigNumber
* @typedef {import("../channel/Channel.js").default} Channel
* @typedef {import("../client/Client.js").default<*, *>} Client
* @typedef {import("../transaction/TransactionId.js").default} TransactionId
* @typedef {import("../PublicKey.js").default} PublicKey
* @typedef {import("../PrivateKey.js").default} PrivateKey
*/
/**
* Create a new Hedera™ crypto-currency account.
*/
export default class ScheduleCreateTransaction 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 {ScheduleCreateTransaction}
*/
static _fromProtobuf(transactions: HieroProto.proto.ITransaction[], signedTransactions: HieroProto.proto.ISignedTransaction[], transactionIds: TransactionId[], nodeIds: AccountId[], bodies: HieroProto.proto.ITransactionBody[]): ScheduleCreateTransaction;
/**
* @param {object} [props]
* @param {Key} [props.adminKey]
* @param {AccountId} [props.payerAccountID]
* @param {string} [props.scheduleMemo]
* @param {Timestamp} [props.expirationTime]
* @param {boolean} [props.waitForExpiry]
*/
constructor(props?: {
adminKey?: Key | undefined;
payerAccountID?: AccountId | undefined;
scheduleMemo?: string | undefined;
expirationTime?: Timestamp | undefined;
waitForExpiry?: boolean | undefined;
});
/**
* @private
* @type {?Key}
*/
private _adminKey;
/**
* @private
* @type {?Transaction}
*/
private _scheduledTransaction;
/**
* @private
* @type {?AccountId}
*/
private _payerAccountId;
/**
* @private
* @type {?string}
*/
private _scheduleMemo;
/**
* @private
* @type {Set<string>}
*/
private _scheduledSignerPublicKeys;
/**
* @private
* @type {?Timestamp}
*/
private _expirationTime;
/**
* @private
* @type {?boolean}
*/
private _waitForExpiry;
/**
* @internal
* @param {Transaction} tx
* @returns {this}
*/
_setScheduledTransaction(tx: Transaction): this;
/**
* @returns {?Key}
*/
get adminKey(): Key | null;
/**
* Set the key for this account.
*
* This is the key that must sign each transfer out of the account.
*
* If `receiverSignatureRequired` is true, then the key must also sign
* any transfer into the account.
*
* @param {Key} key
* @returns {this}
*/
setAdminKey(key: Key): this;
/**
* @returns {?AccountId}
*/
get payerAccountId(): AccountId | null;
/**
* @param {AccountId} account
* @returns {this}
*/
setPayerAccountId(account: AccountId): this;
/**
* @param {string} memo
* @returns {this}
*/
setScheduleMemo(memo: string): this;
/**
* @returns {?string}
*/
get getScheduleMemo(): string | null;
/**
* @param {Transaction} transaction
* @returns {this}
*/
setScheduledTransaction(transaction: Transaction): this;
/**
* @override
* @protected
* @returns {HieroProto.proto.IScheduleCreateTransactionBody}
*/
protected override _makeTransactionData(): HieroProto.proto.IScheduleCreateTransactionBody;
/**
* @param {?Timestamp} expirationTime
* @returns {this}
*/
setExpirationTime(expirationTime: Timestamp | null): this;
/**
* @returns {?Timestamp}
*/
get expirationTime(): Timestamp | null;
/**
* @param {boolean} waitForExpiry
* @returns {this}
*/
setWaitForExpiry(waitForExpiry: boolean): this;
/**
* @returns {?boolean}
*/
get waitForExpiry(): boolean | null;
}
export type BigNumber = import("bignumber.js").default;
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;
export type PublicKey = import("../PublicKey.js").default;
export type PrivateKey = import("../PrivateKey.js").default;
import Transaction from "../transaction/Transaction.js";
import Key from "../Key.js";
import AccountId from "../account/AccountId.js";
import * as HieroProto from "@hiero-ledger/proto";
import Timestamp from "../Timestamp.js";