import { Name, API, Authority, PermissionLevel } from "@greymass/eosio"; import { AccountPermission } from "./types"; /** * Returns the index of the last element in the array where predicate is true, and -1 * otherwise. * @param array The source array to search in * @param predicate find calls predicate once for each element of the array, in descending * order, until it finds one where predicate returns true. If such an element is found, * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1. */ export declare function findLastIndex(array: Array, predicate: (value: T, index: number, obj: T[]) => boolean): number; /** * It generates a list of permissions for a given account name * @param {Name} name - The name of the account to create. * @returns The `generatePermissions` function returns an array of `AccountPermission` objects. */ export declare const generatePermissions: (name: Name) => AccountPermission[]; /** * Add the permission `eosio.code` to the `active` permission of the account `name` * @param {Name} name - The name of the account to be created. * @param {API.v1.AccountPermission[]} permissions - The permissions to add to the account. */ export declare const addInlinePermission: (name: Name, permissions: API.v1.AccountPermission[]) => void; /** * Given an authority and a permission level, * return true if the permission level is satisfied by the authority * @param {Authority} authority - The authority to check against. * @param {PermissionLevel} permission - PermissionLevel */ export declare function isAuthoritySatisfied(authority: Authority, permission: PermissionLevel): boolean;