UNPKG

@mysten/suins

Version:
1 lines 1.48 kB
{"version":3,"file":"linked_table.mjs","names":[],"sources":["../../../../../src/contracts/suins_discounts/deps/sui/linked_table.ts"],"sourcesContent":["/**************************************************************\n * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *\n **************************************************************/\n\n/**\n * Similar to `sui::table` but the values are linked together, allowing for ordered\n * insertion and removal\n */\n\nimport { type BcsType, bcs } from '@mysten/sui/bcs';\nimport { MoveStruct } from '../../../utils/index.js';\nconst $moduleName = '0x2::linked_table';\nexport function LinkedTable<K extends BcsType<any>>(...typeParameters: [K]) {\n\treturn new MoveStruct({\n\t\tname: `${$moduleName}::LinkedTable<${typeParameters[0].name as K['name']}, phantom V>`,\n\t\tfields: {\n\t\t\t/** the ID of this table */\n\t\t\tid: bcs.Address,\n\t\t\t/** the number of key-value pairs in the table */\n\t\t\tsize: bcs.u64(),\n\t\t\t/** the front of the table, i.e. the key of the first entry */\n\t\t\thead: bcs.option(typeParameters[0]),\n\t\t\t/** the back of the table, i.e. the key of the last entry */\n\t\t\ttail: bcs.option(typeParameters[0]),\n\t\t},\n\t});\n}\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,cAAc;AACpB,SAAgB,YAAoC,GAAG,gBAAqB;AAC3E,QAAO,IAAI,WAAW;EACrB,MAAM,GAAG,YAAY,gBAAgB,eAAe,GAAG,KAAkB;EACzE,QAAQ;GAEP,IAAI,IAAI;GAER,MAAM,IAAI,KAAK;GAEf,MAAM,IAAI,OAAO,eAAe,GAAG;GAEnC,MAAM,IAAI,OAAO,eAAe,GAAG;GACnC;EACD,CAAC"}