@xyo-network/evm-abi-diviner 5.2.3 → 5.3.1

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.
@@ -4,7 +4,9 @@ import type { EvmContract } from '@xyo-network/evm-contract-witness';
4
4
  import type { AnyConfigSchema } from '@xyo-network/module-model';
5
5
  import type { Schema } from '@xyo-network/payload-model';
6
6
  import type { EvmFunctionImplemented, InterfaceAbi } from './Payload.ts';
7
- export declare const EvmAbiImplementedDivinerConfigSchema = "network.xyo.evm.abi.implemented.diviner.config";
7
+ export declare const EvmAbiImplementedDivinerConfigSchema: "network.xyo.evm.abi.implemented.diviner.config" & {
8
+ readonly __schema: true;
9
+ };
8
10
  export type EvmAbiImplementedDivinerConfigSchema = typeof EvmAbiImplementedDivinerConfigSchema;
9
11
  export type EvmAbiImplementedDivinerConfig = DivinerConfig<{
10
12
  abi?: InterfaceAbi;
@@ -1 +1 @@
1
- {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAIxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAGxE,eAAO,MAAM,oCAAoC,mDAAmD,CAAA;AACpG,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAA;AAE9F,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,oCAAoC,CAAA;CAAE,CAAC,CAAA;AAEhI,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,OAAO,SAAS,8BAA8B,GAAG,8BAA8B,CAAE,SAAQ,eAAe,CAC5I,OAAO,EACP,WAAW,EACX,sBAAsB,CACvB;IACC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAE3F,IAAI,GAAG,IAC0D,YAAY,CAC5E;cAEwB,aAAa,CAAC,UAAU,GAAE,WAAW,EAAO,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;CA8B1G"}
1
+ {"version":3,"file":"Diviner.d.ts","sourceRoot":"","sources":["../../src/Diviner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAIxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAGxE,eAAO,MAAM,oCAAoC;;CAAmE,CAAA;AACpH,MAAM,MAAM,oCAAoC,GAAG,OAAO,oCAAoC,CAAA;AAE9F,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,oCAAoC,CAAA;CAAE,CAAC,CAAA;AAEhI,MAAM,MAAM,8BAA8B,GAAG,aAAa,CAAC,eAAe,CAAC,8BAA8B,CAAC,CAAC,CAAA;AAE3G,qBAAa,wBAAwB,CAAC,OAAO,SAAS,8BAA8B,GAAG,8BAA8B,CAAE,SAAQ,eAAe,CAC5I,OAAO,EACP,WAAW,EACX,sBAAsB,CACvB;IACC,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAiE;IACjH,gBAAyB,mBAAmB,EAAE,MAAM,CAAuC;IAE3F,IAAI,GAAG,IAC0D,YAAY,CAC5E;cAEwB,aAAa,CAAC,UAAU,GAAE,WAAW,EAAO,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC;CA8B1G"}
@@ -1,7 +1,9 @@
1
- import type { Payload } from '@xyo-network/payload-model';
1
+ import { type Payload } from '@xyo-network/payload-model';
2
2
  import type { Fragment, JsonFragment } from 'ethers';
3
3
  export type InterfaceAbi = string | ReadonlyArray<Fragment | JsonFragment | string>;
4
- export declare const EvmFunctionImplementedSchema = "network.xyo.evm.function.implemented";
4
+ export declare const EvmFunctionImplementedSchema: "network.xyo.evm.function.implemented" & {
5
+ readonly __schema: true;
6
+ };
5
7
  export type EvmFunctionImplementedSchema = typeof EvmFunctionImplementedSchema;
6
8
  export type EvmFunctionImplemented = Payload<{
7
9
  address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,aAAa,CAAC,QAAQ,GAAG,YAAY,GAAG,MAAM,CAAC,CAAA;AAEnF,eAAO,MAAM,4BAA4B,yCAAyC,CAAA;AAClF,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C;IACE,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,EACD,4BAA4B,CAC7B,CAAA"}
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAEpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,aAAa,CAAC,QAAQ,GAAG,YAAY,GAAG,MAAM,CAAC,CAAA;AAEnF,eAAO,MAAM,4BAA4B;;CAAyD,CAAA;AAClG,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C;IACE,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB,EACD,4BAA4B,CAC7B,CAAA"}
@@ -2,14 +2,15 @@
2
2
  import { assertEx } from "@xylabs/assert";
3
3
  import { AbstractDiviner } from "@xyo-network/diviner-abstract";
4
4
  import { EvmContractSchema } from "@xyo-network/evm-contract-witness";
5
- import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
5
+ import { asSchema as asSchema2, isPayloadOfSchemaType } from "@xyo-network/payload-model";
6
6
  import { Interface } from "ethers";
7
7
 
8
8
  // src/Payload.ts
9
- var EvmFunctionImplementedSchema = "network.xyo.evm.function.implemented";
9
+ import { asSchema } from "@xyo-network/payload-model";
10
+ var EvmFunctionImplementedSchema = asSchema("network.xyo.evm.function.implemented", true);
10
11
 
11
12
  // src/Diviner.ts
12
- var EvmAbiImplementedDivinerConfigSchema = "network.xyo.evm.abi.implemented.diviner.config";
13
+ var EvmAbiImplementedDivinerConfigSchema = asSchema2("network.xyo.evm.abi.implemented.diviner.config", true);
13
14
  var EvmAbiImplementedDiviner = class extends AbstractDiviner {
14
15
  static configSchemas = [...super.configSchemas, EvmAbiImplementedDivinerConfigSchema];
15
16
  static defaultConfigSchema = EvmAbiImplementedDivinerConfigSchema;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Diviner.ts","../../src/Payload.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerConfig, DivinerParams } from '@xyo-network/diviner-model'\nimport type { EvmContract } from '@xyo-network/evm-contract-witness'\nimport { EvmContractSchema } from '@xyo-network/evm-contract-witness'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport { Interface } from 'ethers'\n\nimport type { EvmFunctionImplemented, InterfaceAbi } from './Payload.ts'\nimport { EvmFunctionImplementedSchema } from './Payload.ts'\n\nexport const EvmAbiImplementedDivinerConfigSchema = 'network.xyo.evm.abi.implemented.diviner.config'\nexport type EvmAbiImplementedDivinerConfigSchema = typeof EvmAbiImplementedDivinerConfigSchema\n\nexport type EvmAbiImplementedDivinerConfig = DivinerConfig<{ abi?: InterfaceAbi; schema: EvmAbiImplementedDivinerConfigSchema }>\n\nexport type EvmAbiImplementedDivinerParams = DivinerParams<AnyConfigSchema<EvmAbiImplementedDivinerConfig>>\n\nexport class EvmAbiImplementedDiviner<TParams extends EvmAbiImplementedDivinerParams = EvmAbiImplementedDivinerParams> extends AbstractDiviner<\n TParams,\n EvmContract,\n EvmFunctionImplemented\n> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EvmAbiImplementedDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = EvmAbiImplementedDivinerConfigSchema\n\n get abi() {\n return assertEx(this.config?.abi, () => 'No ABI specified') as InterfaceAbi\n }\n\n protected override async divineHandler(inPayloads: EvmContract[] = []): Promise<EvmFunctionImplemented[]> {\n await this.started('throw')\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType<EvmContract>(EvmContractSchema)).map(({ address, code }) => {\n const contractInterface = new Interface(this.abi)\n const byteCode = assertEx(code, () => 'Missing code')\n\n const results: EvmFunctionImplemented[] = []\n\n contractInterface.forEachFunction(({ selector }) => {\n const observation: EvmFunctionImplemented = {\n address,\n implemented: byteCode.includes(BigInt(selector).toString(16)),\n schema: EvmFunctionImplementedSchema,\n selector,\n }\n results.push(observation)\n })\n\n return results\n }),\n )\n return observations.flat()\n } catch (ex) {\n const error = ex as Error\n console.log(`Error [${this.config.name}]: ${error.message}`)\n throw error\n }\n }\n}\n","import type { Payload } from '@xyo-network/payload-model'\nimport type { Fragment, JsonFragment } from 'ethers'\n\nexport type InterfaceAbi = string | ReadonlyArray<Fragment | JsonFragment | string>\n\nexport const EvmFunctionImplementedSchema = 'network.xyo.evm.function.implemented'\nexport type EvmFunctionImplementedSchema = typeof EvmFunctionImplementedSchema\n\nexport type EvmFunctionImplemented = Payload<\n {\n address: string\n implemented: boolean\n selector: string\n },\n EvmFunctionImplementedSchema\n>\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,6BAA6B;AACtC,SAAS,iBAAiB;;;ACHnB,IAAM,+BAA+B;;;ADQrC,IAAM,uCAAuC;AAO7C,IAAM,2BAAN,cAAwH,gBAI7H;AAAA,EACA,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAEvD,IAAI,MAAM;AACR,WAAO,SAAS,KAAK,QAAQ,KAAK,MAAM,kBAAkB;AAAA,EAC5D;AAAA,EAEA,MAAyB,cAAc,aAA4B,CAAC,GAAsC;AACxG,UAAM,KAAK,QAAQ,OAAO;AAC1B,QAAI;AACF,YAAM,eAAe,MAAM,QAAQ;AAAA,QACjC,WAAW,OAAO,sBAAmC,iBAAiB,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,MAAM;AAClG,gBAAM,oBAAoB,IAAI,UAAU,KAAK,GAAG;AAChD,gBAAM,WAAW,SAAS,MAAM,MAAM,cAAc;AAEpD,gBAAM,UAAoC,CAAC;AAE3C,4BAAkB,gBAAgB,CAAC,EAAE,SAAS,MAAM;AAClD,kBAAM,cAAsC;AAAA,cAC1C;AAAA,cACA,aAAa,SAAS,SAAS,OAAO,QAAQ,EAAE,SAAS,EAAE,CAAC;AAAA,cAC5D,QAAQ;AAAA,cACR;AAAA,YACF;AACA,oBAAQ,KAAK,WAAW;AAAA,UAC1B,CAAC;AAED,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AACA,aAAO,aAAa,KAAK;AAAA,IAC3B,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,IAAI,UAAU,KAAK,OAAO,IAAI,MAAM,MAAM,OAAO,EAAE;AAC3D,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/Diviner.ts","../../src/Payload.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { AbstractDiviner } from '@xyo-network/diviner-abstract'\nimport type { DivinerConfig, DivinerParams } from '@xyo-network/diviner-model'\nimport type { EvmContract } from '@xyo-network/evm-contract-witness'\nimport { EvmContractSchema } from '@xyo-network/evm-contract-witness'\nimport type { AnyConfigSchema } from '@xyo-network/module-model'\nimport type { Schema } from '@xyo-network/payload-model'\nimport { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'\nimport { Interface } from 'ethers'\n\nimport type { EvmFunctionImplemented, InterfaceAbi } from './Payload.ts'\nimport { EvmFunctionImplementedSchema } from './Payload.ts'\n\nexport const EvmAbiImplementedDivinerConfigSchema = asSchema('network.xyo.evm.abi.implemented.diviner.config', true)\nexport type EvmAbiImplementedDivinerConfigSchema = typeof EvmAbiImplementedDivinerConfigSchema\n\nexport type EvmAbiImplementedDivinerConfig = DivinerConfig<{ abi?: InterfaceAbi; schema: EvmAbiImplementedDivinerConfigSchema }>\n\nexport type EvmAbiImplementedDivinerParams = DivinerParams<AnyConfigSchema<EvmAbiImplementedDivinerConfig>>\n\nexport class EvmAbiImplementedDiviner<TParams extends EvmAbiImplementedDivinerParams = EvmAbiImplementedDivinerParams> extends AbstractDiviner<\n TParams,\n EvmContract,\n EvmFunctionImplemented\n> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, EvmAbiImplementedDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = EvmAbiImplementedDivinerConfigSchema\n\n get abi() {\n return assertEx(this.config?.abi, () => 'No ABI specified') as InterfaceAbi\n }\n\n protected override async divineHandler(inPayloads: EvmContract[] = []): Promise<EvmFunctionImplemented[]> {\n await this.started('throw')\n try {\n const observations = await Promise.all(\n inPayloads.filter(isPayloadOfSchemaType<EvmContract>(EvmContractSchema)).map(({ address, code }) => {\n const contractInterface = new Interface(this.abi)\n const byteCode = assertEx(code, () => 'Missing code')\n\n const results: EvmFunctionImplemented[] = []\n\n contractInterface.forEachFunction(({ selector }) => {\n const observation: EvmFunctionImplemented = {\n address,\n implemented: byteCode.includes(BigInt(selector).toString(16)),\n schema: EvmFunctionImplementedSchema,\n selector,\n }\n results.push(observation)\n })\n\n return results\n }),\n )\n return observations.flat()\n } catch (ex) {\n const error = ex as Error\n console.log(`Error [${this.config.name}]: ${error.message}`)\n throw error\n }\n }\n}\n","import { asSchema, type Payload } from '@xyo-network/payload-model'\nimport type { Fragment, JsonFragment } from 'ethers'\n\nexport type InterfaceAbi = string | ReadonlyArray<Fragment | JsonFragment | string>\n\nexport const EvmFunctionImplementedSchema = asSchema('network.xyo.evm.function.implemented', true)\nexport type EvmFunctionImplementedSchema = typeof EvmFunctionImplementedSchema\n\nexport type EvmFunctionImplemented = Payload<\n {\n address: string\n implemented: boolean\n selector: string\n },\n EvmFunctionImplementedSchema\n>\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAGhC,SAAS,yBAAyB;AAGlC,SAAS,YAAAA,WAAU,6BAA6B;AAChD,SAAS,iBAAiB;;;ACR1B,SAAS,gBAA8B;AAKhC,IAAM,+BAA+B,SAAS,wCAAwC,IAAI;;;ADQ1F,IAAM,uCAAuCC,UAAS,kDAAkD,IAAI;AAO5G,IAAM,2BAAN,cAAwH,gBAI7H;AAAA,EACA,OAAyB,gBAA0B,CAAC,GAAG,MAAM,eAAe,oCAAoC;AAAA,EAChH,OAAyB,sBAA8B;AAAA,EAEvD,IAAI,MAAM;AACR,WAAO,SAAS,KAAK,QAAQ,KAAK,MAAM,kBAAkB;AAAA,EAC5D;AAAA,EAEA,MAAyB,cAAc,aAA4B,CAAC,GAAsC;AACxG,UAAM,KAAK,QAAQ,OAAO;AAC1B,QAAI;AACF,YAAM,eAAe,MAAM,QAAQ;AAAA,QACjC,WAAW,OAAO,sBAAmC,iBAAiB,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,MAAM;AAClG,gBAAM,oBAAoB,IAAI,UAAU,KAAK,GAAG;AAChD,gBAAM,WAAW,SAAS,MAAM,MAAM,cAAc;AAEpD,gBAAM,UAAoC,CAAC;AAE3C,4BAAkB,gBAAgB,CAAC,EAAE,SAAS,MAAM;AAClD,kBAAM,cAAsC;AAAA,cAC1C;AAAA,cACA,aAAa,SAAS,SAAS,OAAO,QAAQ,EAAE,SAAS,EAAE,CAAC;AAAA,cAC5D,QAAQ;AAAA,cACR;AAAA,YACF;AACA,oBAAQ,KAAK,WAAW;AAAA,UAC1B,CAAC;AAED,iBAAO;AAAA,QACT,CAAC;AAAA,MACH;AACA,aAAO,aAAa,KAAK;AAAA,IAC3B,SAAS,IAAI;AACX,YAAM,QAAQ;AACd,cAAQ,IAAI,UAAU,KAAK,OAAO,IAAI,MAAM,MAAM,OAAO,EAAE;AAC3D,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["asSchema","asSchema"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/evm-abi-diviner",
3
- "version": "5.2.3",
3
+ "version": "5.3.1",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -36,24 +36,24 @@
36
36
  "!**/*.test.*"
37
37
  ],
