@sentio/sdk 2.12.3 → 2.13.0-rc.2

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.
Files changed (43) hide show
  1. package/lib/aptos/aptos-processor.d.ts +3 -3
  2. package/lib/aptos/aptos-processor.js +17 -12
  3. package/lib/aptos/aptos-processor.js.map +1 -1
  4. package/lib/aptos/builtin/0x1.d.ts +168 -168
  5. package/lib/aptos/builtin/0x1.js.map +1 -1
  6. package/lib/aptos/builtin/0x3.d.ts +35 -35
  7. package/lib/aptos/builtin/0x3.js.map +1 -1
  8. package/lib/aptos/context.d.ts +2 -1
  9. package/lib/aptos/context.js +4 -2
  10. package/lib/aptos/context.js.map +1 -1
  11. package/lib/move/abstract-codegen.js +2 -2
  12. package/lib/move/abstract-codegen.js.map +1 -1
  13. package/lib/sui/builtin/0x1.d.ts +6 -6
  14. package/lib/sui/builtin/0x1.js.map +1 -1
  15. package/lib/sui/builtin/0x2.d.ts +43 -43
  16. package/lib/sui/builtin/0x2.js.map +1 -1
  17. package/lib/sui/builtin/0x3.d.ts +43 -43
  18. package/lib/sui/builtin/0x3.js.map +1 -1
  19. package/lib/sui/context.d.ts +2 -1
  20. package/lib/sui/context.js +3 -1
  21. package/lib/sui/context.js.map +1 -1
  22. package/lib/sui/sui-processor.d.ts +2 -2
  23. package/lib/sui/sui-processor.js +15 -12
  24. package/lib/sui/sui-processor.js.map +1 -1
  25. package/lib/testing/aptos-facet.d.ts +2 -2
  26. package/lib/testing/aptos-facet.js +14 -21
  27. package/lib/testing/aptos-facet.js.map +1 -1
  28. package/lib/testing/sui-facet.d.ts +2 -2
  29. package/lib/testing/sui-facet.js +16 -26
  30. package/lib/testing/sui-facet.js.map +1 -1
  31. package/package.json +4 -4
  32. package/src/aptos/aptos-processor.ts +30 -23
  33. package/src/aptos/builtin/0x1.ts +168 -168
  34. package/src/aptos/builtin/0x3.ts +35 -35
  35. package/src/aptos/context.ts +5 -2
  36. package/src/move/abstract-codegen.ts +2 -2
  37. package/src/sui/builtin/0x1.ts +6 -6
  38. package/src/sui/builtin/0x2.ts +43 -43
  39. package/src/sui/builtin/0x3.ts +43 -43
  40. package/src/sui/context.ts +4 -1
  41. package/src/sui/sui-processor.ts +27 -22
  42. package/src/testing/aptos-facet.ts +13 -27
  43. package/src/testing/sui-facet.ts +15 -30
@@ -8,7 +8,8 @@ export declare class AptosContext extends BaseContext {
8
8
  moduleName: string;
9
9
  version: bigint;
10
10
  transaction: Transaction_UserTransaction;
11
- constructor(moduleName: string, network: AptosNetwork, address: string, version: bigint, transaction?: Transaction_UserTransaction);
11
+ eventIndex: number;
12
+ constructor(moduleName: string, network: AptosNetwork, address: string, version: bigint, transaction: Transaction_UserTransaction, eventIndex: number);
12
13
  getChainId(): string;
13
14
  getMetaData(name: string, labels: Labels): RecordMetaData;
14
15
  }
