/************************************************************** * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED * **************************************************************/ /** * Defines the root capability used by state-owning modules to authorize Predict * governance operations. Possession is the sole authority; the package exposes no * on-chain revocation or rotation mechanism for this capability. */ import { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js'; import { bcs } from '@mysten/sui/bcs'; import { type Transaction } from '@mysten/sui/transactions'; const $moduleName = '@local-pkg/deepbook_predict::admin'; export const AdminCap = new MoveStruct({ name: `${$moduleName}::AdminCap`, fields: { id: bcs.Address, }, }); export interface IdArguments { cap: RawTransactionArgument; } export interface IdOptions { package?: string; arguments: IdArguments | [cap: RawTransactionArgument]; config?: { predictPackageId?: string; }; } /** Returns the capability identity for administration tooling and object discovery. */ export function id(options: IdOptions) { const packageAddress = options.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict'; const argumentsTypes = [null] satisfies (string | null)[]; const parameterNames = ['cap']; return (tx: Transaction) => tx.moveCall({ package: packageAddress, module: 'admin', function: 'id', arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames), }); }