{"version":3,"file":"pool_valuation_cap.mjs","names":[],"sources":["../../../src/contracts/deepbook_predict/pool_valuation_cap.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Defines revocable authority to start the full-pool valuation (the flush) without\n * granting market-creation, oracle-write, or root-admin power. `Registry` owns the\n * allowlist and issues the transaction-local proof `plp::start_pool_valuation`\n * consumes.\n */\n\nimport { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction } from '@mysten/sui/transactions';\nconst $moduleName = '@local-pkg/deepbook_predict::pool_valuation_cap';\nexport const PoolValuationCap = new MoveStruct({\n\tname: `${$moduleName}::PoolValuationCap`,\n\tfields: {\n\t\tid: bcs.Address,\n\t},\n});\nexport interface IdArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface IdOptions {\n\tpackage?: string;\n\targuments: IdArguments | [cap: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Returns the capability identity used by the registry allowlist. */\nexport function id(options: IdOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['cap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'pool_valuation_cap',\n\t\t\tfunction: 'id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface DestroyArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface DestroyOptions {\n\tpackage?: string;\n\targuments: DestroyArguments | [cap: RawTransactionArgument<string>];\n\tconfig?: {\n\t\tpredictPackageId?: string;\n\t};\n}\n/** Destroy a `PoolValuationCap` the holder no longer needs. */\nexport function destroy(options: DestroyOptions) {\n\tconst packageAddress =\n\t\toptions.package ?? options.config?.predictPackageId ?? '@local-pkg/deepbook_predict';\n\tconst argumentsTypes = [null] satisfies (string | null)[];\n\tconst parameterNames = ['cap'];\n\treturn (tx: Transaction) =>\n\t\ttx.moveCall({\n\t\t\tpackage: packageAddress,\n\t\t\tmodule: 'pool_valuation_cap',\n\t\t\tfunction: 'destroy',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,cAAc;AACpB,MAAa,mBAAmB,IAAI,WAAW;CAC9C,MAAM,GAAG,YAAY;CACrB,QAAQ,EACP,IAAI,IAAI,SACR;CACD,CAAC;;AAYF,SAAgB,GAAG,SAAoB;CACtC,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,MAAM;AAC9B,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC;;;AAaJ,SAAgB,QAAQ,SAAyB;CAChD,MAAM,iBACL,QAAQ,WAAW,QAAQ,QAAQ,oBAAoB;CACxD,MAAM,iBAAiB,CAAC,KAAK;CAC7B,MAAM,iBAAiB,CAAC,MAAM;AAC9B,SAAQ,OACP,GAAG,SAAS;EACX,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW,uBAAuB,QAAQ,WAAW,gBAAgB,eAAe;EACpF,CAAC"}