UNPKG

@hashgraph/sdk

Version:
209 lines (208 loc) 10 kB
/** * @namespace proto * @typedef {import("@hashgraph/proto").proto.ITransaction} HieroProto.proto.ITransaction * @typedef {import("@hashgraph/proto").proto.ISignedTransaction} HieroProto.proto.ISignedTransaction * @typedef {import("@hashgraph/proto").proto.TransactionBody} HieroProto.proto.TransactionBody * @typedef {import("@hashgraph/proto").proto.ITransactionBody} HieroProto.proto.ITransactionBody * @typedef {import("@hashgraph/proto").proto.ITransactionResponse} HieroProto.proto.ITransactionResponse * @typedef {import("@hashgraph/proto").proto.IAccountID} HieroProto.proto.IAccountID * @typedef {import("@hashgraph/proto").proto.IContractID} HieroProto.proto.IContractID */ /** * @typedef {import("../channel/Channel.js").default} Channel * @typedef {import("../client/Client.js").default<*, *>} Client * @typedef {import("../transaction/TransactionId.js").default} TransactionId * @typedef {import("bignumber.js").default} BigNumber * @typedef {import("../long.js").LongObject} LongObject */ /** * @deprecated - No longer supported via Hedera Protobufs * Change properties for the given account. */ export default class AccountAllowanceAdjustTransaction extends Transaction { /** * @param {object} [props] * @param {HbarAllowance[]} [props.hbarAllowances] * @param {TokenAllowance[]} [props.tokenAllowances] * @param {TokenNftAllowance[]} [props.nftAllowances] */ constructor(props?: { hbarAllowances?: HbarAllowance[] | undefined; tokenAllowances?: TokenAllowance[] | undefined; nftAllowances?: TokenNftAllowance[] | undefined; }); /** * @private * @type {HbarAllowance[]} */ private _hbarAllowances; /** * @private * @type {TokenAllowance[]} */ private _tokenAllowances; /** * @private * @type {TokenNftAllowance[]} */ private _nftAllowances; /** * @returns {HbarAllowance[]} */ get hbarAllowances(): HbarAllowance[]; /** * @deprecated * @param {AccountId | string} spenderAccountId * @param {number | string | Long | LongObject | BigNumber | Hbar} amount * @returns {AccountAllowanceAdjustTransaction} */ addHbarAllowance(spenderAccountId: AccountId | string, amount: number | string | Long | LongObject | BigNumber | Hbar): AccountAllowanceAdjustTransaction; /** * @param {AccountId | string | null} ownerAccountId * @param {AccountId | ContractId | string} spenderAccountId * @param {Hbar} amount * @returns {AccountAllowanceAdjustTransaction} */ _adjustHbarAllowance(ownerAccountId: AccountId | string | null, spenderAccountId: AccountId | ContractId | string, amount: Hbar): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @param {number | string | Long | LongObject | BigNumber | Hbar} amount * @returns {AccountAllowanceAdjustTransaction} */ grantHbarAllowance(ownerAccountId: AccountId | string, spenderAccountId: AccountId | string, amount: number | string | Long | LongObject | BigNumber | Hbar): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @param {number | string | Long | LongObject | BigNumber | Hbar} amount * @returns {AccountAllowanceAdjustTransaction} */ revokeHbarAllowance(ownerAccountId: AccountId | string, spenderAccountId: AccountId | string, amount: number | string | Long | LongObject | BigNumber | Hbar): AccountAllowanceAdjustTransaction; /** * @returns {TokenAllowance[]} */ get tokenAllowances(): TokenAllowance[]; /** * @deprecated * @param {TokenId | string} tokenId * @param {AccountId | string} spenderAccountId * @param {Long | number} amount * @returns {AccountAllowanceAdjustTransaction} */ addTokenAllowance(tokenId: TokenId | string, spenderAccountId: AccountId | string, amount: Long | number): AccountAllowanceAdjustTransaction; /** * @param {TokenId | string} tokenId * @param {AccountId | string | null} ownerAccountId * @param {AccountId | ContractId | string} spenderAccountId * @param {Long | number} amount * @returns {AccountAllowanceAdjustTransaction} */ _adjustTokenAllowance(tokenId: TokenId | string, ownerAccountId: AccountId | string | null, spenderAccountId: AccountId | ContractId | string, amount: Long | number): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {TokenId | string} tokenId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @param {Long | number} amount * @returns {AccountAllowanceAdjustTransaction} */ grantTokenAllowance(tokenId: TokenId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string, amount: Long | number): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {TokenId | string} tokenId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @param {Long | number} amount * @returns {AccountAllowanceAdjustTransaction} */ revokeTokenAllowance(tokenId: TokenId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string, amount: Long | number): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {NftId | string} nftId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ addTokenNftAllowance(nftId: NftId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @param {NftId} nftId * @param {AccountId | string | null} ownerAccountId * @param {AccountId | ContractId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ _adjustTokenNftAllowance(nftId: NftId, ownerAccountId: AccountId | string | null, spenderAccountId: AccountId | ContractId | string): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {NftId | string} nftId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ grantTokenNftAllowance(nftId: NftId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {NftId | string} nftId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ revokeTokenNftAllowance(nftId: NftId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @deprecated - use `grantTokenNftAllowanceAllSerials()` instead * @param {TokenId | string} tokenId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ addAllTokenNftAllowance(tokenId: TokenId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {TokenId | string} tokenId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ grantTokenNftAllowanceAllSerials(tokenId: TokenId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @deprecated * @param {TokenId | string} tokenId * @param {AccountId | string} ownerAccountId * @param {AccountId | string} spenderAccountId * @returns {AccountAllowanceAdjustTransaction} */ revokeTokenNftAllowanceAllSerials(tokenId: TokenId | string, ownerAccountId: AccountId | string, spenderAccountId: AccountId | string): AccountAllowanceAdjustTransaction; /** * @param {TokenId | string} tokenId * @param {AccountId | string | null} ownerAccountId * @param {AccountId | ContractId | string} spenderAccountId * @param {boolean} allSerials * @returns {AccountAllowanceAdjustTransaction} */ _adjustTokenNftAllowanceAllSerials(tokenId: TokenId | string, ownerAccountId: AccountId | string | null, spenderAccountId: AccountId | ContractId | string, allSerials: boolean): AccountAllowanceAdjustTransaction; } export namespace HieroProto { namespace proto { type ITransaction = import("@hashgraph/proto").proto.ITransaction; type ISignedTransaction = import("@hashgraph/proto").proto.ISignedTransaction; type TransactionBody = import("@hashgraph/proto").proto.TransactionBody; type ITransactionBody = import("@hashgraph/proto").proto.ITransactionBody; type ITransactionResponse = import("@hashgraph/proto").proto.ITransactionResponse; type IAccountID = import("@hashgraph/proto").proto.IAccountID; type IContractID = import("@hashgraph/proto").proto.IContractID; } } 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 BigNumber = import("bignumber.js").default; export type LongObject = import("../long.js").LongObject; import Transaction from "../transaction/Transaction.js"; import HbarAllowance from "./HbarAllowance.js"; import AccountId from "./AccountId.js"; import Long from "long"; import Hbar from "../Hbar.js"; import ContractId from "../contract/ContractId.js"; import TokenAllowance from "./TokenAllowance.js"; import TokenId from "../token/TokenId.js"; import NftId from "../token/NftId.js"; import TokenNftAllowance from "./TokenNftAllowance.js";