@sentio/sdk 2.11.7-rc.1 → 2.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ import { AbstractCodegen } from '../../move/abstract-codegen.js';
6
6
  import { toInternalModule } from '../move-types.js';
7
7
  import { moduleQname, SPLITTER, structQname } from '../../move/index.js';
8
8
  import { getMeaningfulFunctionParams } from '../utils.js';
9
- import { join } from "path";
9
+ import { join } from 'path';
10
10
  export async function codegen(abisDir, outDir = join('src', 'types', 'sui'), genExample = false) {
11
11
  if (!fs.existsSync(abisDir)) {
12
12
  return;
@@ -30,7 +30,7 @@ class SuiCodegen extends AbstractCodegen {
30
30
  MAIN_NET = SuiNetwork.MAIN_NET;
31
31
  TEST_NET = SuiNetwork.TEST_NET;
32
32
  PREFIX = 'Sui';
33
- STRUCT_FIELD_NAME = 'fields';
33
+ // STRUCT_FIELD_NAME = 'fields'
34
34
  // GENERATE_ON_ENTRY = true
35
35
  PAYLOAD_OPTIONAL = true;
36
36
  async fetchModules(account, network) {
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../../src/sui/codegen/codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAA4B,MAAM,gBAAgB,CAAA;AAEtF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAkB,MAAM,qBAAqB,CAAA;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAA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ACD,OAAO,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACtD,CAAC;IAED,gBAAgB,CAAC,MAA0B,EAAE,MAA0B;QACrE,QAAQ,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YACnC,KAAK,iBAAiB,CAAC;YACvB,KAAK,iBAAiB,CAAC;YACvB,KAAK,qBAAqB;gBACxB,OAAO,EAAE,CAAA;SACZ;QACD,OAAO,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/C,CAAC;CACF","sourcesContent":["import { Connection, JsonRpcProvider, SuiMoveNormalizedModules } from '@mysten/sui.js'\n\nimport { SuiNetwork } from '../network.js'\nimport * as fs from 'fs'\nimport chalk from 'chalk'\nimport { InternalMoveModule, InternalMoveStruct } from '../../move/internal-models.js'\nimport { AbstractCodegen } from '../../move/abstract-codegen.js'\nimport { toInternalModule } from '../move-types.js'\nimport { moduleQname, SPLITTER, structQname, TypeDescriptor } from '../../move/index.js'\nimport { getMeaningfulFunctionParams } from '../utils.js'\nimport {join} from \"path\";\n\nexport async function codegen(abisDir: string, outDir = join('src','types','sui'), genExample = false) {\n if (!fs.existsSync(abisDir)) {\n return\n }\n const gen = new SuiCodegen()\n const numFiles = await gen.generate(abisDir, outDir)\n console.log(chalk.green(`Generated ${numFiles} for Sui`))\n}\n\nfunction getRpcEndpoint(network: SuiNetwork): string {\n switch (network) {\n case SuiNetwork.TEST_NET:\n return 'https://fullnode.testnet.sui.io/'\n }\n return 'https://fullnode.mainnet.sui.io/'\n}\n\nfunction getRpcClient(network: SuiNetwork): JsonRpcProvider {\n return new JsonRpcProvider(new Connection({ fullnode: getRpcEndpoint(network) }))\n}\n\nclass SuiCodegen extends AbstractCodegen<SuiMoveNormalizedModules, SuiNetwork> {\n ADDRESS_TYPE = 'SuiAddress'\n MAIN_NET = SuiNetwork.MAIN_NET\n TEST_NET = SuiNetwork.TEST_NET\n PREFIX = 'Sui'\n STRUCT_FIELD_NAME = 'fields'\n // GENERATE_ON_ENTRY = true\n PAYLOAD_OPTIONAL = true\n\n async fetchModules(account: string, network: SuiNetwork): Promise<SuiMoveNormalizedModules> {\n const client = getRpcClient(network)\n return await client.getNormalizedMoveModulesByPackage({ package: account })\n }\n\n getMeaningfulFunctionParams(params: TypeDescriptor[]): TypeDescriptor[] {\n return getMeaningfulFunctionParams(params)\n }\n\n toInternalModules(modules: SuiMoveNormalizedModules): InternalMoveModule[] {\n return Object.values(modules).map(toInternalModule)\n }\n\n getEventStructs(module: InternalMoveModule) {\n const qname = moduleQname(module)\n const eventMap = new Map<string, InternalMoveStruct>()\n\n for (const struct of module.structs) {\n const abilities = new Set(struct.abilities)\n if (abilities.has('Drop') && abilities.has('Copy')) {\n eventMap.set(qname + SPLITTER + struct.name, struct)\n }\n }\n return eventMap\n }\n\n readModulesFile(fullPath: string) {\n const res = super.readModulesFile(fullPath)\n if (res.result) {\n return res.result\n }\n return res\n }\n\n generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>): string {\n switch (structQname(module, struct)) {\n case '0x2::object::ID':\n return `export type ${struct.name} = string`\n case '0x2::coin::Coin':\n return `export type ${struct.name}<T> = string`\n case '0x1::option::Option':\n return `export type Option<T> = T | undefined`\n }\n return super.generateStructs(module, struct, events)\n }\n\n generateOnEvents(module: InternalMoveModule, struct: InternalMoveStruct): string {\n switch (structQname(module, struct)) {\n case '0x2::object::ID':\n case '0x2::coin::Coin':\n case '0x1::option::Option':\n return ''\n }\n return super.generateOnEvents(module, struct)\n }\n}\n"]}
1
+ {"version":3,"file":"codegen.js","sourceRoot":"","sources":["../../../src/sui/codegen/codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAA4B,MAAM,gBAAgB,CAAA;AAEtF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO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AA0B,EAAE,MAA0B,EAAE,MAAmB;QACzF,QAAQ,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YACnC,KAAK,iBAAiB;gBACpB,OAAO,eAAe,MAAM,CAAC,IAAI,WAAW,CAAA;YAC9C,KAAK,iBAAiB;gBACpB,OAAO,eAAe,MAAM,CAAC,IAAI,cAAc,CAAA;YACjD,KAAK,qBAAqB;gBACxB,OAAO,uCAAuC,CAAA;SACjD;QACD,OAAO,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IACtD,CAAC;IAED,gBAAgB,CAAC,MAA0B,EAAE,MAA0B;QACrE,QAAQ,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YACnC,KAAK,iBAAiB,CAAC;YACvB,KAAK,iBAAiB,CAAC;YACvB,KAAK,qBAAqB;gBACxB,OAAO,EAAE,CAAA;SACZ;QACD,OAAO,KAAK,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/C,CAAC;CACF","sourcesContent":["import { Connection, JsonRpcProvider, SuiMoveNormalizedModules } from '@mysten/sui.js'\n\nimport { SuiNetwork } from '../network.js'\nimport * as fs from 'fs'\nimport chalk from 'chalk'\nimport { InternalMoveModule, InternalMoveStruct } from '../../move/internal-models.js'\nimport { AbstractCodegen } from '../../move/abstract-codegen.js'\nimport { toInternalModule } from '../move-types.js'\nimport { moduleQname, SPLITTER, structQname, TypeDescriptor } from '../../move/index.js'\nimport { getMeaningfulFunctionParams } from '../utils.js'\nimport { join } from 'path'\n\nexport async function codegen(abisDir: string, outDir = join('src', 'types', 'sui'), genExample = false) {\n if (!fs.existsSync(abisDir)) {\n return\n }\n const gen = new SuiCodegen()\n const numFiles = await gen.generate(abisDir, outDir)\n console.log(chalk.green(`Generated ${numFiles} for Sui`))\n}\n\nfunction getRpcEndpoint(network: SuiNetwork): string {\n switch (network) {\n case SuiNetwork.TEST_NET:\n return 'https://fullnode.testnet.sui.io/'\n }\n return 'https://fullnode.mainnet.sui.io/'\n}\n\nfunction getRpcClient(network: SuiNetwork): JsonRpcProvider {\n return new JsonRpcProvider(new Connection({ fullnode: getRpcEndpoint(network) }))\n}\n\nclass SuiCodegen extends AbstractCodegen<SuiMoveNormalizedModules, SuiNetwork> {\n ADDRESS_TYPE = 'SuiAddress'\n MAIN_NET = SuiNetwork.MAIN_NET\n TEST_NET = SuiNetwork.TEST_NET\n PREFIX = 'Sui'\n // STRUCT_FIELD_NAME = 'fields'\n // GENERATE_ON_ENTRY = true\n PAYLOAD_OPTIONAL = true\n\n async fetchModules(account: string, network: SuiNetwork): Promise<SuiMoveNormalizedModules> {\n const client = getRpcClient(network)\n return await client.getNormalizedMoveModulesByPackage({ package: account })\n }\n\n getMeaningfulFunctionParams(params: TypeDescriptor[]): TypeDescriptor[] {\n return getMeaningfulFunctionParams(params)\n }\n\n toInternalModules(modules: SuiMoveNormalizedModules): InternalMoveModule[] {\n return Object.values(modules).map(toInternalModule)\n }\n\n getEventStructs(module: InternalMoveModule) {\n const qname = moduleQname(module)\n const eventMap = new Map<string, InternalMoveStruct>()\n\n for (const struct of module.structs) {\n const abilities = new Set(struct.abilities)\n if (abilities.has('Drop') && abilities.has('Copy')) {\n eventMap.set(qname + SPLITTER + struct.name, struct)\n }\n }\n return eventMap\n }\n\n readModulesFile(fullPath: string) {\n const res = super.readModulesFile(fullPath)\n if (res.result) {\n return res.result\n }\n return res\n }\n\n generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>): string {\n switch (structQname(module, struct)) {\n case '0x2::object::ID':\n return `export type ${struct.name} = string`\n case '0x2::coin::Coin':\n return `export type ${struct.name}<T> = string`\n case '0x1::option::Option':\n return `export type Option<T> = T | undefined`\n }\n return super.generateStructs(module, struct, events)\n }\n\n generateOnEvents(module: InternalMoveModule, struct: InternalMoveStruct): string {\n switch (structQname(module, struct)) {\n case '0x2::object::ID':\n case '0x2::coin::Coin':\n case '0x1::option::Option':\n return ''\n }\n return super.generateOnEvents(module, struct)\n }\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sentio/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "2.11.7-rc.1",
4
+ "version": "2.11.7",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "compile": "tsc && cp src/utils/*.csv lib/utils && cp src/tsup.config.ts lib",
@@ -23,8 +23,8 @@
23
23
  "@project-serum/anchor": "^0.26.0",
24
24
  "@sentio/bigdecimal": "^9.1.1-patch.3",
25
25
  "@sentio/ethers-v6": "^1.0.28",
26
- "@sentio/protos": "^2.11.7-rc.1",
27
- "@sentio/runtime": "^2.11.7-rc.1",
26
+ "@sentio/protos": "^2.11.7",
27
+ "@sentio/runtime": "^2.11.7",
28
28
  "@solana/web3.js": "^1.74.0",
29
29
  "@types/prettier": "^2.7.2",
30
30
  "aptos-sdk": "npm:aptos@^1.7.2",
@@ -88,5 +88,5 @@
88
88
  "engines": {
89
89
  "node": ">=16"
90
90
  },
91
- "gitHead": "cd7978f89644f4805530bad48073724b4f3c6f61"
91
+ "gitHead": "4d7e1b0ca602518e06d0061436ba3548fb3a74da"
92
92
  }
@@ -69,7 +69,7 @@ export namespace ascii {
69
69
  }
70
70
 
71
71
  export interface CharInstance extends TypedEventInstance<Char> {
72
- fields_decoded: Char;
72
+ data_decoded: Char;
73
73
  type_arguments: [];
74
74
  }
75
75
 
@@ -79,7 +79,7 @@ export namespace ascii {
79
79
  }
80
80
 
81
81
  export interface StringInstance extends TypedEventInstance<String> {
82
- fields_decoded: String;
82
+ data_decoded: String;
83
83
  type_arguments: [];
84
84
  }
85
85
  }
@@ -122,7 +122,7 @@ export namespace bit_vector {
122
122
  }
123
123
 
124
124
  export interface BitVectorInstance extends TypedEventInstance<BitVector> {
125
- fields_decoded: BitVector;
125
+ data_decoded: BitVector;
126
126
  type_arguments: [];
127
127
  }
128
128
  }
@@ -165,7 +165,7 @@ export namespace fixed_point32 {
165
165
 
166
166
  export interface FixedPoint32Instance
167
167
  extends TypedEventInstance<FixedPoint32> {
168
- fields_decoded: FixedPoint32;
168
+ data_decoded: FixedPoint32;
169
169
  type_arguments: [];
170
170
  }
171
171
  }
@@ -211,7 +211,7 @@ export namespace string_ {
211
211
  }
212
212
 
213
213
  export interface StringInstance extends TypedEventInstance<String> {
214
- fields_decoded: String;
214
+ data_decoded: String;
215
215
  type_arguments: [];
216
216
  }
217
217
  }
@@ -251,7 +251,7 @@ export namespace type_name {
251
251
  }
252
252
 
253
253
  export interface TypeNameInstance extends TypedEventInstance<TypeName> {
254
- fields_decoded: TypeName;
254
+ data_decoded: TypeName;
255
255
  type_arguments: [];
256
256
  }
257
257
  }