@@ -6,12 +6,14 @@ export class AptosContext extends BaseContext {
6
6
  moduleName;
7
7
  version;
8
8
  transaction;
9
- constructor(moduleName, network, address, version, transaction) {
9
+ eventIndex;
10
+ constructor(moduleName, network, address, version, transaction, eventIndex) {
10
11
  super();
11
12
  this.address = address.toLowerCase();
12
13
  this.network = network;
13
14
  this.moduleName = moduleName;
14
15
  this.version = version;
16
+ this.eventIndex = eventIndex;
15
17
  if (transaction) {
16
18
  this.transaction = transaction;
17
19
  }
@@ -26,7 +28,7 @@ export class AptosContext extends BaseContext {
26
28
  blockNumber: this.version,
27
29
  transactionIndex: 0,
28
30
  transactionHash: this.transaction?.hash || '',
29
- logIndex: 0,
31
+ logIndex: this.eventIndex,
30
32
  chainId: this.getChainId(),
31
33
  name: name,
32
34
  labels: normalizeLabels(labels),
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/aptos/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAA;AAEvD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AG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAC5C,CAAC;IAED,UAAU;QACR,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;IAED,WAAW,CAAC,IAAY,EAAE,MAAc;QACtC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,IAAI,CAAC,OAAO;YACzB,gBAAgB,EAAE,CAAC;YACnB,eAAe,EAAE,EAAE;YACnB,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;SAChC,CAAA;IACH,CAAC;CACF","sourcesContent":["import { RecordMetaData } from '@sentio/protos'\nimport { type Labels, BaseContext, normalizeLabels } from '@sentio/sdk'\nimport { Transaction_UserTransaction } from './move-types.js'\nimport { AptosNetwork, getChainId } from './network.js'\n\nexport class AptosContext extends BaseContext {\n address: string\n network: AptosNetwork\n moduleName: string\n version: bigint\n transaction: Transaction_UserTransaction\n\n constructor(\n moduleName: string,\n network: AptosNetwork,\n address: string,\n version: bigint,\n transaction?: Transaction_UserTransaction\n ) {\n super()\n this.address = address.toLowerCase()\n this.network = network\n this.moduleName = moduleName\n this.version = version\n if (transaction) {\n this.transaction = transaction\n }\n }\n\n getChainId(): string {\n return getChainId(this.network)\n }\n\n getMetaData(name: string, labels: Labels): RecordMetaData {\n return {\n address: this.address,\n contractName: this.moduleName,\n blockNumber: this.version,\n transactionIndex: 0,\n transactionHash: this.transaction?.hash || '', // TODO\n logIndex: 0,\n chainId: this.getChainId(),\n name: name,\n labels: normalizeLabels(labels),\n }\n }\n}\n\nexport class AptosResourcesContext extends BaseContext {\n address: string\n network: AptosNetwork\n version: bigint\n timestampInMicros: number\n\n constructor(network: AptosNetwork, address: string, version: bigint, timestampInMicros: number) {\n super()\n this.address = address\n this.network = network\n this.version = version\n this.timestampInMicros = timestampInMicros\n }\n\n getChainId(): string {\n return getChainId(this.network)\n }\n\n getMetaData(name: string, labels: Labels): RecordMetaData {\n return {\n address: this.address,\n contractName: 'resources',\n blockNumber: this.version,\n transactionIndex: 0,\n transactionHash: '',\n logIndex: 0,\n chainId: this.getChainId(),\n name: name,\n labels: normalizeLabels(labels),\n }\n }\n}\n"]}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/aptos/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAgB,UAAU,EAAE,MAAM,cAAc,CAAA;AAEvD,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,OAAO,CAAQ;IACf,OAAO,CAAc;IACrB,UAAU,CAAQ;IAClB,OAAO,CAAQ;IACf,WAAW,CAA6B;IACxC,UAAU,CAAQ;IAElB,YACE,UAAkB,EAClB,OAAqB,EACrB,OAAe,EACf,OAAe,EACf,WAAwC,EACxC,UAAkB;QAElB,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,WAAW,EAAE;YACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;SAC/B;IACH,CAAC;IAED,UAAU;QACR,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;IAED,WAAW,CAAC,IAAY,EAAE,MAAc;QACtC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,WAAW,EAAE,IAAI,CAAC,OAAO;YACzB,gBAAgB,EAAE,CAAC;YACnB,eAAe,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,EAAE;YAC7C,QAAQ,EAAE,IAAI,CAAC,UAAU;YACzB,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;SAChC,CAAA;IACH,CAAC;CACF;AAED,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD,OAAO,CAAQ;IACf,OAAO,CAAc;IACrB,OAAO,CAAQ;IACf,iBAAiB,CAAQ;IAEzB,YAAY,OAAqB,EAAE,OAAe,EAAE,OAAe,EAAE,iBAAyB;QAC5F,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAC5C,CAAC;IAED,UAAU;QACR,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;IAED,WAAW,CAAC,IAAY,EAAE,MAAc;QACtC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY,EAAE,WAAW;YACzB,WAAW,EAAE,IAAI,CAAC,OAAO;YACzB,gBAAgB,EAAE,CAAC;YACnB,eAAe,EAAE,EAAE;YACnB,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE;YAC1B,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;SAChC,CAAA;IACH,CAAC;CACF","sourcesContent":["import { RecordMetaData } from '@sentio/protos'\nimport { type Labels, BaseContext, normalizeLabels } from '@sentio/sdk'\nimport { Transaction_UserTransaction } from './move-types.js'\nimport { AptosNetwork, getChainId } from './network.js'\n\nexport class AptosContext extends BaseContext {\n address: string\n network: AptosNetwork\n moduleName: string\n version: bigint\n transaction: Transaction_UserTransaction\n eventIndex: number\n\n constructor(\n moduleName: string,\n network: AptosNetwork,\n address: string,\n version: bigint,\n transaction: Transaction_UserTransaction,\n eventIndex: number\n ) {\n super()\n this.address = address.toLowerCase()\n this.network = network\n this.moduleName = moduleName\n this.version = version\n this.eventIndex = eventIndex\n if (transaction) {\n this.transaction = transaction\n }\n }\n\n getChainId(): string {\n return getChainId(this.network)\n }\n\n getMetaData(name: string, labels: Labels): RecordMetaData {\n return {\n address: this.address,\n contractName: this.moduleName,\n blockNumber: this.version,\n transactionIndex: 0,\n transactionHash: this.transaction?.hash || '', // TODO\n logIndex: this.eventIndex,\n chainId: this.getChainId(),\n name: name,\n labels: normalizeLabels(labels),\n }\n }\n}\n\nexport class AptosResourcesContext extends BaseContext {\n address: string\n network: AptosNetwork\n version: bigint\n timestampInMicros: number\n\n constructor(network: AptosNetwork, address: string, version: bigint, timestampInMicros: number) {\n super()\n this.address = address\n this.network = network\n this.version = version\n this.timestampInMicros = timestampInMicros\n }\n\n getChainId(): string {\n return getChainId(this.network)\n }\n\n getMetaData(name: string, labels: Labels): RecordMetaData {\n return {\n address: this.address,\n contractName: 'resources',\n blockNumber: this.version,\n transactionIndex: 0,\n transactionHash: '',\n logIndex: 0,\n chainId: this.getChainId(),\n name: name,\n labels: normalizeLabels(labels),\n }\n }\n}\n"]}
@@ -259,7 +259,7 @@ export class AbstractCodegen {
259
259
  const moduleName = normalizeToJSName(module.name);
260
260
  const camelFuncName = upperFirst(camelCase(func.name));
261
261
  const source = `
262
- onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: ${this.PREFIX}Context) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): ${moduleName} {
262
+ onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: ${this.PREFIX}Context) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): ${moduleName} {
263
263
  this.onEntryFunctionCall(func, {
264
264
  ...filter,
265
265
  function: '${module.name}::${func.name}'
@@ -277,7 +277,7 @@ export class AbstractCodegen {
277
277
  // const genericString = generateStructTypeParameters(struct)
278
278
  const moduleName = normalizeToJSName(module.name);
279
279
  const source = `
280
- onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: ${this.PREFIX}Context) => void, fetchConfig?: MoveFetchConfig): ${moduleName} {
280
+ onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: ${this.PREFIX}Context) => void, fetchConfig?: Partial<MoveFetchConfig>): ${moduleName} {
281
281
  this.onMoveEvent(func, {
282
282
  type: '${module.name}::${struct.name}'
283
283
  },
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-codegen.js","sourceRoot":"","sources":["../../src/move/abstract-codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,GAG/B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAcjD,MAAM,OAAgB,eAAe;IACnC,QAAQ,CAAa;IACrB,QAAQ,CAAa;IACrB,YAAY,CAAQ;IACpB,MAAM,CAAQ;IACd,iBAAiB,GAAW,MAAM,CAAA;IAClC,eAAe,GAAG,KAAK,CAAA;IACvB,iBAAiB,GAAG,IAAI,CAAA;IAC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CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;kCAE7D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;;;QAGlD,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;KAOtE,CAAA,CAAC,SAAS;QAEX,OAAO;YACL;gBACE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,KAAK;gBACtC,WAAW,EAAE,MAAM;aACpB;SACF,CAAA;IACH,CAAC;CACF","sourcesContent":["import {\n InternalMoveFunction,\n InternalMoveFunctionVisibility,\n InternalMoveModule,\n InternalMoveStruct,\n} from './internal-models.js'\nimport path from 'path'\nimport fs from 'fs'\nimport { AccountModulesImportInfo, AccountRegister } from './account.js'\nimport chalk from 'chalk'\nimport { format } from 'prettier'\nimport { isFrameworkAccount, moduleQname, normalizeToJSName, SPLITTER, VECTOR_STR } from './utils.js'\nimport { camelCase, upperFirst } from 'lodash-es'\nimport { TypeDescriptor } from './types.js'\n\ninterface OutputFile {\n fileName: string\n fileContent: string\n}\n\ninterface Config<NetworkType> {\n fileName: string\n outputDir: string\n network: NetworkType\n}\n\nexport abstract class AbstractCodegen<ModuleTypes, NetworkType> {\n TEST_NET: NetworkType\n MAIN_NET: NetworkType\n ADDRESS_TYPE: string\n PREFIX: string\n STRUCT_FIELD_NAME: string = 'data'\n GENERATE_CLIENT = false\n GENERATE_ON_ENTRY = true\n PAYLOAD_OPTIONAL = false\n\n abstract fetchModules(account: string, network: NetworkType): Promise<ModuleTypes>\n abstract toInternalModules(modules: ModuleTypes): InternalMoveModule[]\n // Get the structs that represent Events\n abstract getEventStructs(module: InternalMoveModule): Map<string, InternalMoveStruct>\n // Get the parameters that actually have arguments in runtime\n // Aptos first signer and Sui's last TxContext are no use\n abstract getMeaningfulFunctionParams(params: TypeDescriptor[]): TypeDescriptor[]\n\n readModulesFile(fullPath: string) {\n return JSON.parse(fs.readFileSync(fullPath, 'utf-8'))\n }\n\n async generate(srcDir: string, outputDir: string): Promise<number> {\n const num1 = await this.generateForNetwork(srcDir, outputDir, this.MAIN_NET)\n const num2 = await this.generateForNetwork(\n path.join(srcDir, 'testnet'),\n path.join(outputDir, 'testnet'),\n this.TEST_NET\n )\n return num1 + num2\n }\n\n async generateForNetwork(srcDir: string, outputDir: string, network: NetworkType) {\n if (!fs.existsSync(srcDir)) {\n return 0\n }\n\n const files = fs.readdirSync(srcDir)\n outputDir = path.resolve(outputDir)\n const outputs: OutputFile[] = []\n\n fs.mkdirSync(outputDir, { recursive: true })\n\n const loader = new AccountRegister()\n\n // when generating user code, don't need to generate framework account\n loader.accountImports.set('0x1', new AccountModulesImportInfo('0x1', '0x1'))\n loader.accountImports.set('0x2', new AccountModulesImportInfo('0x2', '0x2'))\n loader.accountImports.set('0x3', new AccountModulesImportInfo('0x3', '0x3'))\n // const client = getRpcClient(network)\n\n for (const file of files) {\n if (!file.endsWith('.json')) {\n continue\n }\n const fullPath = path.resolve(srcDir, file)\n const abi = this.readModulesFile(fullPath)\n const modules = this.toInternalModules(abi)\n\n for (const module of modules) {\n loader.register(module, path.basename(file, '.json'))\n }\n const codeGen = new AccountCodegen(this, loader, abi, modules, {\n fileName: path.basename(file, '.json'),\n outputDir: outputDir,\n network,\n })\n\n outputs.push(...codeGen.generate())\n }\n\n while (loader.pendingAccounts.size > 0) {\n for (const account of loader.pendingAccounts) {\n console.log(`download dependent module for account ${account} at ${network}`)\n\n try {\n const rawModules = await this.fetchModules(account, network)\n const modules = this.toInternalModules(rawModules)\n\n fs.writeFileSync(path.resolve(srcDir, account + '.json'), JSON.stringify(rawModules, null, '\\t'))\n for (const module of modules) {\n loader.register(module, account)\n }\n const codeGen = new AccountCodegen(this, loader, rawModules, modules, {\n fileName: account,\n outputDir: outputDir,\n network,\n })\n\n outputs.push(...codeGen.generate())\n } catch (e) {\n console.error(\n chalk.red(\n 'Error downloading account module, check if you choose the right network,or download account modules manually into your director'\n )\n )\n console.error(e)\n process.exit(1)\n }\n }\n }\n\n for (const output of outputs) {\n // const content = output.fileContent\n const content = format(output.fileContent, { parser: 'typescript' })\n fs.writeFileSync(path.join(outputDir, output.fileName), content)\n }\n\n const rootFile = path.join(outputDir, 'index.ts')\n fs.writeFileSync(\n rootFile,\n `/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n`\n )\n for (const output of outputs) {\n const parsed = path.parse(output.fileName)\n const content = `export * as _${parsed.name.replaceAll('-', '_')} from './${parsed.name}.js'\\n`\n fs.appendFileSync(rootFile, content)\n }\n return outputs.length + 1\n }\n\n generateNetworkOption(network: NetworkType) {\n switch (network) {\n case this.TEST_NET:\n return 'TEST_NET'\n }\n return 'MAIN_NET'\n }\n\n generateModule(module: InternalMoveModule, network: NetworkType) {\n const functions = this.GENERATE_ON_ENTRY\n ? module.exposedFunctions.map((f) => this.generateOnEntryFunctions(module, f)).filter((s) => s !== '')\n : []\n const clientFunctions = this.GENERATE_CLIENT\n ? module.exposedFunctions.map((f) => this.generateClientFunctions(module, f)).filter((s) => s !== '')\n : []\n const eventStructs = this.getEventStructs(module)\n const eventTypes = new Set(eventStructs.keys())\n const events = Array.from(eventStructs.values())\n .map((e) => this.generateOnEvents(module, e))\n .filter((s) => s !== '')\n const structs = module.structs.map((s) => this.generateStructs(module, s, eventTypes))\n const callArgs = module.exposedFunctions.map((f) => this.generateCallArgsStructs(module, f))\n\n const moduleName = normalizeToJSName(module.name)\n let processor = ''\n let client = ''\n\n if (clientFunctions.length > 0) {\n client = `\n export class ${moduleName}_client extends ModuleClient {\n ${clientFunctions.join('\\n')}\n }\n `\n }\n\n if (functions.length > 0 || events.length > 0) {\n processor = `export class ${moduleName} extends ${this.PREFIX}BaseProcessor {\n\n constructor(options: ${this.PREFIX}BindOptions) {\n super(\"${module.name}\", options)\n }\n static DEFAULT_OPTIONS: ${this.PREFIX}BindOptions = {\n address: \"${module.address}\",\n network: ${this.PREFIX}Network.${this.generateNetworkOption(network)}\n }\n\n static bind(options: Partial<${this.PREFIX}BindOptions> = {}): ${moduleName} {\n return new ${moduleName}({ ...${moduleName}.DEFAULT_OPTIONS, ...options })\n }\n\n ${functions.join('\\n')}\n\n ${events.join('\\n')}\n }\n `\n }\n\n return `\n ${client}\n\n ${processor}\n\n export namespace ${moduleName} {\n ${structs.join('\\n')}\n\n ${callArgs.join('\\n')}\n }\n `\n }\n\n generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>) {\n const genericString = this.generateStructTypeParameters(struct)\n const genericStringAny = this.generateStructTypeParameters(struct, true)\n\n const structName = normalizeToJSName(struct.name)\n\n const fields = struct.fields.map((field) => {\n const type = this.generateTypeForDescriptor(field.type, module.address)\n return `${field.name}: ${type}`\n })\n\n let eventPayload = ''\n if (events.has(moduleQname(module) + SPLITTER + struct.name)) {\n eventPayload = `\n export interface ${structName}Instance extends\n TypedEventInstance<${structName}${genericStringAny}> {\n ${this.STRUCT_FIELD_NAME}_decoded: ${structName}${genericStringAny}\n type_arguments: [${struct.typeParams.map((_) => 'string').join(', ')}]\n }\n `\n }\n\n return `\n export class ${structName}${genericString} {\n static TYPE_QNAME = '${module.address}::${module.name}::${struct.name}'\n ${fields.join('\\n')}\n }\n\n ${eventPayload}\n `\n }\n\n generateFunctionTypeParameters(func: InternalMoveFunction) {\n let genericString = ''\n if (func.typeParams && func.typeParams.length > 0) {\n const params = func.typeParams\n .map((v, idx) => {\n return `T${idx}=any`\n })\n .join(',')\n genericString = `<${params}>`\n }\n return genericString\n }\n\n generateStructTypeParameters(struct: InternalMoveStruct, useAny = false) {\n let genericString = ''\n\n if (struct.typeParams && struct.typeParams.length > 0) {\n const params = struct.typeParams\n .map((v, idx) => {\n return useAny ? 'any' : 'T' + idx\n })\n .join(',')\n genericString = `<${params}>`\n }\n return genericString\n }\n\n generateCallArgsStructs(module: InternalMoveModule, func: InternalMoveFunction) {\n if (!func.isEntry) {\n return\n }\n\n const fields = this.getMeaningfulFunctionParams(func.params).map((param) => {\n return this.generateTypeForDescriptor(param, module.address) + (this.PAYLOAD_OPTIONAL ? ' | undefined' : '')\n })\n\n const camelFuncName = upperFirst(camelCase(func.name))\n\n const genericString = this.generateFunctionTypeParameters(func)\n return `\n export interface ${camelFuncName}Payload${genericString}\n extends TypedFunctionPayload<[${fields.join(',')}]> {\n arguments_decoded: [${fields.join(',')}],\n type_arguments: [${func.typeParams.map((_) => 'string').join(', ')}]\n }\n `\n }\n\n generateClientFunctions(module: InternalMoveModule, func: InternalMoveFunction) {\n if (func.visibility === InternalMoveFunctionVisibility.PRIVATE) {\n return ''\n }\n if (func.isEntry) {\n return ''\n }\n // const moduleName = normalizeToJSName(module.name)\n const funcName = camelCase(func.name)\n const fields = this.getMeaningfulFunctionParams(func.params).map((param) => {\n return this.generateTypeForDescriptor(param, module.address)\n })\n const genericString = this.generateFunctionTypeParameters(func)\n\n const returns = func.return.map((param) => {\n return this.generateTypeForDescriptor(param, module.address)\n })\n\n const source = `\n ${funcName}${genericString}(type_arguments: [${func.typeParams\n .map((_) => 'string')\n .join(', ')}], args: [${fields.join(',')}], version?: bigint): Promise<[${returns.join(',')}]> {\n return this.viewDecoded('${module.address}::${module.name}::${func.name}', type_arguments, args, version) as any\n }`\n return source\n }\n\n generateOnEntryFunctions(module: InternalMoveModule, func: InternalMoveFunction) {\n if (!func.isEntry) {\n return ''\n }\n\n // const genericString = generateFunctionTypeParameters(func)\n const moduleName = normalizeToJSName(module.name)\n\n const camelFuncName = upperFirst(camelCase(func.name))\n const source = `\n onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: ${this.PREFIX}Context) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): ${moduleName} {\n this.onEntryFunctionCall(func, {\n ...filter,\n function: '${module.name}::${func.name}'\n },\n fetchConfig)\n return this\n }`\n\n return source\n }\n\n generateOnEvents(module: InternalMoveModule, struct: InternalMoveStruct): string {\n // for struct that has drop + store\n // if (!isEvent(struct, module)) {\n // return ''\n // }\n\n // const genericString = generateStructTypeParameters(struct)\n\n const moduleName = normalizeToJSName(module.name)\n const source = `\n onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: ${\n this.PREFIX\n }Context) => void, fetchConfig?: MoveFetchConfig): ${moduleName} {\n this.onMoveEvent(func, {\n type: '${module.name}::${struct.name}'\n },\n fetchConfig)\n return this\n }\n `\n return source\n }\n\n generateTypeForDescriptor(type: TypeDescriptor, currentAddress: string): string {\n if (type.reference) {\n return this.ADDRESS_TYPE\n }\n\n switch (type.qname) {\n case 'signer': // TODO check this\n case 'address':\n case 'Address':\n return this.ADDRESS_TYPE\n case '0x1::string::String':\n return 'string'\n case 'bool':\n case 'Bool':\n return 'Boolean'\n case 'u8':\n case 'U8':\n case 'u16':\n case 'U16':\n case 'u32':\n case 'U32':\n return 'number'\n case 'u64':\n case 'U64':\n case 'u128':\n case 'U128':\n case 'u256':\n case 'U256':\n return 'bigint'\n }\n\n if (type.qname.toLowerCase() === VECTOR_STR) {\n // vector<u8> as hex string\n const elementTypeQname = type.typeArgs[0].qname\n if (elementTypeQname === 'u8') {\n // only for aptos\n return 'string'\n }\n if (elementTypeQname.startsWith('T') && !elementTypeQname.includes(SPLITTER)) {\n return `${elementTypeQname}[] | string`\n }\n return this.generateTypeForDescriptor(type.typeArgs[0], currentAddress) + '[]'\n }\n\n const simpleName = this.generateSimpleType(type.qname, currentAddress)\n if (simpleName.length === 0) {\n console.error('unexpected error')\n }\n if (simpleName.toLowerCase() === VECTOR_STR || simpleName.toLowerCase().startsWith(VECTOR_STR + SPLITTER)) {\n console.error('unexpected vector type error')\n }\n if (type.typeArgs.length > 0) {\n // return simpleName\n return (\n simpleName + '<' + type.typeArgs.map((t) => this.generateTypeForDescriptor(t, currentAddress)).join(',') + '>'\n )\n }\n return simpleName\n }\n\n generateSimpleType(type: string, currentAddress: string): string {\n const parts = type.split(SPLITTER)\n\n for (let i = 0; i < parts.length; i++) {\n parts[i] = normalizeToJSName(parts[i])\n }\n\n if (parts.length < 2) {\n return parts[0]\n }\n if (parts[0] === currentAddress) {\n return parts.slice(1).join('.')\n }\n return '_' + parts.join('.')\n }\n}\n\nexport class AccountCodegen<ModuleType, NetworkType> {\n modules: InternalMoveModule[]\n config: Config<NetworkType>\n abi: ModuleType\n loader: AccountRegister\n moduleGen: AbstractCodegen<ModuleType, NetworkType>\n\n constructor(\n moduleGen: AbstractCodegen<ModuleType, NetworkType>,\n loader: AccountRegister,\n abi: ModuleType,\n modules: InternalMoveModule[],\n config: Config<NetworkType>\n ) {\n // const json = fs.readFileSync(config.srcFile, 'utf-8')\n this.moduleGen = moduleGen\n this.abi = abi\n this.modules = modules\n this.config = config\n this.loader = loader\n }\n\n generate(): OutputFile[] {\n if (!this.modules) {\n return []\n }\n // const baseName = path.basename(this.config.fileName, '.json')\n\n let address: string | undefined\n for (const module of this.modules) {\n address = module.address\n }\n if (!address) {\n return []\n }\n\n const imports = `\n import { CallFilter } from \"@sentio/sdk/move\"\n import {\n MoveCoder, defaultMoveCoder, ${this.moduleGen.PREFIX}BindOptions, ${this.moduleGen.PREFIX}BaseProcessor,\n TypedEventInstance, ${this.moduleGen.PREFIX}Network, TypedFunctionPayload,\n ${this.moduleGen.PREFIX}Context } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}\"\n import { MoveFetchConfig } from \"@sentio/protos\"\n import { ${this.moduleGen.ADDRESS_TYPE}, ModuleClient } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}\"\n `\n\n const dependedAccounts: string[] = []\n\n const moduleImports: string[] = []\n\n const info = this.loader.accountImports.get(address)\n\n if (info) {\n for (const [account] of info.imports.entries()) {\n // Remap to user's filename if possible, TODO codepath not well tested\n const tsAccountModule = './' + (this.loader.accountImports.get(account)?.moduleName || account)\n if (isFrameworkAccount(account) && !isFrameworkAccount(address)) {\n // Decide where to find runtime library\n moduleImports.push(`import { _${account} } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}/builtin\"`)\n } else {\n moduleImports.push(`import * as _${account} from \"${tsAccountModule}.js\"`)\n }\n\n dependedAccounts.push(account)\n }\n }\n\n const source = `\n /* Autogenerated file. Do not edit manually. */\n /* tslint:disable */\n /* eslint-disable */\n\n /* Generated modules for account ${address} */\n\n ${imports}\n\n ${moduleImports.join('\\n')}\n\n ${this.modules.map((m) => this.moduleGen.generateModule(m, this.config.network)).join('\\n')}\n\n const MODULES = JSON.parse('${JSON.stringify(this.abi)}')\n\n export function loadAllTypes(coder: MoveCoder) {\n ${dependedAccounts.map((a) => `_${a}.loadAllTypes(coder)`).join('\\n')}\n for (const m of Object.values(MODULES)) {\n coder.load(m as any)\n }\n }\n\n loadAllTypes(defaultMoveCoder())\n ` // source\n\n return [\n {\n fileName: this.config.fileName + '.ts',\n fileContent: source,\n },\n ]\n }\n}\n"]}
1
+ {"version":3,"file":"abstract-codegen.js","sourceRoot":"","sources":["../../src/move/abstract-codegen.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,GAG/B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACxE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACrG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAcjD,MAAM,OAAgB,eAAe;IACnC,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,CAAC,CAAA;aAC/B;SACF;QAED,MAAM,MAAM,GAAG;;;;;uCAKoB,OAAO;;MAExC,OAAO;;MAEP,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;MAExB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;kCAE7D,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;;;QAGlD,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;KAOtE,CAAA,CAAC,SAAS;QAEX,OAAO;YACL;gBACE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,KAAK;gBACtC,WAAW,EAAE,MAAM;aACpB;SACF,CAAA;IACH,CAAC;CACF","sourcesContent":["import {\n InternalMoveFunction,\n InternalMoveFunctionVisibility,\n InternalMoveModule,\n InternalMoveStruct,\n} from './internal-models.js'\nimport path from 'path'\nimport fs from 'fs'\nimport { AccountModulesImportInfo, AccountRegister } from './account.js'\nimport chalk from 'chalk'\nimport { format } from 'prettier'\nimport { isFrameworkAccount, moduleQname, normalizeToJSName, SPLITTER, VECTOR_STR } from './utils.js'\nimport { camelCase, upperFirst } from 'lodash-es'\nimport { TypeDescriptor } from './types.js'\n\ninterface OutputFile {\n fileName: string\n fileContent: string\n}\n\ninterface Config<NetworkType> {\n fileName: string\n outputDir: string\n network: NetworkType\n}\n\nexport abstract class AbstractCodegen<ModuleTypes, NetworkType> {\n TEST_NET: NetworkType\n MAIN_NET: NetworkType\n ADDRESS_TYPE: string\n PREFIX: string\n STRUCT_FIELD_NAME: string = 'data'\n GENERATE_CLIENT = false\n GENERATE_ON_ENTRY = true\n PAYLOAD_OPTIONAL = false\n\n abstract fetchModules(account: string, network: NetworkType): Promise<ModuleTypes>\n abstract toInternalModules(modules: ModuleTypes): InternalMoveModule[]\n // Get the structs that represent Events\n abstract getEventStructs(module: InternalMoveModule): Map<string, InternalMoveStruct>\n // Get the parameters that actually have arguments in runtime\n // Aptos first signer and Sui's last TxContext are no use\n abstract getMeaningfulFunctionParams(params: TypeDescriptor[]): TypeDescriptor[]\n\n readModulesFile(fullPath: string) {\n return JSON.parse(fs.readFileSync(fullPath, 'utf-8'))\n }\n\n async generate(srcDir: string, outputDir: string): Promise<number> {\n const num1 = await this.generateForNetwork(srcDir, outputDir, this.MAIN_NET)\n const num2 = await this.generateForNetwork(\n path.join(srcDir, 'testnet'),\n path.join(outputDir, 'testnet'),\n this.TEST_NET\n )\n return num1 + num2\n }\n\n async generateForNetwork(srcDir: string, outputDir: string, network: NetworkType) {\n if (!fs.existsSync(srcDir)) {\n return 0\n }\n\n const files = fs.readdirSync(srcDir)\n outputDir = path.resolve(outputDir)\n const outputs: OutputFile[] = []\n\n fs.mkdirSync(outputDir, { recursive: true })\n\n const loader = new AccountRegister()\n\n // when generating user code, don't need to generate framework account\n loader.accountImports.set('0x1', new AccountModulesImportInfo('0x1', '0x1'))\n loader.accountImports.set('0x2', new AccountModulesImportInfo('0x2', '0x2'))\n loader.accountImports.set('0x3', new AccountModulesImportInfo('0x3', '0x3'))\n // const client = getRpcClient(network)\n\n for (const file of files) {\n if (!file.endsWith('.json')) {\n continue\n }\n const fullPath = path.resolve(srcDir, file)\n const abi = this.readModulesFile(fullPath)\n const modules = this.toInternalModules(abi)\n\n for (const module of modules) {\n loader.register(module, path.basename(file, '.json'))\n }\n const codeGen = new AccountCodegen(this, loader, abi, modules, {\n fileName: path.basename(file, '.json'),\n outputDir: outputDir,\n network,\n })\n\n outputs.push(...codeGen.generate())\n }\n\n while (loader.pendingAccounts.size > 0) {\n for (const account of loader.pendingAccounts) {\n console.log(`download dependent module for account ${account} at ${network}`)\n\n try {\n const rawModules = await this.fetchModules(account, network)\n const modules = this.toInternalModules(rawModules)\n\n fs.writeFileSync(path.resolve(srcDir, account + '.json'), JSON.stringify(rawModules, null, '\\t'))\n for (const module of modules) {\n loader.register(module, account)\n }\n const codeGen = new AccountCodegen(this, loader, rawModules, modules, {\n fileName: account,\n outputDir: outputDir,\n network,\n })\n\n outputs.push(...codeGen.generate())\n } catch (e) {\n console.error(\n chalk.red(\n 'Error downloading account module, check if you choose the right network,or download account modules manually into your director'\n )\n )\n console.error(e)\n process.exit(1)\n }\n }\n }\n\n for (const output of outputs) {\n // const content = output.fileContent\n const content = format(output.fileContent, { parser: 'typescript' })\n fs.writeFileSync(path.join(outputDir, output.fileName), content)\n }\n\n const rootFile = path.join(outputDir, 'index.ts')\n fs.writeFileSync(\n rootFile,\n `/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n`\n )\n for (const output of outputs) {\n const parsed = path.parse(output.fileName)\n const content = `export * as _${parsed.name.replaceAll('-', '_')} from './${parsed.name}.js'\\n`\n fs.appendFileSync(rootFile, content)\n }\n return outputs.length + 1\n }\n\n generateNetworkOption(network: NetworkType) {\n switch (network) {\n case this.TEST_NET:\n return 'TEST_NET'\n }\n return 'MAIN_NET'\n }\n\n generateModule(module: InternalMoveModule, network: NetworkType) {\n const functions = this.GENERATE_ON_ENTRY\n ? module.exposedFunctions.map((f) => this.generateOnEntryFunctions(module, f)).filter((s) => s !== '')\n : []\n const clientFunctions = this.GENERATE_CLIENT\n ? module.exposedFunctions.map((f) => this.generateClientFunctions(module, f)).filter((s) => s !== '')\n : []\n const eventStructs = this.getEventStructs(module)\n const eventTypes = new Set(eventStructs.keys())\n const events = Array.from(eventStructs.values())\n .map((e) => this.generateOnEvents(module, e))\n .filter((s) => s !== '')\n const structs = module.structs.map((s) => this.generateStructs(module, s, eventTypes))\n const callArgs = module.exposedFunctions.map((f) => this.generateCallArgsStructs(module, f))\n\n const moduleName = normalizeToJSName(module.name)\n let processor = ''\n let client = ''\n\n if (clientFunctions.length > 0) {\n client = `\n export class ${moduleName}_client extends ModuleClient {\n ${clientFunctions.join('\\n')}\n }\n `\n }\n\n if (functions.length > 0 || events.length > 0) {\n processor = `export class ${moduleName} extends ${this.PREFIX}BaseProcessor {\n\n constructor(options: ${this.PREFIX}BindOptions) {\n super(\"${module.name}\", options)\n }\n static DEFAULT_OPTIONS: ${this.PREFIX}BindOptions = {\n address: \"${module.address}\",\n network: ${this.PREFIX}Network.${this.generateNetworkOption(network)}\n }\n\n static bind(options: Partial<${this.PREFIX}BindOptions> = {}): ${moduleName} {\n return new ${moduleName}({ ...${moduleName}.DEFAULT_OPTIONS, ...options })\n }\n\n ${functions.join('\\n')}\n\n ${events.join('\\n')}\n }\n `\n }\n\n return `\n ${client}\n\n ${processor}\n\n export namespace ${moduleName} {\n ${structs.join('\\n')}\n\n ${callArgs.join('\\n')}\n }\n `\n }\n\n generateStructs(module: InternalMoveModule, struct: InternalMoveStruct, events: Set<string>) {\n const genericString = this.generateStructTypeParameters(struct)\n const genericStringAny = this.generateStructTypeParameters(struct, true)\n\n const structName = normalizeToJSName(struct.name)\n\n const fields = struct.fields.map((field) => {\n const type = this.generateTypeForDescriptor(field.type, module.address)\n return `${field.name}: ${type}`\n })\n\n let eventPayload = ''\n if (events.has(moduleQname(module) + SPLITTER + struct.name)) {\n eventPayload = `\n export interface ${structName}Instance extends\n TypedEventInstance<${structName}${genericStringAny}> {\n ${this.STRUCT_FIELD_NAME}_decoded: ${structName}${genericStringAny}\n type_arguments: [${struct.typeParams.map((_) => 'string').join(', ')}]\n }\n `\n }\n\n return `\n export class ${structName}${genericString} {\n static TYPE_QNAME = '${module.address}::${module.name}::${struct.name}'\n ${fields.join('\\n')}\n }\n\n ${eventPayload}\n `\n }\n\n generateFunctionTypeParameters(func: InternalMoveFunction) {\n let genericString = ''\n if (func.typeParams && func.typeParams.length > 0) {\n const params = func.typeParams\n .map((v, idx) => {\n return `T${idx}=any`\n })\n .join(',')\n genericString = `<${params}>`\n }\n return genericString\n }\n\n generateStructTypeParameters(struct: InternalMoveStruct, useAny = false) {\n let genericString = ''\n\n if (struct.typeParams && struct.typeParams.length > 0) {\n const params = struct.typeParams\n .map((v, idx) => {\n return useAny ? 'any' : 'T' + idx\n })\n .join(',')\n genericString = `<${params}>`\n }\n return genericString\n }\n\n generateCallArgsStructs(module: InternalMoveModule, func: InternalMoveFunction) {\n if (!func.isEntry) {\n return\n }\n\n const fields = this.getMeaningfulFunctionParams(func.params).map((param) => {\n return this.generateTypeForDescriptor(param, module.address) + (this.PAYLOAD_OPTIONAL ? ' | undefined' : '')\n })\n\n const camelFuncName = upperFirst(camelCase(func.name))\n\n const genericString = this.generateFunctionTypeParameters(func)\n return `\n export interface ${camelFuncName}Payload${genericString}\n extends TypedFunctionPayload<[${fields.join(',')}]> {\n arguments_decoded: [${fields.join(',')}],\n type_arguments: [${func.typeParams.map((_) => 'string').join(', ')}]\n }\n `\n }\n\n generateClientFunctions(module: InternalMoveModule, func: InternalMoveFunction) {\n if (func.visibility === InternalMoveFunctionVisibility.PRIVATE) {\n return ''\n }\n if (func.isEntry) {\n return ''\n }\n // const moduleName = normalizeToJSName(module.name)\n const funcName = camelCase(func.name)\n const fields = this.getMeaningfulFunctionParams(func.params).map((param) => {\n return this.generateTypeForDescriptor(param, module.address)\n })\n const genericString = this.generateFunctionTypeParameters(func)\n\n const returns = func.return.map((param) => {\n return this.generateTypeForDescriptor(param, module.address)\n })\n\n const source = `\n ${funcName}${genericString}(type_arguments: [${func.typeParams\n .map((_) => 'string')\n .join(', ')}], args: [${fields.join(',')}], version?: bigint): Promise<[${returns.join(',')}]> {\n return this.viewDecoded('${module.address}::${module.name}::${func.name}', type_arguments, args, version) as any\n }`\n return source\n }\n\n generateOnEntryFunctions(module: InternalMoveModule, func: InternalMoveFunction) {\n if (!func.isEntry) {\n return ''\n }\n\n // const genericString = generateFunctionTypeParameters(func)\n const moduleName = normalizeToJSName(module.name)\n\n const camelFuncName = upperFirst(camelCase(func.name))\n const source = `\n onEntry${camelFuncName}(func: (call: ${moduleName}.${camelFuncName}Payload, ctx: ${this.PREFIX}Context) => void, filter?: CallFilter, fetchConfig?: Partial<MoveFetchConfig>): ${moduleName} {\n this.onEntryFunctionCall(func, {\n ...filter,\n function: '${module.name}::${func.name}'\n },\n fetchConfig)\n return this\n }`\n\n return source\n }\n\n generateOnEvents(module: InternalMoveModule, struct: InternalMoveStruct): string {\n // for struct that has drop + store\n // if (!isEvent(struct, module)) {\n // return ''\n // }\n\n // const genericString = generateStructTypeParameters(struct)\n\n const moduleName = normalizeToJSName(module.name)\n const source = `\n onEvent${struct.name}(func: (event: ${moduleName}.${normalizeToJSName(struct.name)}Instance, ctx: ${\n this.PREFIX\n }Context) => void, fetchConfig?: Partial<MoveFetchConfig>): ${moduleName} {\n this.onMoveEvent(func, {\n type: '${module.name}::${struct.name}'\n },\n fetchConfig)\n return this\n }\n `\n return source\n }\n\n generateTypeForDescriptor(type: TypeDescriptor, currentAddress: string): string {\n if (type.reference) {\n return this.ADDRESS_TYPE\n }\n\n switch (type.qname) {\n case 'signer': // TODO check this\n case 'address':\n case 'Address':\n return this.ADDRESS_TYPE\n case '0x1::string::String':\n return 'string'\n case 'bool':\n case 'Bool':\n return 'Boolean'\n case 'u8':\n case 'U8':\n case 'u16':\n case 'U16':\n case 'u32':\n case 'U32':\n return 'number'\n case 'u64':\n case 'U64':\n case 'u128':\n case 'U128':\n case 'u256':\n case 'U256':\n return 'bigint'\n }\n\n if (type.qname.toLowerCase() === VECTOR_STR) {\n // vector<u8> as hex string\n const elementTypeQname = type.typeArgs[0].qname\n if (elementTypeQname === 'u8') {\n // only for aptos\n return 'string'\n }\n if (elementTypeQname.startsWith('T') && !elementTypeQname.includes(SPLITTER)) {\n return `${elementTypeQname}[] | string`\n }\n return this.generateTypeForDescriptor(type.typeArgs[0], currentAddress) + '[]'\n }\n\n const simpleName = this.generateSimpleType(type.qname, currentAddress)\n if (simpleName.length === 0) {\n console.error('unexpected error')\n }\n if (simpleName.toLowerCase() === VECTOR_STR || simpleName.toLowerCase().startsWith(VECTOR_STR + SPLITTER)) {\n console.error('unexpected vector type error')\n }\n if (type.typeArgs.length > 0) {\n // return simpleName\n return (\n simpleName + '<' + type.typeArgs.map((t) => this.generateTypeForDescriptor(t, currentAddress)).join(',') + '>'\n )\n }\n return simpleName\n }\n\n generateSimpleType(type: string, currentAddress: string): string {\n const parts = type.split(SPLITTER)\n\n for (let i = 0; i < parts.length; i++) {\n parts[i] = normalizeToJSName(parts[i])\n }\n\n if (parts.length < 2) {\n return parts[0]\n }\n if (parts[0] === currentAddress) {\n return parts.slice(1).join('.')\n }\n return '_' + parts.join('.')\n }\n}\n\nexport class AccountCodegen<ModuleType, NetworkType> {\n modules: InternalMoveModule[]\n config: Config<NetworkType>\n abi: ModuleType\n loader: AccountRegister\n moduleGen: AbstractCodegen<ModuleType, NetworkType>\n\n constructor(\n moduleGen: AbstractCodegen<ModuleType, NetworkType>,\n loader: AccountRegister,\n abi: ModuleType,\n modules: InternalMoveModule[],\n config: Config<NetworkType>\n ) {\n // const json = fs.readFileSync(config.srcFile, 'utf-8')\n this.moduleGen = moduleGen\n this.abi = abi\n this.modules = modules\n this.config = config\n this.loader = loader\n }\n\n generate(): OutputFile[] {\n if (!this.modules) {\n return []\n }\n // const baseName = path.basename(this.config.fileName, '.json')\n\n let address: string | undefined\n for (const module of this.modules) {\n address = module.address\n }\n if (!address) {\n return []\n }\n\n const imports = `\n import { CallFilter } from \"@sentio/sdk/move\"\n import {\n MoveCoder, defaultMoveCoder, ${this.moduleGen.PREFIX}BindOptions, ${this.moduleGen.PREFIX}BaseProcessor,\n TypedEventInstance, ${this.moduleGen.PREFIX}Network, TypedFunctionPayload,\n ${this.moduleGen.PREFIX}Context } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}\"\n import { MoveFetchConfig } from \"@sentio/protos\"\n import { ${this.moduleGen.ADDRESS_TYPE}, ModuleClient } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}\"\n `\n\n const dependedAccounts: string[] = []\n\n const moduleImports: string[] = []\n\n const info = this.loader.accountImports.get(address)\n\n if (info) {\n for (const [account] of info.imports.entries()) {\n // Remap to user's filename if possible, TODO codepath not well tested\n const tsAccountModule = './' + (this.loader.accountImports.get(account)?.moduleName || account)\n if (isFrameworkAccount(account) && !isFrameworkAccount(address)) {\n // Decide where to find runtime library\n moduleImports.push(`import { _${account} } from \"@sentio/sdk/${this.moduleGen.PREFIX.toLowerCase()}/builtin\"`)\n } else {\n moduleImports.push(`import * as _${account} from \"${tsAccountModule}.js\"`)\n }\n\n dependedAccounts.push(account)\n }\n }\n\n const source = `\n /* Autogenerated file. Do not edit manually. */\n /* tslint:disable */\n /* eslint-disable */\n\n /* Generated modules for account ${address} */\n\n ${imports}\n\n ${moduleImports.join('\\n')}\n\n ${this.modules.map((m) => this.moduleGen.generateModule(m, this.config.network)).join('\\n')}\n\n const MODULES = JSON.parse('${JSON.stringify(this.abi)}')\n\n export function loadAllTypes(coder: MoveCoder) {\n ${dependedAccounts.map((a) => `_${a}.loadAllTypes(coder)`).join('\\n')}\n for (const m of Object.values(MODULES)) {\n coder.load(m as any)\n }\n }\n\n loadAllTypes(defaultMoveCoder())\n ` // source\n\n return [\n {\n fileName: this.config.fileName + '.ts',\n fileContent: source,\n },\n ]\n }\n}\n"]}
@@ -5,8 +5,8 @@ export declare class ascii extends SuiBaseProcessor {
5
5
  constructor(options: SuiBindOptions);
6
6
  static DEFAULT_OPTIONS: SuiBindOptions;
7
7
  static bind(options?: Partial<SuiBindOptions>): ascii;
8
- onEventChar(func: (event: ascii.CharInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): ascii;
9
- onEventString(func: (event: ascii.StringInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): ascii;
8
+ onEventChar(func: (event: ascii.CharInstance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): ascii;
9
+ onEventString(func: (event: ascii.StringInstance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): ascii;
10
10
  }
11
11
  export declare namespace ascii {
12
12
  class Char {
@@ -31,7 +31,7 @@ export declare class bit_vector extends SuiBaseProcessor {
31
31
  constructor(options: SuiBindOptions);
32
32
  static DEFAULT_OPTIONS: SuiBindOptions;
33
33
  static bind(options?: Partial<SuiBindOptions>): bit_vector;
34
- onEventBitVector(func: (event: bit_vector.BitVectorInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): bit_vector;
34
+ onEventBitVector(func: (event: bit_vector.BitVectorInstance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): bit_vector;
35
35
  }
36
36
  export declare namespace bit_vector {
37
37
  class BitVector {
@@ -49,7 +49,7 @@ export declare class fixed_point32 extends SuiBaseProcessor {
49
49
  constructor(options: SuiBindOptions);
50
50
  static DEFAULT_OPTIONS: SuiBindOptions;
51
51
  static bind(options?: Partial<SuiBindOptions>): fixed_point32;
52
- onEventFixedPoint32(func: (event: fixed_point32.FixedPoint32Instance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): fixed_point32;
52
+ onEventFixedPoint32(func: (event: fixed_point32.FixedPoint32Instance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): fixed_point32;
53
53
  }
54
54
  export declare namespace fixed_point32 {
55
55
  class FixedPoint32 {
@@ -69,7 +69,7 @@ export declare class string_ extends SuiBaseProcessor {
69
69
  constructor(options: SuiBindOptions);
70
70
  static DEFAULT_OPTIONS: SuiBindOptions;
71
71
  static bind(options?: Partial<SuiBindOptions>): string_;
72
- onEventString(func: (event: string_.StringInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): string_;
72
+ onEventString(func: (event: string_.StringInstance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): string_;
73
73
  }
74
74
  export declare namespace string_ {
75
75
  class String {
@@ -85,7 +85,7 @@ export declare class type_name extends SuiBaseProcessor {
85
85
  constructor(options: SuiBindOptions);
86
86
  static DEFAULT_OPTIONS: SuiBindOptions;
87
87
  static bind(options?: Partial<SuiBindOptions>): type_name;
88
- onEventTypeName(func: (event: type_name.TypeNameInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): type_name;
88
+ onEventTypeName(func: (event: type_name.TypeNameInstance, ctx: SuiContext) => void, fetchConfig?: Partial<MoveFetchConfig>): type_name;
89
89
  }
90
90
  export declare namespace type_name {
91
91
  class TypeName {
@@ -1 +1 @@
1
- {"version":3,"file":"0x1.js","sourceRoot":"","sources":["../../../src/sui/builtin/0x1.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAKpB,OAAO,EAEL,gBAAgB,EAEhB,gBAAgB,EAEhB,UAAU,GAGX,MAAM,iBAAiB,CAAC;AAMzB,MAAa,KAAM,SAAQ,gBAAgB;IACzC,YAAY,OAAuB;QACjC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,MAAM,CAAC,eAAe,GAAmB;QACvC,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,UAAU,CAAC,QAAQ;KAC7B,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,UAAmC,EAAE;QAC/C,OAAO,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,WAAW,CACT,IAA0D,EAC1D,WAA6B;QAE7B,IAAI,CAAC,WAAW,CACd,IAAI,EACJ;YACE,IAAI,EAAE,aAAa;SACpB,EACD,WAAW,CACZ,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CACX,IAA4D,EAC5D,WAA6B;QAE7B,IAAI,CAAC,WAAW,CACd,IAAI,EACJ;YACE,IAAI,EAAE,eAAe;SACtB,EACD,WAAW,CACZ,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CA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H,CAAC,EAVgB,OAAO,KAAP,OAAO,QAUvB;AAED,MAAa,SAAU,SAAQ,gBAAgB;IAC7C,YAAY,OAAuB;QACjC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,CAAC,eAAe,GAAmB;QACvC,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,UAAU,CAAC,QAAQ;KAC7B,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,UAAmC,EAAE;QAC/C,OAAO,IAAI,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,eAAe,CACb,IAAkE,EAClE,WAA6B;QAE7B,IAAI,CAAC,WAAW,CACd,IAAI,EACJ;YACE,IAAI,EAAE,qBAAqB;SAC5B,EACD,WAAW,CACZ,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;;SAzBU,SAAS;AA4BtB,WAAiB,SAAS;IACxB,MAAa,QAAQ;QACnB,MAAM,CAAC,UAAU,GAAG,0BAA0B,CAAC;QAC/C,IAAI,CAAe;;IAFR,kBAAQ,WAGpB,CAAA;AAMH,CAAC,EAVgB,SAAS,KAAT,SAAS,QAUzB;AAID,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CACxB,6lnBAA6lnB,CAC9lnB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACtC,KAAK,CAAC,IAAI,CAAC,CAAQ,CAAC,CAAC;KACtB;AACH,CAAC;AAED,YAAY,CAAC,gBAAgB,EAAE,CAAC,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\n/* Generated modules for account 0x1 */\n\nimport { CallFilter } from \"@sentio/sdk/move\";\nimport {\n MoveCoder,\n defaultMoveCoder,\n SuiBindOptions,\n SuiBaseProcessor,\n TypedEventInstance,\n SuiNetwork,\n TypedFunctionPayload,\n SuiContext,\n} from \"@sentio/sdk/sui\";\nimport { MoveFetchConfig } from \"@sentio/protos\";\nimport { SuiAddress, ModuleClient } from \"@sentio/sdk/sui\";\n\nexport namespace address {}\n\nexport class ascii extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"ascii\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): ascii {\n return new ascii({ ...ascii.DEFAULT_OPTIONS, ...options });\n }\n\n onEventChar(\n func: (event: ascii.CharInstance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): ascii {\n this.onMoveEvent(\n func,\n {\n type: \"ascii::Char\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventString(\n func: (event: ascii.StringInstance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): ascii {\n this.onMoveEvent(\n func,\n {\n type: \"ascii::String\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace ascii {\n export class Char {\n static TYPE_QNAME = \"0x1::ascii::Char\";\n byte: number;\n }\n\n export interface CharInstance extends TypedEventInstance<Char> {\n data_decoded: Char;\n type_arguments: [];\n }\n\n export class String {\n static TYPE_QNAME = \"0x1::ascii::String\";\n bytes: number[];\n }\n\n export interface StringInstance extends TypedEventInstance<String> {\n data_decoded: String;\n type_arguments: [];\n }\n}\n\nexport namespace bcs {}\n\nexport class bit_vector extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"bit_vector\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): bit_vector {\n return new bit_vector({ ...bit_vector.DEFAULT_OPTIONS, ...options });\n }\n\n onEventBitVector(\n func: (event: bit_vector.BitVectorInstance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): bit_vector {\n this.onMoveEvent(\n func,\n {\n type: \"bit_vector::BitVector\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace bit_vector {\n export class BitVector {\n static TYPE_QNAME = \"0x1::bit_vector::BitVector\";\n length: bigint;\n bit_field: Boolean[];\n }\n\n export interface BitVectorInstance extends TypedEventInstance<BitVector> {\n data_decoded: BitVector;\n type_arguments: [];\n }\n}\n\nexport namespace debug {}\n\nexport class fixed_point32 extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"fixed_point32\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): fixed_point32 {\n return new fixed_point32({ ...fixed_point32.DEFAULT_OPTIONS, ...options });\n }\n\n onEventFixedPoint32(\n func: (event: fixed_point32.FixedPoint32Instance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): fixed_point32 {\n this.onMoveEvent(\n func,\n {\n type: \"fixed_point32::FixedPoint32\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace fixed_point32 {\n export class FixedPoint32 {\n static TYPE_QNAME = \"0x1::fixed_point32::FixedPoint32\";\n value: bigint;\n }\n\n export interface FixedPoint32Instance\n extends TypedEventInstance<FixedPoint32> {\n data_decoded: FixedPoint32;\n type_arguments: [];\n }\n}\n\nexport namespace hash {}\n\nexport namespace option {\n export type Option<T> = T | undefined;\n}\n\nexport class string_ extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"string\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): string_ {\n return new string_({ ...string_.DEFAULT_OPTIONS, ...options });\n }\n\n onEventString(\n func: (event: string_.StringInstance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): string_ {\n this.onMoveEvent(\n func,\n {\n type: \"string::String\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace string_ {\n export class String {\n static TYPE_QNAME = \"0x1::string::String\";\n bytes: number[];\n }\n\n export interface StringInstance extends TypedEventInstance<String> {\n data_decoded: String;\n type_arguments: [];\n }\n}\n\nexport class type_name extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"type_name\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): type_name {\n return new type_name({ ...type_name.DEFAULT_OPTIONS, ...options });\n }\n\n onEventTypeName(\n func: (event: type_name.TypeNameInstance, ctx: SuiContext) => void,\n fetchConfig?: MoveFetchConfig\n ): type_name {\n this.onMoveEvent(\n func,\n {\n type: \"type_name::TypeName\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace type_name {\n export class TypeName {\n static TYPE_QNAME = \"0x1::type_name::TypeName\";\n name: ascii.String;\n }\n\n export interface TypeNameInstance extends TypedEventInstance<TypeName> {\n data_decoded: TypeName;\n type_arguments: [];\n }\n}\n\nexport namespace vector {}\n\nconst MODULES = JSON.parse(\n '{\"address\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"address\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[],\"return\":[\"U64\"]}}},\"ascii\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"ascii\",\"friends\":[],\"structs\":{\"Char\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"byte\",\"type\":\"U8\"}]},\"String\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"bytes\",\"type\":{\"Vector\":\"U8\"}}]}},\"exposedFunctions\":{\"all_characters_printable\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"Bool\"]},\"as_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Vector\":\"U8\"}}]},\"byte\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}],\"return\":[\"U8\"]},\"char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}]},\"into_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Vector\":\"U8\"}]},\"is_printable_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[\"Bool\"]},\"is_valid_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"pop_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}]},\"push_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}],\"return\":[]},\"string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"try_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]}}]}}},\"bcs\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"bcs\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"to_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"TypeParameter\":0}}],\"return\":[{\"Vector\":\"U8\"}]}}},\"bit_vector\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"bit_vector\",\"friends\":[],\"structs\":{\"BitVector\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"length\",\"type\":\"U64\"},{\"name\":\"bit_field\",\"type\":{\"Vector\":\"Bool\"}}]}},\"exposedFunctions\":{\"is_index_set\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"longest_set_sequence_starting_at\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[\"U64\"]},\"new\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}]},\"set\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]},\"shift_left\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]},\"unset\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]}}},\"debug\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"debug\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"print\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"TypeParameter\":0}}],\"return\":[]},\"print_stack_trace\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[],\"return\":[]}}},\"fixed_point32\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"fixed_point32\",\"friends\":[],\"structs\":{\"FixedPoint32\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"value\",\"type\":\"U64\"}]}},\"exposedFunctions\":{\"create_from_rational\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}]},\"create_from_raw_value\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}]},\"divide_u64\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]},\"get_raw_value\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]},\"is_zero\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"Bool\"]},\"multiply_u64\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]}}},\"hash\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"hash\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"sha2_256\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Vector\":\"U8\"}]},\"sha3_256\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Vector\":\"U8\"}]}}},\"option\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"option\",\"friends\":[],\"structs\":{\"Option\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[{\"constraints\":{\"abilities\":[]},\"isPhantom\":false}],\"fields\":[{\"name\":\"vec\",\"type\":{\"Vector\":{\"TypeParameter\":0}}}]}},\"exposedFunctions\":{\"borrow\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"borrow_mut\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"MutableReference\":{\"TypeParameter\":0}}]},\"borrow_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"contains\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\"]},\"destroy_none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[]},\"destroy_some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[{\"TypeParameter\":0}]},\"destroy_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[\"Drop\"]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"extract\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"TypeParameter\":0}]},\"fill\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[]},\"get_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[\"Copy\",\"Drop\"]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"is_none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[\"Bool\"]},\"is_some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[\"Bool\"]},\"none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"TypeParameter\":0}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"swap\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"swap_or_fill\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"to_vec\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]}}},\"string\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"string\",\"friends\":[],\"structs\":{\"String\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"bytes\",\"type\":{\"Vector\":\"U8\"}}]}},\"exposedFunctions\":{\"append\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[]},\"append_utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Vector\":\"U8\"}],\"return\":[]},\"bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Vector\":\"U8\"}}]},\"from_ascii\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]},\"index_of\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"insert\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[]},\"is_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"sub_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},\"U64\",\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]},\"to_ascii\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"try_utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]}}]},\"utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]}}},\"type_name\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"type_name\",\"friends\":[],\"structs\":{\"TypeName\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"name\",\"type\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}]}},\"exposedFunctions\":{\"borrow_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}]},\"get\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}]},\"get_address\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"get_module\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"into_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]}}},\"vector\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"vector\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"append\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Vector\":{\"TypeParameter\":0}}],\"return\":[]},\"borrow\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"borrow_mut\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"MutableReference\":{\"TypeParameter\":0}}]},\"contains\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\"]},\"destroy_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Vector\":{\"TypeParameter\":0}}],\"return\":[]},\"empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]},\"index_of\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\",\"U64\"]},\"insert\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"TypeParameter\":0},\"U64\"],\"return\":[]},\"is_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[\"U64\"]},\"pop_back\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[{\"TypeParameter\":0}]},\"push_back\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"TypeParameter\":0}],\"return\":[]},\"remove\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"TypeParameter\":0}]},\"reverse\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[]},\"singleton\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"TypeParameter\":0}],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]},\"swap\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\",\"U64\"],\"return\":[]},\"swap_remove\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"TypeParameter\":0}]}}}}'\n);\n\nexport function loadAllTypes(coder: MoveCoder) {\n for (const m of Object.values(MODULES)) {\n coder.load(m as any);\n }\n}\n\nloadAllTypes(defaultMoveCoder());\n"]}
1
+ {"version":3,"file":"0x1.js","sourceRoot":"","sources":["../../../src/sui/builtin/0x1.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AAKpB,OAAO,EAEL,gBAAgB,EAEhB,gBAAgB,EAEhB,UAAU,GAGX,MAAM,iBAAiB,CAAC;AAMzB,MAAa,KAAM,SAAQ,gBAAgB;IACzC,YAAY,OAAuB;QACjC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1B,CAAC;IACD,MAAM,CAAC,eAAe,GAAmB;QACvC,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,UAAU,CAAC,QAAQ;KAC7B,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,UAAmC,EAAE;QAC/C,OAAO,IAAI,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,eAAe,EAAE,GAA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AAY,CAAC,KAAgB;IAC3C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;QACtC,KAAK,CAAC,IAAI,CAAC,CAAQ,CAAC,CAAC;KACtB;AACH,CAAC;AAED,YAAY,CAAC,gBAAgB,EAAE,CAAC,CAAC","sourcesContent":["/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\n/* Generated modules for account 0x1 */\n\nimport { CallFilter } from \"@sentio/sdk/move\";\nimport {\n MoveCoder,\n defaultMoveCoder,\n SuiBindOptions,\n SuiBaseProcessor,\n TypedEventInstance,\n SuiNetwork,\n TypedFunctionPayload,\n SuiContext,\n} from \"@sentio/sdk/sui\";\nimport { MoveFetchConfig } from \"@sentio/protos\";\nimport { SuiAddress, ModuleClient } from \"@sentio/sdk/sui\";\n\nexport namespace address {}\n\nexport class ascii extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"ascii\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): ascii {\n return new ascii({ ...ascii.DEFAULT_OPTIONS, ...options });\n }\n\n onEventChar(\n func: (event: ascii.CharInstance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): ascii {\n this.onMoveEvent(\n func,\n {\n type: \"ascii::Char\",\n },\n fetchConfig\n );\n return this;\n }\n\n onEventString(\n func: (event: ascii.StringInstance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): ascii {\n this.onMoveEvent(\n func,\n {\n type: \"ascii::String\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace ascii {\n export class Char {\n static TYPE_QNAME = \"0x1::ascii::Char\";\n byte: number;\n }\n\n export interface CharInstance extends TypedEventInstance<Char> {\n data_decoded: Char;\n type_arguments: [];\n }\n\n export class String {\n static TYPE_QNAME = \"0x1::ascii::String\";\n bytes: number[];\n }\n\n export interface StringInstance extends TypedEventInstance<String> {\n data_decoded: String;\n type_arguments: [];\n }\n}\n\nexport namespace bcs {}\n\nexport class bit_vector extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"bit_vector\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): bit_vector {\n return new bit_vector({ ...bit_vector.DEFAULT_OPTIONS, ...options });\n }\n\n onEventBitVector(\n func: (event: bit_vector.BitVectorInstance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): bit_vector {\n this.onMoveEvent(\n func,\n {\n type: \"bit_vector::BitVector\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace bit_vector {\n export class BitVector {\n static TYPE_QNAME = \"0x1::bit_vector::BitVector\";\n length: bigint;\n bit_field: Boolean[];\n }\n\n export interface BitVectorInstance extends TypedEventInstance<BitVector> {\n data_decoded: BitVector;\n type_arguments: [];\n }\n}\n\nexport namespace debug {}\n\nexport class fixed_point32 extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"fixed_point32\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): fixed_point32 {\n return new fixed_point32({ ...fixed_point32.DEFAULT_OPTIONS, ...options });\n }\n\n onEventFixedPoint32(\n func: (event: fixed_point32.FixedPoint32Instance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): fixed_point32 {\n this.onMoveEvent(\n func,\n {\n type: \"fixed_point32::FixedPoint32\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace fixed_point32 {\n export class FixedPoint32 {\n static TYPE_QNAME = \"0x1::fixed_point32::FixedPoint32\";\n value: bigint;\n }\n\n export interface FixedPoint32Instance\n extends TypedEventInstance<FixedPoint32> {\n data_decoded: FixedPoint32;\n type_arguments: [];\n }\n}\n\nexport namespace hash {}\n\nexport namespace option {\n export type Option<T> = T | undefined;\n}\n\nexport class string_ extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"string\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): string_ {\n return new string_({ ...string_.DEFAULT_OPTIONS, ...options });\n }\n\n onEventString(\n func: (event: string_.StringInstance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): string_ {\n this.onMoveEvent(\n func,\n {\n type: \"string::String\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace string_ {\n export class String {\n static TYPE_QNAME = \"0x1::string::String\";\n bytes: number[];\n }\n\n export interface StringInstance extends TypedEventInstance<String> {\n data_decoded: String;\n type_arguments: [];\n }\n}\n\nexport class type_name extends SuiBaseProcessor {\n constructor(options: SuiBindOptions) {\n super(\"type_name\", options);\n }\n static DEFAULT_OPTIONS: SuiBindOptions = {\n address: \"0x1\",\n network: SuiNetwork.MAIN_NET,\n };\n\n static bind(options: Partial<SuiBindOptions> = {}): type_name {\n return new type_name({ ...type_name.DEFAULT_OPTIONS, ...options });\n }\n\n onEventTypeName(\n func: (event: type_name.TypeNameInstance, ctx: SuiContext) => void,\n fetchConfig?: Partial<MoveFetchConfig>\n ): type_name {\n this.onMoveEvent(\n func,\n {\n type: \"type_name::TypeName\",\n },\n fetchConfig\n );\n return this;\n }\n}\n\nexport namespace type_name {\n export class TypeName {\n static TYPE_QNAME = \"0x1::type_name::TypeName\";\n name: ascii.String;\n }\n\n export interface TypeNameInstance extends TypedEventInstance<TypeName> {\n data_decoded: TypeName;\n type_arguments: [];\n }\n}\n\nexport namespace vector {}\n\nconst MODULES = JSON.parse(\n '{\"address\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"address\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[],\"return\":[\"U64\"]}}},\"ascii\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"ascii\",\"friends\":[],\"structs\":{\"Char\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"byte\",\"type\":\"U8\"}]},\"String\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"bytes\",\"type\":{\"Vector\":\"U8\"}}]}},\"exposedFunctions\":{\"all_characters_printable\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"Bool\"]},\"as_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Vector\":\"U8\"}}]},\"byte\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}],\"return\":[\"U8\"]},\"char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}]},\"into_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Vector\":\"U8\"}]},\"is_printable_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[\"Bool\"]},\"is_valid_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U8\"],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"pop_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}]},\"push_char\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"Char\",\"typeArguments\":[]}}],\"return\":[]},\"string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"try_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]}}]}}},\"bcs\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"bcs\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"to_bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"TypeParameter\":0}}],\"return\":[{\"Vector\":\"U8\"}]}}},\"bit_vector\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"bit_vector\",\"friends\":[],\"structs\":{\"BitVector\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"length\",\"type\":\"U64\"},{\"name\":\"bit_field\",\"type\":{\"Vector\":\"Bool\"}}]}},\"exposedFunctions\":{\"is_index_set\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"longest_set_sequence_starting_at\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[\"U64\"]},\"new\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}]},\"set\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]},\"shift_left\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]},\"unset\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"bit_vector\",\"name\":\"BitVector\",\"typeArguments\":[]}}},\"U64\"],\"return\":[]}}},\"debug\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"debug\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"print\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"TypeParameter\":0}}],\"return\":[]},\"print_stack_trace\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[],\"return\":[]}}},\"fixed_point32\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"fixed_point32\",\"friends\":[],\"structs\":{\"FixedPoint32\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"value\",\"type\":\"U64\"}]}},\"exposedFunctions\":{\"create_from_rational\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}]},\"create_from_raw_value\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}]},\"divide_u64\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]},\"get_raw_value\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]},\"is_zero\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"Bool\"]},\"multiply_u64\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"fixed_point32\",\"name\":\"FixedPoint32\",\"typeArguments\":[]}}],\"return\":[\"U64\"]}}},\"hash\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"hash\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"sha2_256\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Vector\":\"U8\"}]},\"sha3_256\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Vector\":\"U8\"}]}}},\"option\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"option\",\"friends\":[],\"structs\":{\"Option\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[{\"constraints\":{\"abilities\":[]},\"isPhantom\":false}],\"fields\":[{\"name\":\"vec\",\"type\":{\"Vector\":{\"TypeParameter\":0}}}]}},\"exposedFunctions\":{\"borrow\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"borrow_mut\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"MutableReference\":{\"TypeParameter\":0}}]},\"borrow_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"contains\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\"]},\"destroy_none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[]},\"destroy_some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[{\"TypeParameter\":0}]},\"destroy_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[\"Drop\"]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"extract\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[{\"TypeParameter\":0}]},\"fill\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[]},\"get_with_default\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[\"Copy\",\"Drop\"]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"is_none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[\"Bool\"]},\"is_some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}}],\"return\":[\"Bool\"]},\"none\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"some\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"TypeParameter\":0}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"swap\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"TypeParameter\":0}]},\"swap_or_fill\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}},{\"TypeParameter\":0}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}]},\"to_vec\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"TypeParameter\":0}]}}],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]}}},\"string\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"string\",\"friends\":[],\"structs\":{\"String\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"bytes\",\"type\":{\"Vector\":\"U8\"}}]}},\"exposedFunctions\":{\"append\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[]},\"append_utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Vector\":\"U8\"}],\"return\":[]},\"bytes\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Vector\":\"U8\"}}]},\"from_ascii\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]},\"index_of\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"insert\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"MutableReference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},\"U64\",{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[]},\"is_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}}],\"return\":[\"U64\"]},\"sub_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}},\"U64\",\"U64\"],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]},\"to_ascii\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"try_utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"option\",\"name\":\"Option\",\"typeArguments\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]}}]},\"utf8\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Vector\":\"U8\"}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"string\",\"name\":\"String\",\"typeArguments\":[]}}]}}},\"type_name\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"type_name\",\"friends\":[],\"structs\":{\"TypeName\":{\"abilities\":{\"abilities\":[\"Copy\",\"Drop\",\"Store\"]},\"typeParameters\":[],\"fields\":[{\"name\":\"name\",\"type\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}]}},\"exposedFunctions\":{\"borrow_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}}]},\"get\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}]},\"get_address\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"get_module\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Reference\":{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]},\"into_string\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[],\"parameters\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"type_name\",\"name\":\"TypeName\",\"typeArguments\":[]}}],\"return\":[{\"Struct\":{\"address\":\"0x1\",\"module\":\"ascii\",\"name\":\"String\",\"typeArguments\":[]}}]}}},\"vector\":{\"fileFormatVersion\":6,\"address\":\"0x1\",\"name\":\"vector\",\"friends\":[],\"structs\":{},\"exposedFunctions\":{\"append\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Vector\":{\"TypeParameter\":0}}],\"return\":[]},\"borrow\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"Reference\":{\"TypeParameter\":0}}]},\"borrow_mut\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"MutableReference\":{\"TypeParameter\":0}}]},\"contains\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\"]},\"destroy_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Vector\":{\"TypeParameter\":0}}],\"return\":[]},\"empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]},\"index_of\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}},{\"Reference\":{\"TypeParameter\":0}}],\"return\":[\"Bool\",\"U64\"]},\"insert\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"TypeParameter\":0},\"U64\"],\"return\":[]},\"is_empty\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[\"Bool\"]},\"length\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"Reference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[\"U64\"]},\"pop_back\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[{\"TypeParameter\":0}]},\"push_back\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},{\"TypeParameter\":0}],\"return\":[]},\"remove\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"TypeParameter\":0}]},\"reverse\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}}],\"return\":[]},\"singleton\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"TypeParameter\":0}],\"return\":[{\"Vector\":{\"TypeParameter\":0}}]},\"swap\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\",\"U64\"],\"return\":[]},\"swap_remove\":{\"visibility\":\"Public\",\"isEntry\":false,\"typeParameters\":[{\"abilities\":[]}],\"parameters\":[{\"MutableReference\":{\"Vector\":{\"TypeParameter\":0}}},\"U64\"],\"return\":[{\"TypeParameter\":0}]}}}}'\n);\n\nexport function loadAllTypes(coder: MoveCoder) {\n for (const m of Object.values(MODULES)) {\n coder.load(m as any);\n }\n}\n\nloadAllTypes(defaultMoveCoder());\n"]}