38
38
  "dependencies": {
39
- "@xylabs/assert": "~5.0.49",
40
- "@xyo-network/diviner-abstract": "~5.2.14",
41
- "@xyo-network/diviner-model": "~5.2.14",
42
- "@xyo-network/evm-contract-witness": "~5.2.3",
43
- "@xyo-network/module-model": "~5.2.14",
44
- "@xyo-network/payload-model": "~5.2.14",
45
- "ethers": "~6.16.0"
39
+ "@xylabs/assert": "~5.0.64",
40
+ "@xyo-network/diviner-abstract": "~5.3.2",
41
+ "@xyo-network/diviner-model": "~5.3.2",
42
+ "@xyo-network/evm-contract-witness": "5.3.1",
43
+ "@xyo-network/module-model": "~5.3.2",
44
+ "@xyo-network/payload-model": "~5.3.2",
45
+ "ethers": "^6.16.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "~7.2.8",
49
- "@xylabs/tsconfig": "~7.2.8",
50
- "@xylabs/vitest-extended": "~5.0.49",
51
- "@xyo-network/open-zeppelin-typechain": "~4.0.11",
52
- "@xyo-network/witness-evm-abstract": "~5.2.14",
48
+ "@xylabs/ts-scripts-yarn3": "~7.3.2",
49
+ "@xylabs/tsconfig": "~7.3.2",
50
+ "@xylabs/vitest-extended": "~5.0.64",
51
+ "@xyo-network/open-zeppelin-typechain": "~4.1.1",
52
+ "@xyo-network/witness-evm-abstract": "~5.3.2",
53
53
  "typescript": "~5.9.3",
54
- "vitest": "~4.0.15"
54
+ "vitest": "~4.0.18"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  }
59
- }
59
+ }
package/src/Diviner.ts CHANGED
@@ -5,13 +5,13 @@ import type { EvmContract } from '@xyo-network/evm-contract-witness'
5
5
  import { EvmContractSchema } from '@xyo-network/evm-contract-witness'
