import { Timestamp, TimestampSDKType } from "../../google/protobuf/timestamp"; import { UInt64Value, UInt64ValueSDKType } from "../common/wrapper"; import * as _m0 from "protobufjs/minimal"; export declare const protobufPackage = "bnbchain.greenfield.permission"; /** ActionType defines the operations you can execute in greenfield storage network */ export declare enum ActionType { ACTION_UNSPECIFIED = 0, ACTION_UPDATE_BUCKET_INFO = 1, ACTION_DELETE_BUCKET = 2, ACTION_CREATE_OBJECT = 3, ACTION_DELETE_OBJECT = 4, ACTION_COPY_OBJECT = 5, ACTION_GET_OBJECT = 6, ACTION_EXECUTE_OBJECT = 7, ACTION_LIST_OBJECT = 8, ACTION_UPDATE_GROUP_MEMBER = 9, ACTION_DELETE_GROUP = 10, ACTION_TYPE_ALL = 99, UNRECOGNIZED = -1 } export declare const ActionTypeSDKType: typeof ActionType; export declare function actionTypeFromJSON(object: any): ActionType; export declare function actionTypeToJSON(object: ActionType): string; /** Effect define the effect of the operation permission, include Allow or deny */ export declare enum Effect { EFFECT_UNSPECIFIED = 0, EFFECT_ALLOW = 1, EFFECT_DENY = 2, UNRECOGNIZED = -1 } export declare const EffectSDKType: typeof Effect; export declare function effectFromJSON(object: any): Effect; export declare function effectToJSON(object: Effect): string; /** * PrincipalType refers to the identity type of system users or entities. * In Greenfield, it usually refers to accounts or groups. */ export declare enum PrincipalType { PRINCIPAL_TYPE_UNSPECIFIED = 0, PRINCIPAL_TYPE_GNFD_ACCOUNT = 1, PRINCIPAL_TYPE_GNFD_GROUP = 2, UNRECOGNIZED = -1 } export declare const PrincipalTypeSDKType: typeof PrincipalType; export declare function principalTypeFromJSON(object: any): PrincipalType; export declare function principalTypeToJSON(object: PrincipalType): string; export interface Statement { /** effect define the impact of permissions, which can be Allow/Deny */ effect: Effect; /** * action_type define the operation type you can act. greenfield defines a set of permission * that you can specify in a permissionInfo. see ActionType enum for detail. */ actions: ActionType[]; /** * CAN ONLY USED IN bucket level. Support fuzzy match and limit to 5 * If no sub-resource is specified in a statement, then all objects in the bucket are accessible by the principal. * However, if the sub-resource is defined as 'bucket/test_*,' in the statement, then only objects with a 'test_' * prefix can be accessed by the principal. */ resources: string[]; /** expiration_time defines how long the permission is valid. If not explicitly specified, it means it will not expire. */ expirationTime?: Timestamp; /** limit_size defines the total data size that is allowed to operate. If not explicitly specified, it means it will not limit. */ limitSize?: UInt64Value; } export interface StatementSDKType { effect: Effect; actions: ActionType[]; resources: string[]; expiration_time?: TimestampSDKType; limit_size?: UInt64ValueSDKType; } /** Principal define the roles that can grant permissions. Currently, it can be account or group. */ export interface Principal { type: PrincipalType; /** * When the type is an account, its value is sdk.AccAddress().String(); * when the type is a group, its value is math.Uint().String() */ value: string; } /** Principal define the roles that can grant permissions. Currently, it can be account or group. */ export interface PrincipalSDKType { type: PrincipalType; value: string; } export declare const Statement: { encode(message: Statement, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Statement; fromJSON(object: any): Statement; toJSON(message: Statement): unknown; fromPartial, 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>>(object: I): Statement; fromSDK(object: StatementSDKType): Statement; toSDK(message: Statement): StatementSDKType; }; export declare const Principal: { encode(message: Principal, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Principal; fromJSON(object: any): Principal; toJSON(message: Principal): unknown; fromPartial, never>>(object: I): Principal; fromSDK(object: PrincipalSDKType): Principal; toSDK(message: Principal): PrincipalSDKType; };