import { Principal, PrincipalSDKType, Statement, StatementSDKType } from "./common"; import { ResourceType } from "../resource/types"; import { Timestamp, TimestampSDKType } from "../../google/protobuf/timestamp"; import * as _m0 from "protobufjs/minimal"; export declare const protobufPackage = "bnbchain.greenfield.permission"; export interface Policy { /** id is an unique u256 sequence for each policy. It also be used as NFT tokenID */ id: string; /** principal defines the accounts/group which the permission grants to */ principal?: Principal; /** resource_type defines the type of resource that grants permission for */ resourceType: ResourceType; /** resource_id defines the bucket/object/group id of the resource that grants permission for */ resourceId: string; /** statements defines the details content of the permission, including effect/actions/sub-resources */ statements: Statement[]; /** * expiration_time defines the whole expiration time of all the statements. * Notices: Its priority is higher than the expiration time inside the Statement */ expirationTime?: Timestamp; } export interface PolicySDKType { id: string; principal?: PrincipalSDKType; resource_type: ResourceType; resource_id: string; statements: StatementSDKType[]; expiration_time?: TimestampSDKType; } /** * PolicyGroup refers to a group of policies which grant permission to Group, which is limited to MaxGroupNum (default 10). * This means that a single resource can only grant permission to 10 groups. The reason for * this is to enable on-chain determination of whether an operator has permission within a limited time. */ export interface PolicyGroup { /** items define a pair of policy_id and group_id. Each resource can only grant its own permissions to a limited number of groups */ items: PolicyGroup_Item[]; } /** * PolicyGroup refers to a group of policies which grant permission to Group, which is limited to MaxGroupNum (default 10). * This means that a single resource can only grant permission to 10 groups. The reason for * this is to enable on-chain determination of whether an operator has permission within a limited time. */ export interface PolicyGroupSDKType { items: PolicyGroup_ItemSDKType[]; } export interface PolicyGroup_Item { policyId: string; groupId: string; } export interface PolicyGroup_ItemSDKType { policy_id: string; group_id: string; } export interface GroupMember { /** id is an unique u256 sequence for each group member. It also be used as NFT tokenID */ id: string; /** group_id is the unique id of the group */ groupId: string; /** member is the account address of the member */ member: string; } export interface GroupMemberSDKType { id: string; group_id: string; member: string; } export declare const Policy: { encode(message: Policy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Policy; fromJSON(object: any): Policy; toJSON(message: Policy): unknown; fromPartial, never>) | undefined; resourceType?: ResourceType | undefined; resourceId?: string | undefined; statements?: ({ effect?: import("./common").Effect | undefined; actions?: import("./common").ActionType[] | undefined; resources?: string[] | undefined; expirationTime?: { seconds?: string | number | import("long").Long | undefined; nanos?: number | undefined; } | undefined; limitSize?: { value?: string | number | import("long").Long | undefined; } | undefined; }[] & ({ effect?: import("./common").Effect | undefined; actions?: import("./common").ActionType[] | undefined; resources?: string[] | undefined; expirationTime?: { seconds?: string | number | import("long").Long | undefined; nanos?: number | undefined; } | undefined; limitSize?: { value?: string | number | import("long").Long | undefined; } | undefined; } & { effect?: import("./common").Effect | undefined; actions?: (import("./common").ActionType[] & import("./common").ActionType[] & Record, never>) | undefined; resources?: (string[] & string[] & Record, never>) | undefined; expirationTime?: ({ seconds?: string | number | import("long").Long | undefined; nanos?: number | undefined; } & { seconds?: string | number | (import("long").Long & { high: number; low: number; unsigned: boolean; add: (addend: string | number | import("long").Long) => import("long").Long; and: (other: string | number | import("long").Long) => import("long").Long; compare: (other: string | number | import("long").Long) => number; comp: (other: string | number | import("long").Long) => number; divide: (divisor: string | number | import("long").Long) => import("long").Long; div: (divisor: string | number | import("long").Long) => import("long").Long; equals: (other: string | number | import("long").Long) => boolean; eq: (other: string | number | import("long").Long) => boolean; getHighBits: () => number; getHighBitsUnsigned: () => number; getLowBits: () => number; getLowBitsUnsigned: () => number; getNumBitsAbs: () => number; greaterThan: (other: string | number | import("long").Long) => boolean; gt: (other: string | number | import("long").Long) => boolean; greaterThanOrEqual: (other: string | number | import("long").Long) => boolean; gte: (other: string | number | import("long").Long) => boolean; isEven: () => boolean; isNegative: () => boolean; isOdd: () => boolean; isPositive: () => boolean; isZero: () => boolean; lessThan: (other: string | number | import("long").Long) => boolean; lt: (other: string | number | import("long").Long) => boolean; lessThanOrEqual: (other: string | number | import("long").Long) => boolean; lte: (other: string | number | import("long").Long) => boolean; modulo: (other: string | number | import("long").Long) => import("long").Long; mod: (other: string | number | import("long").Long) => import("long").Long; multiply: (multiplier: string | number | import("long").Long) => import("long").Long; mul: (multiplier: string | number | import("long").Long) => import("long").Long; negate: () => import("long").Long; neg: () => import("long").Long; not: () => import("long").Long; notEquals: (other: string | number | import("long").Long) => boolean; neq: (other: string | number | import("long").Long) => boolean; or: (other: string | number | import("long").Long) => import("long").Long; shiftLeft: (numBits: number | import("long").Long) => import("long").Long; shl: (numBits: number | import("long").Long) => import("long").Long; shiftRight: (numBits: number | import("long").Long) => import("long").Long; shr: (numBits: number | import("long").Long) => import("long").Long; shiftRightUnsigned: (numBits: number | import("long").Long) => import("long").Long; shru: (numBits: number | import("long").Long) => import("long").Long; subtract: (subtrahend: string | number | import("long").Long) => import("long").Long; sub: (subtrahend: string | number | import("long").Long) => import("long").Long; toInt: () => number; toNumber: () => number; toBytes: (le?: boolean | undefined) => number[]; toBytesLE: () => number[]; toBytesBE: () => number[]; toSigned: () => import("long").Long; toString: (radix?: number | undefined) => string; toUnsigned: () => import("long").Long; xor: (other: string | number | import("long").Long) => import("long").Long; } & Record, never>) | undefined; nanos?: number | undefined; } & Record, never>) | undefined; limitSize?: ({ value?: string | number | import("long").Long | undefined; } & { value?: string | number | (import("long").Long & { high: number; low: number; unsigned: boolean; add: (addend: string | number | import("long").Long) => import("long").Long; and: (other: string | number | import("long").Long) => import("long").Long; compare: (other: string | number | import("long").Long) => number; comp: (other: string | number | import("long").Long) => number; divide: (divisor: string | number | import("long").Long) => import("long").Long; div: (divisor: string | number | import("long").Long) => import("long").Long; equals: (other: string | number | import("long").Long) => boolean; eq: (other: string | number | import("long").Long) => boolean; getHighBits: () => number; getHighBitsUnsigned: () => number; getLowBits: () => number; getLowBitsUnsigned: () => number; getNumBitsAbs: () => number; greaterThan: (other: string | number | import("long").Long) => boolean; gt: (other: string | number | import("long").Long) => boolean; greaterThanOrEqual: (other: string | number | import("long").Long) => boolean; gte: (other: string | number | import("long").Long) => boolean; isEven: () => boolean; isNegative: () => boolean; isOdd: () => boolean; isPositive: () => boolean; isZero: () => boolean; lessThan: (other: string | number | import("long").Long) => boolean; lt: (other: string | number | import("long").Long) => boolean; lessThanOrEqual: (other: string | number | import("long").Long) => boolean; lte: (other: string | number | import("long").Long) => boolean; modulo: (other: string | number | import("long").Long) => import("long").Long; mod: (other: string | number | import("long").Long) => import("long").Long; multiply: (multiplier: string | number | import("long").Long) => import("long").Long; mul: (multiplier: string | number | import("long").Long) => import("long").Long; negate: () => import("long").Long; neg: () => import("long").Long; not: () => import("long").Long; notEquals: (other: string | number | import("long").Long) => boolean; neq: (other: string | number | import("long").Long) => boolean; or: (other: string | number | import("long").Long) => import("long").Long; shiftLeft: (numBits: number | import("long").Long) => import("long").Long; shl: (numBits: number | import("long").Long) => import("long").Long; shiftRight: (numBits: number | import("long").Long) => import("long").Long; shr: (numBits: number | import("long").Long) => import("long").Long; shiftRightUnsigned: (numBits: number | import("long").Long) => import("long").Long; shru: (numBits: number | import("long").Long) => import("long").Long; subtract: (subtrahend: string | number | import("long").Long) => import("long").Long; sub: (subtrahend: string | number | import("long").Long) => import("long").Long; toInt: () => number; toNumber: () => number; toBytes: (le?: boolean | undefined) => number[]; toBytesLE: () => number[]; toBytesBE: () => number[]; toSigned: () => import("long").Long; toString: (radix?: number | undefined) => string; toUnsigned: () => import("long").Long; xor: (other: string | number | import("long").Long) => import("long").Long; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; expirationTime?: ({ seconds?: string | number | import("long").Long | undefined; nanos?: number | undefined; } & { seconds?: string | number | (import("long").Long & { high: number; low: number; unsigned: boolean; add: (addend: string | number | import("long").Long) => import("long").Long; and: (other: string | number | import("long").Long) => import("long").Long; compare: (other: string | number | import("long").Long) => number; comp: (other: string | number | import("long").Long) => number; divide: (divisor: string | number | import("long").Long) => import("long").Long; div: (divisor: string | number | import("long").Long) => import("long").Long; equals: (other: string | number | import("long").Long) => boolean; eq: (other: string | number | import("long").Long) => boolean; getHighBits: () => number; getHighBitsUnsigned: () => number; getLowBits: () => number; getLowBitsUnsigned: () => number; getNumBitsAbs: () => number; greaterThan: (other: string | number | import("long").Long) => boolean; gt: (other: string | number | import("long").Long) => boolean; greaterThanOrEqual: (other: string | number | import("long").Long) => boolean; gte: (other: string | number | import("long").Long) => boolean; isEven: () => boolean; isNegative: () => boolean; isOdd: () => boolean; isPositive: () => boolean; isZero: () => boolean; lessThan: (other: string | number | import("long").Long) => boolean; lt: (other: string | number | import("long").Long) => boolean; lessThanOrEqual: (other: string | number | import("long").Long) => boolean; lte: (other: string | number | import("long").Long) => boolean; modulo: (other: string | number | import("long").Long) => import("long").Long; mod: (other: string | number | import("long").Long) => import("long").Long; multiply: (multiplier: string | number | import("long").Long) => import("long").Long; mul: (multiplier: string | number | import("long").Long) => import("long").Long; negate: () => import("long").Long; neg: () => import("long").Long; not: () => import("long").Long; notEquals: (other: string | number | import("long").Long) => boolean; neq: (other: string | number | import("long").Long) => boolean; or: (other: string | number | import("long").Long) => import("long").Long; shiftLeft: (numBits: number | import("long").Long) => import("long").Long; shl: (numBits: number | import("long").Long) => import("long").Long; shiftRight: (numBits: number | import("long").Long) => import("long").Long; shr: (numBits: number | import("long").Long) => import("long").Long; shiftRightUnsigned: (numBits: number | import("long").Long) => import("long").Long; shru: (numBits: number | import("long").Long) => import("long").Long; subtract: (subtrahend: string | number | import("long").Long) => import("long").Long; sub: (subtrahend: string | number | import("long").Long) => import("long").Long; toInt: () => number; toNumber: () => number; toBytes: (le?: boolean | undefined) => number[]; toBytesLE: () => number[]; toBytesBE: () => number[]; toSigned: () => import("long").Long; toString: (radix?: number | undefined) => string; toUnsigned: () => import("long").Long; xor: (other: string | number | import("long").Long) => import("long").Long; } & Record, never>) | undefined; nanos?: number | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): Policy; fromSDK(object: PolicySDKType): Policy; toSDK(message: Policy): PolicySDKType; }; export declare const PolicyGroup: { encode(message: PolicyGroup, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PolicyGroup; fromJSON(object: any): PolicyGroup; toJSON(message: PolicyGroup): unknown; fromPartial, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): PolicyGroup; fromSDK(object: PolicyGroupSDKType): PolicyGroup; toSDK(message: PolicyGroup): PolicyGroupSDKType; }; export declare const PolicyGroup_Item: { encode(message: PolicyGroup_Item, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PolicyGroup_Item; fromJSON(object: any): PolicyGroup_Item; toJSON(message: PolicyGroup_Item): unknown; fromPartial, never>>(object: I): PolicyGroup_Item; fromSDK(object: PolicyGroup_ItemSDKType): PolicyGroup_Item; toSDK(message: PolicyGroup_Item): PolicyGroup_ItemSDKType; }; export declare const GroupMember: { encode(message: GroupMember, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember; fromJSON(object: any): GroupMember; toJSON(message: GroupMember): unknown; fromPartial, never>>(object: I): GroupMember; fromSDK(object: GroupMemberSDKType): GroupMember; toSDK(message: GroupMember): GroupMemberSDKType; };