{"version":3,"file":"storage_node.mjs","names":["group_ops.Element","extended_field.ExtendedField","event_blob.EventBlobAttestation"],"sources":["../../../src/contracts/walrus/storage_node.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\nimport { MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';\nimport { bcs } from '@mysten/sui/bcs';\nimport { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';\nimport * as group_ops from './deps/sui/group_ops.js';\nimport * as extended_field from './extended_field.js';\nimport * as event_blob from './event_blob.js';\nconst $moduleName = '@local-pkg/walrus::storage_node';\nexport const StorageNodeInfo = new MoveStruct({\n\tname: `${$moduleName}::StorageNodeInfo`,\n\tfields: {\n\t\tname: bcs.string(),\n\t\tnode_id: bcs.Address,\n\t\tnetwork_address: bcs.string(),\n\t\tpublic_key: group_ops.Element,\n\t\tnext_epoch_public_key: bcs.option(group_ops.Element),\n\t\tnetwork_public_key: bcs.vector(bcs.u8()),\n\t\tmetadata: extended_field.ExtendedField,\n\t},\n});\nexport const StorageNodeCap = new MoveStruct({\n\tname: `${$moduleName}::StorageNodeCap`,\n\tfields: {\n\t\tid: bcs.Address,\n\t\tnode_id: bcs.Address,\n\t\tlast_epoch_sync_done: bcs.u32(),\n\t\tlast_event_blob_attestation: bcs.option(event_blob.EventBlobAttestation),\n\t\t/** Stores the Merkle root of the deny list for the storage node. */\n\t\tdeny_list_root: bcs.u256(),\n\t\t/** Stores the sequence number of the deny list for the storage node. */\n\t\tdeny_list_sequence: bcs.u64(),\n\t\t/** Stores the size of the deny list for the storage node. */\n\t\tdeny_list_size: bcs.u64(),\n\t},\n});\nexport interface IdArguments {\n\tcap: TransactionArgument;\n}\nexport interface IdOptions {\n\tpackage?: string;\n\targuments: IdArguments | [cap: TransactionArgument];\n}\n/** Return the node ID of the storage node. */\nexport function id(options: IdOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface NodeIdArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface NodeIdOptions {\n\tpackage?: string;\n\targuments: NodeIdArguments | [cap: RawTransactionArgument<string>];\n}\n/** Return the pool ID of the storage node. */\nexport function nodeId(options: NodeIdOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'node_id',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface LastEpochSyncDoneArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface LastEpochSyncDoneOptions {\n\tpackage?: string;\n\targuments: LastEpochSyncDoneArguments | [cap: RawTransactionArgument<string>];\n}\n/**\n * Return the last epoch in which the storage node attested that it has finished\n * syncing.\n */\nexport function lastEpochSyncDone(options: LastEpochSyncDoneOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'last_epoch_sync_done',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface LastEventBlobAttestationArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface LastEventBlobAttestationOptions {\n\tpackage?: string;\n\targuments: LastEventBlobAttestationArguments | [cap: RawTransactionArgument<string>];\n}\n/** Return the latest event blob attestation. */\nexport function lastEventBlobAttestation(options: LastEventBlobAttestationOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'last_event_blob_attestation',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface DenyListRootArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface DenyListRootOptions {\n\tpackage?: string;\n\targuments: DenyListRootArguments | [cap: RawTransactionArgument<string>];\n}\n/** Return the deny list root of the storage node. */\nexport function denyListRoot(options: DenyListRootOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'deny_list_root',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\nexport interface DenyListSequenceArguments {\n\tcap: RawTransactionArgument<string>;\n}\nexport interface DenyListSequenceOptions {\n\tpackage?: string;\n\targuments: DenyListSequenceArguments | [cap: RawTransactionArgument<string>];\n}\n/** Return the deny list sequence number of the storage node. */\nexport function denyListSequence(options: DenyListSequenceOptions) {\n\tconst packageAddress = options.package ?? '@local-pkg/walrus';\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: 'storage_node',\n\t\t\tfunction: 'deny_list_sequence',\n\t\t\targuments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),\n\t\t});\n}\n"],"mappings":";;;;;;;;;;AASA,MAAM,cAAc;AACpB,MAAa,kBAAkB,IAAI,WAAW;CAC7C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,MAAM,IAAI,QAAQ;EAClB,SAAS,IAAI;EACb,iBAAiB,IAAI,QAAQ;EAC7B,YAAYA;EACZ,uBAAuB,IAAI,OAAOA,QAAkB;EACpD,oBAAoB,IAAI,OAAO,IAAI,IAAI,CAAC;EACxC,UAAUC;EACV;CACD,CAAC;AACF,MAAa,iBAAiB,IAAI,WAAW;CAC5C,MAAM,GAAG,YAAY;CACrB,QAAQ;EACP,IAAI,IAAI;EACR,SAAS,IAAI;EACb,sBAAsB,IAAI,KAAK;EAC/B,6BAA6B,IAAI,OAAOC,qBAAgC;EAExE,gBAAgB,IAAI,MAAM;EAE1B,oBAAoB,IAAI,KAAK;EAE7B,gBAAgB,IAAI,KAAK;EACzB;CACD,CAAC"}