6
6
  import type { AnyConfigSchema } from '@xyo-network/module-model'
7
7
  import type { Schema } from '@xyo-network/payload-model'
8
- import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
8
+ import { asSchema, isPayloadOfSchemaType } from '@xyo-network/payload-model'
9
9
  import { Interface } from 'ethers'
10
10
 
11
11
  import type { EvmFunctionImplemented, InterfaceAbi } from './Payload.ts'
12
12
  import { EvmFunctionImplementedSchema } from './Payload.ts'
13
13
 
14
- export const EvmAbiImplementedDivinerConfigSchema = 'network.xyo.evm.abi.implemented.diviner.config'
14
+ export const EvmAbiImplementedDivinerConfigSchema = asSchema('network.xyo.evm.abi.implemented.diviner.config', true)
15
15
  export type EvmAbiImplementedDivinerConfigSchema = typeof EvmAbiImplementedDivinerConfigSchema
16
16
 
17
17
  export type EvmAbiImplementedDivinerConfig = DivinerConfig<{ abi?: InterfaceAbi; schema: EvmAbiImplementedDivinerConfigSchema }>
package/src/Payload.ts CHANGED
@@ -1,9 +1,9 @@
1
- import type { Payload } from '@xyo-network/payload-model'
1
+ import { asSchema, type Payload } from '@xyo-network/payload-model'
2
2
  import type { Fragment, JsonFragment } from 'ethers'
3
3
 
4
4
  export type InterfaceAbi = string | ReadonlyArray<Fragment | JsonFragment | string>
5
5
 
6
- export const EvmFunctionImplementedSchema = 'network.xyo.evm.function.implemented'
6
+ export const EvmFunctionImplementedSchema = asSchema('network.xyo.evm.function.implemented', true)
7
7
  export type EvmFunctionImplementedSchema = typeof EvmFunctionImplementedSchema
8
8
 
9
9
  export type EvmFunctionImplemented = Payload<