import _m0 from "protobufjs/minimal";
import { AccountID, TokenID } from "./basic_types";
export declare const protobufPackage = "proto";
/**
* Creates one or more hbar/token approved allowances relative to the owner account specified in the allowances of
* this transaction. Each allowance grants a spender the right to transfer a pre-determined amount of the owner's
* hbar/token to any other account of the spender's choice. If the owner is not specified in any allowance, the payer
* of transaction is considered to be the owner for that particular allowance.
* Setting the amount to zero in CryptoAllowance or TokenAllowance will remove the respective allowance for the spender.
*
* (So if account 0.0.X pays for this transaction and owner is not specified in the allowance,
* then at consensus each spender account will have new allowances to spend hbar or tokens from 0.0.X).
*/
export interface CryptoApproveAllowanceTransactionBody {
/** List of hbar allowances approved by the account owner. */
cryptoAllowances: CryptoAllowance[];
/** List of non-fungible token allowances approved by the account owner. */
nftAllowances: NftAllowance[];
/** List of fungible token allowances approved by the account owner. */
tokenAllowances: TokenAllowance[];
}
/** An approved allowance of hbar transfers for a spender. */
export interface CryptoAllowance {
/** The account ID of the hbar owner (ie. the grantor of the allowance). */
owner: AccountID | undefined;
/** The account ID of the spender of the hbar allowance. */
spender: AccountID | undefined;
/** The amount of the spender's allowance in tinybars. */
amount: number;
}
/** An approved allowance of non-fungible token transfers for a spender. */
export interface NftAllowance {
/** The NFT token type that the allowance pertains to. */
tokenId: TokenID | undefined;
/** The account ID of the token owner (ie. the grantor of the allowance). */
owner: AccountID | undefined;
/** The account ID of the token allowance spender. */
spender: AccountID | undefined;
/** The list of serial numbers that the spender is permitted to transfer. */
serialNumbers: number[];
/**
* If true, the spender has access to all of the owner's NFT units of type tokenId (currently
* owned and any in the future).
*/
approvedForAll: boolean | undefined;
/**
* The account ID of the spender who is granted approvedForAll allowance and granting
* approval on an NFT serial to another spender.
*/
delegatingSpender: AccountID | undefined;
}
/** An approved allowance of fungible token transfers for a spender. */
export interface TokenAllowance {
/** The token that the allowance pertains to. */
tokenId: TokenID | undefined;
/** The account ID of the token owner (ie. the grantor of the allowance). */
owner: AccountID | undefined;
/** The account ID of the token allowance spender. */
spender: AccountID | undefined;
/** The amount of the spender's token allowance. */
amount: number;
}
export declare const CryptoApproveAllowanceTransactionBody: {
encode(message: CryptoApproveAllowanceTransactionBody, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CryptoApproveAllowanceTransactionBody;
fromJSON(object: any): CryptoApproveAllowanceTransactionBody;
toJSON(message: CryptoApproveAllowanceTransactionBody): unknown;
create(base?: DeepPartial): CryptoApproveAllowanceTransactionBody;
fromPartial(object: DeepPartial): CryptoApproveAllowanceTransactionBody;
};
export declare const CryptoAllowance: {
encode(message: CryptoAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): CryptoAllowance;
fromJSON(object: any): CryptoAllowance;
toJSON(message: CryptoAllowance): unknown;
create(base?: DeepPartial): CryptoAllowance;
fromPartial(object: DeepPartial): CryptoAllowance;
};
export declare const NftAllowance: {
encode(message: NftAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): NftAllowance;
fromJSON(object: any): NftAllowance;
toJSON(message: NftAllowance): unknown;
create(base?: DeepPartial): NftAllowance;
fromPartial(object: DeepPartial): NftAllowance;
};
export declare const TokenAllowance: {
encode(message: TokenAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): TokenAllowance;
fromJSON(object: any): TokenAllowance;
toJSON(message: TokenAllowance): unknown;
create(base?: DeepPartial): TokenAllowance;
fromPartial(object: DeepPartial): TokenAllowance;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {
$case: string;
} ? {
[K in keyof Omit]?: DeepPartial;
} & {
$case: T["$case"];
} : T extends {} ? {
[K in keyof T]?: DeepPartial;
} : Partial;
export {};
//# sourceMappingURL=crypto_approve_allowance.d.ts.map