@@ -77,7 +77,7 @@ export namespace bcs {
77
77
  }
78
78
 
79
79
  export interface BCSInstance extends TypedEventInstance<BCS> {
80
- fields_decoded: BCS;
80
+ data_decoded: BCS;
81
81
  type_arguments: [];
82
82
  }
83
83
  }
@@ -266,7 +266,7 @@ export namespace coin {
266
266
 
267
267
  export interface CurrencyCreatedInstance
268
268
  extends TypedEventInstance<CurrencyCreated<any>> {
269
- fields_decoded: CurrencyCreated<any>;
269
+ data_decoded: CurrencyCreated<any>;
270
270
  type_arguments: [string];
271
271
  }
272
272
 
@@ -486,7 +486,7 @@ export namespace display {
486
486
 
487
487
  export interface DisplayCreatedInstance
488
488
  extends TypedEventInstance<DisplayCreated<any>> {
489
- fields_decoded: DisplayCreated<any>;
489
+ data_decoded: DisplayCreated<any>;
490
490
  type_arguments: [string];
491
491
  }
492
492
 
@@ -499,7 +499,7 @@ export namespace display {
499
499
 
500
500
  export interface VersionUpdatedInstance
501
501
  extends TypedEventInstance<VersionUpdated<any>> {
502
- fields_decoded: VersionUpdated<any>;
502
+ data_decoded: VersionUpdated<any>;
503
503
  type_arguments: [string];
504
504
  }
505
505
 
@@ -592,7 +592,7 @@ export namespace dynamic_object_field {
592
592
  }
593
593
 
594
594
  export interface WrapperInstance extends TypedEventInstance<Wrapper<any>> {
595
- fields_decoded: Wrapper<any>;
595
+ data_decoded: Wrapper<any>;
596
596
  type_arguments: [string];
597
597
  }
598
598
  }
@@ -687,7 +687,7 @@ export namespace groth16 {
687
687
  }
688
688
 
689
689
  export interface CurveInstance extends TypedEventInstance<Curve> {
690
- fields_decoded: Curve;
690
+ data_decoded: Curve;
691
691
  type_arguments: [];
692
692
  }
693
693
 
@@ -701,7 +701,7 @@ export namespace groth16 {
701
701
 
702
702
  export interface PreparedVerifyingKeyInstance
703
703
  extends TypedEventInstance<PreparedVerifyingKey> {
704
- fields_decoded: PreparedVerifyingKey;
704
+ data_decoded: PreparedVerifyingKey;
705
705
  type_arguments: [];
706
706
  }
707
707
 
@@ -711,7 +711,7 @@ export namespace groth16 {
711
711
  }
712
712
 
713
713
  export interface ProofPointsInstance extends TypedEventInstance<ProofPoints> {
714
- fields_decoded: ProofPoints;
714
+ data_decoded: ProofPoints;
715
715
  type_arguments: [];
716
716
  }
717
717
 
@@ -722,7 +722,7 @@ export namespace groth16 {
722
722
 
723
723
  export interface PublicProofInputsInstance
724
724
  extends TypedEventInstance<PublicProofInputs> {
725
- fields_decoded: PublicProofInputs;
725
+ data_decoded: PublicProofInputs;
726
726
  type_arguments: [];
727
727
  }
728
728
  }
@@ -810,7 +810,7 @@ export namespace kiosk {
810
810
  }
811
811
 
812
812
  export interface ItemInstance extends TypedEventInstance<Item> {
813
- fields_decoded: Item;
813
+ data_decoded: Item;
814
814
  type_arguments: [];
815
815
  }
816
816
 
@@ -823,7 +823,7 @@ export namespace kiosk {
823
823
 
824
824
  export interface ItemListedInstance
825
825
  extends TypedEventInstance<ItemListed<any>> {
826
- fields_decoded: ItemListed<any>;
826
+ data_decoded: ItemListed<any>;
827
827
  type_arguments: [string];
828
828
  }
829
829
 
@@ -849,7 +849,7 @@ export namespace kiosk {
849
849
  }
850
850
 
851
851
  export interface ListingInstance extends TypedEventInstance<Listing> {
852
- fields_decoded: Listing;
852
+ data_decoded: Listing;
853
853
  type_arguments: [];
854
854
  }
855
855
 
@@ -859,7 +859,7 @@ export namespace kiosk {
859
859
  }
860
860
 
861
861
  export interface LockInstance extends TypedEventInstance<Lock> {
862
- fields_decoded: Lock;
862
+ data_decoded: Lock;
863
863
  type_arguments: [];
864
864
  }
865
865
 
@@ -1333,7 +1333,7 @@ export namespace transfer_policy {
1333
1333
  }
1334
1334
 
1335
1335
  export interface RuleKeyInstance extends TypedEventInstance<RuleKey<any>> {
1336
- fields_decoded: RuleKey<any>;
1336
+ data_decoded: RuleKey<any>;
1337
1337
  type_arguments: [string];
1338
1338
  }
1339
1339
 
@@ -1357,7 +1357,7 @@ export namespace transfer_policy {
1357
1357
 
1358
1358
  export interface TransferPolicyCreatedInstance
1359
1359
  extends TypedEventInstance<TransferPolicyCreated<any>> {
1360
- fields_decoded: TransferPolicyCreated<any>;
1360
+ data_decoded: TransferPolicyCreated<any>;
1361
1361
  type_arguments: [string];
1362
1362
  }
1363
1363
 
@@ -1418,7 +1418,7 @@ export namespace url {
1418
1418
  }
1419
1419
 
1420
1420
  export interface UrlInstance extends TypedEventInstance<Url> {
1421
- fields_decoded: Url;
1421
+ data_decoded: Url;
1422
1422
  type_arguments: [];
1423
1423
  }
1424
1424
  }
@@ -1473,7 +1473,7 @@ export namespace vec_map {
1473
1473
  }
1474
1474
 
1475
1475
  export interface EntryInstance extends TypedEventInstance<Entry<any, any>> {
1476
- fields_decoded: Entry<any, any>;
1476
+ data_decoded: Entry<any, any>;
1477
1477
  type_arguments: [string, string];
1478
1478
  }
1479
1479
 
@@ -1483,7 +1483,7 @@ export namespace vec_map {
1483
1483
  }
1484
1484
 
1485
1485
  export interface VecMapInstance extends TypedEventInstance<VecMap<any, any>> {
1486
- fields_decoded: VecMap<any, any>;
1486
+ data_decoded: VecMap<any, any>;
1487
1487
  type_arguments: [string, string];
1488
1488
  }
1489
1489
  }
@@ -1523,7 +1523,7 @@ export namespace vec_set {
1523
1523
  }
1524
1524
 
1525
1525
  export interface VecSetInstance extends TypedEventInstance<VecSet<any>> {
1526
- fields_decoded: VecSet<any>;
1526
+ data_decoded: VecSet<any>;
1527
1527
  type_arguments: [string];
1528
1528
  }
1529
1529
  }
@@ -88,7 +88,7 @@ export namespace genesis {
88
88
 
89
89
  export interface GenesisChainParametersInstance
90
90
  extends TypedEventInstance<GenesisChainParameters> {
91
- fields_decoded: GenesisChainParameters;
91
+ data_decoded: GenesisChainParameters;
92
92
  type_arguments: [];
93
93
  }
94
94
 
@@ -113,7 +113,7 @@ export namespace genesis {
113
113
 
114
114
  export interface GenesisValidatorMetadataInstance
115
115
  extends TypedEventInstance<GenesisValidatorMetadata> {
116
- fields_decoded: GenesisValidatorMetadata;
116
+ data_decoded: GenesisValidatorMetadata;
117
117
  type_arguments: [];
118
118
  }
119
119
 
@@ -215,7 +215,7 @@ export namespace staking_pool {
215
215
 
216
216
  export interface PoolTokenExchangeRateInstance
217
217
  extends TypedEventInstance<PoolTokenExchangeRate> {
218
- fields_decoded: PoolTokenExchangeRate;
218
+ data_decoded: PoolTokenExchangeRate;
219
219
  type_arguments: [];
220
220
  }
221
221
 
@@ -1265,7 +1265,7 @@ export namespace sui_system_state_inner {
1265
1265
 
1266
1266
  export interface SystemEpochInfoEventInstance
1267
1267
  extends TypedEventInstance<SystemEpochInfoEvent> {
1268
- fields_decoded: SystemEpochInfoEvent;
1268
+ data_decoded: SystemEpochInfoEvent;
1269
1269
  type_arguments: [];
1270
1270
  }
1271
1271
 
@@ -1342,7 +1342,7 @@ export namespace validator {
1342
1342
 
1343
1343
  export interface StakingRequestEventInstance
1344
1344
  extends TypedEventInstance<StakingRequestEvent> {
1345
- fields_decoded: StakingRequestEvent;
1345
+ data_decoded: StakingRequestEvent;
1346
1346
  type_arguments: [];
1347
1347
  }
1348
1348
 
@@ -1359,7 +1359,7 @@ export namespace validator {
1359
1359
 
1360
1360
  export interface UnstakingRequestEventInstance
1361
1361
  extends TypedEventInstance<UnstakingRequestEvent> {
1362
- fields_decoded: UnstakingRequestEvent;
1362
+ data_decoded: UnstakingRequestEvent;
1363
1363
  type_arguments: [];
1364
1364
  }
1365
1365
 
@@ -1499,7 +1499,7 @@ export namespace validator_set {
1499
1499
 
1500
1500
  export interface ValidatorEpochInfoEventInstance
1501
1501
  extends TypedEventInstance<ValidatorEpochInfoEvent> {
1502
- fields_decoded: ValidatorEpochInfoEvent;
1502
+ data_decoded: ValidatorEpochInfoEvent;
1503
1503
  type_arguments: [];
1504
1504
  }
1505
1505
 
@@ -1512,7 +1512,7 @@ export namespace validator_set {
1512
1512
 
1513
1513
  export interface ValidatorJoinEventInstance
1514
1514
  extends TypedEventInstance<ValidatorJoinEvent> {
1515
- fields_decoded: ValidatorJoinEvent;
1515
+ data_decoded: ValidatorJoinEvent;
1516
1516
  type_arguments: [];
1517
1517
  }
1518
1518
 
@@ -1526,7 +1526,7 @@ export namespace validator_set {
1526
1526
 
1527
1527
  export interface ValidatorLeaveEventInstance
1528
1528
  extends TypedEventInstance<ValidatorLeaveEvent> {
1529
- fields_decoded: ValidatorLeaveEvent;
1529
+ data_decoded: ValidatorLeaveEvent;
1530
1530
  type_arguments: [];
1531
1531
  }
1532
1532
 
@@ -8,9 +8,9 @@ import { AbstractCodegen } from '../../move/abstract-codegen.js'
8
8
  import { toInternalModule } from '../move-types.js'
9
9
  import { moduleQname, SPLITTER, structQname, TypeDescriptor } from '../../move/index.js'
10
10
  import { getMeaningfulFunctionParams } from '../utils.js'
11
- import {join} from "path";
11
+ import { join } from 'path'
12
12
 
13
- export async function codegen(abisDir: string, outDir = join('src','types','sui'), genExample = false) {
13
+ export async function codegen(abisDir: string, outDir = join('src', 'types', 'sui'), genExample = false) {
14
14
  if (!fs.existsSync(abisDir)) {
15
15
  return
16
16
  }
@@ -36,7 +36,7 @@ class SuiCodegen extends AbstractCodegen<SuiMoveNormalizedModules, SuiNetwork> {
36
36
  MAIN_NET = SuiNetwork.MAIN_NET
37
37
  TEST_NET = SuiNetwork.TEST_NET
38
38
  PREFIX = 'Sui'
39
- STRUCT_FIELD_NAME = 'fields'
39
+ // STRUCT_FIELD_NAME = 'fields'
40
40
  // GENERATE_ON_ENTRY = true
41
41
  PAYLOAD_OPTIONAL = true
42
42